Skip to content

Commit

Permalink
Merge pull request #3474 from dmichon-msft/disable-hoisting
Browse files Browse the repository at this point in the history
Disable hoisting for installs in the rushstack repository
  • Loading branch information
dmichon-msft authored Jun 16, 2022
2 parents f5db603 + 9267170 commit 60dfc37
Show file tree
Hide file tree
Showing 21 changed files with 3,224 additions and 4,678 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

"module": "commonjs",
"target": "es2017",
"lib": ["es2017"]
"lib": ["es2017", "DOM"]
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["node_modules", "lib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@storybook/react": "~6.4.18",
"@storybook/theming": "~6.4.18",
"@types/heft-jest": "1.0.1",
"@types/node": "12.20.24",
"@types/react-dom": "16.9.14",
"@types/react": "16.14.23",
"@types/webpack-env": "1.13.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/loader-load-themed-styles",
"comment": "Bump @types/webpack",
"type": "patch"
}
],
"packageName": "@microsoft/loader-load-themed-styles"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/hashed-folder-copy-plugin",
"comment": "Bump @types/webpack",
"type": "patch"
}
],
"packageName": "@rushstack/hashed-folder-copy-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft-jest-plugin",
"comment": "Fix resolution of \"jest-environment-node\" and \"jest-environment-jsdom\" with strict dependencies.",
"type": "patch"
}
],
"packageName": "@rushstack/heft-jest-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft-webpack4-plugin",
"comment": "Bump @types/webpack",
"type": "patch"
}
],
"packageName": "@rushstack/heft-webpack4-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/localization-plugin",
"comment": "Bump @types/webpack",
"type": "patch"
}
],
"packageName": "@rushstack/localization-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/set-webpack-public-path-plugin",
"comment": "Bump @types/webpack",
"type": "patch"
}
],
"packageName": "@rushstack/set-webpack-public-path-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/tree-pattern",
"comment": "Add missing types",
"type": "patch"
}
],
"packageName": "@rushstack/tree-pattern"
}
6 changes: 6 additions & 0 deletions common/config/rush/.npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@
#
registry=https://registry.npmjs.org/
always-auth=false
# No phantom dependencies allowed in this repository
# Don't hoist in common/temp/node_modules
public-hoist-pattern=
# Don't hoist in common/temp/node_modules/.pnpm/node_modules
hoist=false
hoist-pattern=
85 changes: 81 additions & 4 deletions common/config/rush/.pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,96 @@ module.exports = {
*/
function readPackage(packageJson, context) {
switch (packageJson.name) {
case 'tslint-microsoft-contrib': {
// The `tslint-microsoft-contrib` repo is archived so it can't be updated to TS 4.4+.
// unmet peer typescript@"^2.1.0 || ^3.0.0": found 4.5.5
packageJson.peerDependencies['typescript'] = '*';
case '@emotion/core':
case '@emotion/styled':
case '@emotion/styled-base':
case '@emotion/theming':
case '@storybook/addons':
case '@storybook/api':
case '@storybook/router':
case 'emotion-theming':
case 'react-router-dom':
case 'react-router': {
// This package reexports types from `react`
packageJson.peerDependencies['@types/react'] = '>=16';
break;
}

case '@jest/reporters': {
// The `@jest/reporters` package reexports types from `istanbul-lib-coverage`
packageJson.dependencies['@types/istanbul-lib-coverage'] = '2.0.4';
break;
}

case '@jest/test-result': {
// The `@jest/test-result` package takes undeclared dependencies on `jest-haste-map`
// and `jest-resolve`
packageJson.dependencies['jest-haste-map'] = packageJson.version;
packageJson.dependencies['jest-resolve'] = packageJson.version;
}

case '@serverless-stack/core': {
delete packageJson.dependencies['@typescript-eslint/eslint-plugin'];
delete packageJson.dependencies['eslint-config-serverless-stack'];
delete packageJson.dependencies['lerna'];
break;
}

case '@serverless-stack/resources': {
packageJson.dependencies.esbuild = '*';
break;
}

case '@storybook/react': {
// This package reexports types from `react`
packageJson.peerDependencies['@types/node'] = '>=12';
packageJson.peerDependencies['@types/react'] = '>=16';
break;
}

case '@storybook/theming': {
packageJson.dependencies['@emotion/serialize'] = '*';
packageJson.dependencies['@emotion/utils'] = '*';
break;
}

case '@types/webpack': {
packageJson.dependencies.anymatch = '^3';
break;
}

case '@typescript-eslint/types': {
// `@typescript-eslint/types` reexports types from `typescript`
packageJson.peerDependencies = { typescript: '*' };
break;
}

case 'collect-v8-coverage': {
// The `collect-v8-coverage` package references `node` in its typings
packageJson.peerDependencies = {
'@types/node': '>=12'
};
break;
}

case 'http-proxy-middleware': {
packageJson.dependencies['@types/express'] = '*';
break;
}

case 'tslint-microsoft-contrib': {
// The `tslint-microsoft-contrib` repo is archived so it can't be updated to TS 4.4+.
// unmet peer typescript@"^2.1.0 || ^3.0.0": found 4.5.5
packageJson.peerDependencies['typescript'] = '*';
break;
}

case 'webpack-dev-server': {
packageJson.dependencies.anymatch = '^3';
packageJson.dependencies['@types/express-serve-static-core'] = '*';
packageJson.dependencies['@types/serve-static'] = '*';
break;
}
}

return packageJson;
Expand Down
Loading

0 comments on commit 60dfc37

Please sign in to comment.