Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit 623e4c7

Browse files
feat: lift dependencies from the root package.json to client workspaces package.json
1 parent 04a46f7 commit 623e4c7

File tree

26 files changed

+10262
-5187
lines changed

26 files changed

+10262
-5187
lines changed

.npmrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Disabling pnpm [hoisting](https://pnpm.io/npmrc#hoist) by setting `hoist=false` is recommended on
22
# projects using rules_js so that pnpm outside of Bazel lays out a node_modules tree similar to what
33
# rules_js lays out under Bazel (without a hidden node_modules/.pnpm/node_modules)
4-
hoist=true
5-
shamefully-hoist=true
4+
hoist=false
5+
6+
hoist-pattern[]=*eslint*
7+
hoist-pattern[]=*babel*
8+
hoist-pattern[]=*jest*
69

710
# npm_translate_lock with the yarn.lock file will complain about missing/incorrect peer dependencies.
811
# Temporarily ignore warnings until we switch to pnpm and can user pnpm.packageExtensions to fix them.

client/branded/package.json

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,39 @@
44
"version": "1.0.0",
55
"license": "Apache-2.0",
66
"scripts": {
7-
"storybook": "STORIES_GLOB='client/branded/src/**/*.story.tsx' pnpm workspace @sourcegraph/storybook run start",
8-
"lint:js": "pnpm run -T eslint --cache '**/*.[jt]s?(x)'",
9-
"lint:css": "pnpm run -T stylelint 'src/**/*.scss' --quiet",
10-
"test": "pnpm run -T jest"
7+
"storybook": "STORIES_GLOB='client/branded/src/**/*.story.tsx' pnpm --filter @sourcegraph/storybook run start",
8+
"lint:js": "pnpm eslint --cache '**/*.[jt]s?(x)'",
9+
"lint:css": "pnpm stylelint 'src/**/*.scss' --quiet",
10+
"test": "pnpm jest"
11+
},
12+
"devDependencies": {
13+
"@sourcegraph/extension-api-types": "workspace:*",
14+
"@storybook/addon-actions": "^6.5.14",
15+
"@testing-library/react": "^13.4.0",
16+
"@testing-library/user-event": "^13.5.0",
17+
"sinon": "^9.0.2",
18+
"@types/react": "18.0.8",
19+
"@types/react-dom": "18.0.2",
20+
"@storybook/react": "^6.5.14"
21+
},
22+
"dependencies": {
23+
"@sourcegraph/wildcard": "workspace:*",
24+
"@sourcegraph/common": "workspace:*",
25+
"@sourcegraph/shared": "workspace:*",
26+
"@sourcegraph/client-api": "workspace:*",
27+
"@sourcegraph/codeintellify": "workspace:*",
28+
"@sourcegraph/search-ui": "workspace:*",
29+
"@mdi/js": "^6.7.96",
30+
"classnames": "^2.2.6",
31+
"comlink": "^4.3.0",
32+
"copy-to-clipboard": "^3.3.1",
33+
"date-fns": "^2.16.1",
34+
"history": "4.5.1",
35+
"lodash": "^4.17.20",
36+
"mdi-react": "^8.1.0",
37+
"react": "18.1.0",
38+
"react-dom": "18.1.0",
39+
"react-router": "^5.2.0",
40+
"rxjs": "^6.6.3"
1141
}
1242
}

client/browser/package.json

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"pnpm": ">1.10.0"
88
},
99
"scripts": {
10-
"storybook": "STORIES_GLOB='client/browser/src/**/*.story.tsx' pnpm workspace @sourcegraph/storybook run start",
10+
"storybook": "STORIES_GLOB='client/browser/src/**/*.story.tsx' pnpm --filter @sourcegraph/storybook run start",
1111
"build-inline-extensions": "node scripts/build-inline-extensions",
1212
"predev": "pnpm run build-inline-extensions",
1313
"dev": "pnpm run predev && NODE_ENV=development NODE_OPTIONS=--max_old_space_size=8192 node -r ts-node/register scripts/development",
@@ -16,21 +16,82 @@
1616
"dev:chrome": "TARGETS=chrome pnpm run dev",
1717
"dev:edge": "TARGETS=edge pnpm run dev",
1818
"dev:safari": "TARGETS=safari pnpm run build",
19-
"prebuild": "pnpm -T run generate && pnpm run build-inline-extensions",
19+
"prebuild": "pnpm -w run generate && pnpm run build-inline-extensions",
2020
"build": "pnpm run prebuild && NODE_ENV=production NODE_OPTIONS=--max_old_space_size=8192 node -r ts-node/register scripts/build",
2121
"release": "pnpm release:chrome",
22-
"release:chrome": "pnpm run -T webstore upload --auto-publish --source build/bundles/chrome-bundle.zip --extension-id dgjhfomjieaadpoljlnidmbgkdffpack --client-id $GOOGLE_CLIENT_ID --client-secret $GOOGLE_CLIENT_SECRET --refresh-token $GOOGLE_REFRESH_TOKEN",
22+
"release:chrome": "pnpm webstore upload --auto-publish --source build/bundles/chrome-bundle.zip --extension-id dgjhfomjieaadpoljlnidmbgkdffpack --client-id $GOOGLE_CLIENT_ID --client-secret $GOOGLE_CLIENT_SECRET --refresh-token $GOOGLE_REFRESH_TOKEN",
2323
"release:firefox": "./scripts/release-firefox.sh",
24-
"release:npm": "TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" pnpm run -T ts-node ./scripts/publish-npm.ts",
25-
"lint": "pnpm run -T eslint && pnpm run -T stylelint",
26-
"lint:js": "pnpm run -T eslint --cache '**/*.[jt]s?(x)'",
27-
"lint:css": "pnpm run -T stylelint 'src/**/*.scss'",
24+
"release:npm": "TS_NODE_COMPILER_OPTIONS=\"{\\\"module\\\":\\\"commonjs\\\"}\" pnpm ts-node ./scripts/publish-npm.ts",
25+
"lint": "pnpm eslint && pnpm stylelint",
26+
"lint:js": "pnpm eslint --cache '**/*.[jt]s?(x)'",
27+
"lint:css": "pnpm stylelint 'src/**/*.scss'",
2828
"clean": "rm -rf build/ dist/ *.zip *.xpi .checksum",
29-
"test": "pnpm run -T jest --testPathIgnorePatterns end-to-end integration",
30-
"test-e2e": "pnpm run -T mocha './src/end-to-end/**/*.test.ts'",
31-
"run-integration": "TS_NODE_PROJECT=src/integration/tsconfig.json SOURCEGRAPH_BASE_URL=https://sourcegraph.com pnpm run -T mocha --parallel=${CI:-\"false\"} --retries=2 ./src/integration/**/*.test.ts",
29+
"test": "pnpm jest --testPathIgnorePatterns end-to-end integration",
30+
"test-e2e": "pnpm mocha './src/end-to-end/**/*.test.ts'",
31+
"run-integration": "TS_NODE_PROJECT=src/integration/tsconfig.json SOURCEGRAPH_BASE_URL=https://sourcegraph.com pnpm mocha --parallel=${CI:-\"false\"} --retries=2 ./src/integration/**/*.test.ts",
3232
"test-integration": "node scripts/test-integration",
3333
"record-integration": "node scripts/record-integration",
3434
"create-source-zip": "node scripts/create-source-zip"
35+
},
36+
"devDependencies": {
37+
"@sourcegraph/build-config": "workspace:*",
38+
"@sourcegraph/extension-api-types": "workspace:*",
39+
"@testing-library/react": "^13.4.0",
40+
"css-minimizer-webpack-plugin": "^4.2.2",
41+
"execa": "^5.0.0",
42+
"expect": "^27.5.1",
43+
"googleapis": "^47.0.0",
44+
"graphql": "^15.4.0",
45+
"jsdom": "^16.7.0",
46+
"latest-version": "^5.1.0",
47+
"mini-css-extract-plugin": "^2.7.2",
48+
"mz": "^2.7.0",
49+
"process": "^0.11.10",
50+
"puppeteer": "^13.5.1",
51+
"shelljs": "^0.8.4",
52+
"signale": "^1.4.0",
53+
"simmerjs": "^0.5.6",
54+
"sinon": "^9.0.2",
55+
"socket.io": "^4.5.2",
56+
"socket.io-client": "^4.5.2",
57+
"terser-webpack-plugin": "^5.3.6",
58+
"utc-version": "^2.0.2",
59+
"webpack": "^5.75.0",
60+
"worker-loader": "^3.0.8",
61+
"jest-fetch-mock": "^3.0.3",
62+
"monaco-editor": "^0.24.0",
63+
"@types/react": "18.0.8",
64+
"@types/react-dom": "18.0.2",
65+
"@storybook/react": "^6.5.14"
66+
},
67+
"dependencies": {
68+
"@sourcegraph/common": "workspace:*",
69+
"@sourcegraph/shared": "workspace:*",
70+
"@sourcegraph/wildcard": "workspace:*",
71+
"@sourcegraph/branded": "workspace:*",
72+
"@sourcegraph/http-client": "workspace:*",
73+
"@sourcegraph/client-api": "workspace:*",
74+
"@sourcegraph/codeintellify": "workspace:*",
75+
"@mdi/js": "^6.7.96",
76+
"@reach/combobox": "^0.16.5",
77+
"@sentry/browser": "^7.8.1",
78+
"@sourcegraph/extension-api-classes": "^1.1.0",
79+
"classnames": "^2.2.6",
80+
"comlink": "^4.3.0",
81+
"delay": "^4.4.1",
82+
"history": "4.5.1",
83+
"jsonc-parser": "^3.0.0",
84+
"lodash": "^4.17.20",
85+
"mdi-react": "^8.1.0",
86+
"path-browserify": "^1.0.1",
87+
"react": "18.1.0",
88+
"react-dom": "18.1.0",
89+
"rxjs": "^6.6.3",
90+
"semver": "^7.3.2",
91+
"string-score": "^1.0.1",
92+
"url": "^0.11.0",
93+
"utility-types": "^3.10.0",
94+
"uuid": "^8.3.0",
95+
"webext-domain-permission-toggle": "^1.0.1"
3596
}
3697
}

client/build-config/package.json

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,29 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"css-loader": "^6.7.2",
15+
"enhanced-resolve": "^5.9.3",
16+
"esbuild": "^0.16.10",
17+
"monaco-editor-webpack-plugin": "^3.1.0",
18+
"postcss": "^8.4.19",
19+
"postcss-loader": "^7.0.2",
20+
"postcss-modules": "^6.0.0",
21+
"sass": "^1.32.4",
22+
"sass-loader": "^13.2.0",
23+
"signale": "^1.4.0",
24+
"style-loader": "^3.3.1",
25+
"terser-webpack-plugin": "^5.3.6",
26+
"webpack": "^5.75.0",
27+
"worker-loader": "^3.0.8",
28+
"@statoscope/webpack-plugin": "^5.24.0"
29+
},
30+
"dependencies": {
31+
"monaco-editor": "^0.24.0",
32+
"monaco-yaml": "^3.2.1",
33+
"path-browserify": "^1.0.1"
1234
}
1335
}

client/client-api/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"@sourcegraph/extension-api-types": "workspace:*"
15+
},
16+
"dependencies": {
17+
"@sourcegraph/template-parser": "workspace:*",
18+
"@sourcegraph/extension-api-classes": "^1.1.0",
19+
"utility-types": "^3.10.0"
1220
}
1321
}

client/codeintellify/package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"@sourcegraph/extension-api-types": "workspace:*"
15+
},
16+
"dependencies": {
17+
"@sourcegraph/common": "workspace:*",
18+
"lodash": "^4.17.20",
19+
"rxjs": "^6.6.3",
20+
"ts-key-enum": "^2.0.7"
1221
}
1322
}

client/common/package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,25 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"@sourcegraph/extension-api-types": "workspace:*",
15+
"expect": "^27.5.1",
16+
"graphql": "^15.4.0",
17+
"mockdate": "^3.0.2",
18+
"jest-fetch-mock": "^3.0.3"
19+
},
20+
"dependencies": {
21+
"delay": "^4.4.1",
22+
"highlight.js": "^10.5.0",
23+
"highlightjs-graphql": "^1.0.2",
24+
"jsonc-parser": "^3.0.0",
25+
"lodash": "^4.17.20",
26+
"marked": "4.0.16",
27+
"rxjs": "^6.6.3",
28+
"sanitize-html": "^2.0.0",
29+
"utility-types": "^3.10.0"
1230
}
1331
}

client/extension-api-types/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
],
2020
"sideEffects": false,
2121
"scripts": {
22-
"lint:js": "pnpm run -T eslint 'src/**/*.[jt]s?(x)'",
23-
"prepublish": "pnpm run -T eslint"
22+
"lint:js": "pnpm eslint 'src/**/*.[jt]s?(x)'",
23+
"prepublish": "pnpm eslint"
2424
},
2525
"peerDependencies": {
2626
"sourcegraph": "*"

client/extension-api/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@
2121
],
2222
"sideEffects": false,
2323
"scripts": {
24-
"lint:js": "pnpm run -T eslint 'src/*.[jt]s?(x)'",
25-
"docs": "pnpm run -T typedoc",
26-
"prepublish": "pnpm run -T eslint && pnpm run docs"
24+
"lint:js": "pnpm eslint 'src/*.[jt]s?(x)'",
25+
"docs": "pnpm typedoc",
26+
"prepublish": "pnpm eslint && pnpm run docs"
2727
},
2828
"devDependencies": {
29-
"typedoc": "^0.17.8"
29+
"typedoc": "^0.17.8",
30+
"graphql": "^15.4.0",
31+
"signale": "^1.4.0"
3032
},
3133
"peerDependencies": {
3234
"graphql": "^15.4.0"

client/http-client/package.json

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,26 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"graphql": "^15.4.0",
15+
"node-fetch": "^2.6.7",
16+
"sinon": "^9.0.2",
17+
"@types/react": "18.0.8",
18+
"@types/react-dom": "18.0.2"
19+
},
20+
"dependencies": {
21+
"@sourcegraph/common": "workspace:*",
22+
"@sourcegraph/shared": "workspace:*",
23+
"@apollo/client": "^3.5.0",
24+
"apollo3-cache-persist": "^0.12.1",
25+
"delay": "^4.4.1",
26+
"lodash": "^4.17.20",
27+
"react": "18.1.0",
28+
"react-dom": "18.1.0",
29+
"rxjs": "^6.6.3",
30+
"utility-types": "^3.10.0"
1231
}
1332
}

client/jetbrains/package.json

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,47 @@
1515
"scripts": {
1616
"build": "pnpm task:gulp esbuild",
1717
"lint": "pnpm run lint:js && pnpm run lint:css",
18-
"lint:js": "pnpm run -T eslint --cache 'webview/**/*.[jt]s?(x)'",
19-
"lint:css": "pnpm run -T stylelint 'webview/**/*.scss'",
20-
"standalone": "pnpm run -T ts-node standalone/src/server.ts",
21-
"storybook": "STORIES_GLOB='client/jetbrains/webview/src/**/*.story.tsx' pnpm workspace @sourcegraph/storybook run start",
22-
"task:gulp": "pnpm run -T cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" gulp",
23-
"typecheck": "pnpm run -T tsc -b",
18+
"lint:js": "pnpm eslint --cache 'webview/**/*.[jt]s?(x)'",
19+
"lint:css": "pnpm stylelint 'webview/**/*.scss'",
20+
"standalone": "pnpm ts-node standalone/src/server.ts",
21+
"storybook": "STORIES_GLOB='client/jetbrains/webview/src/**/*.story.tsx' pnpm --filter @sourcegraph/storybook run start",
22+
"task:gulp": "pnpm cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" gulp",
23+
"typecheck": "pnpm tsc -b",
2424
"watch": "WATCH=true pnpm task:gulp esbuild"
25+
},
26+
"devDependencies": {
27+
"@sourcegraph/build-config": "workspace:*",
28+
"@sourcegraph/storybook": "workspace:*",
29+
"@sourcegraph/eslint-plugin-wildcard": "workspace:*",
30+
"buffer": "^6.0.3",
31+
"esbuild": "^0.16.10",
32+
"express": "^4.17.1",
33+
"jsdom": "^16.7.0",
34+
"process": "^0.11.10",
35+
"shelljs": "^0.8.4",
36+
"storybook-dark-mode": "^2.0.4",
37+
"ts-node": "^10.7.0",
38+
"@types/react": "18.0.8",
39+
"@types/react-dom": "18.0.2",
40+
"@storybook/react": "^6.5.14"
41+
},
42+
"dependencies": {
43+
"@sourcegraph/branded": "workspace:*",
44+
"@sourcegraph/shared": "workspace:*",
45+
"@sourcegraph/common": "workspace:*",
46+
"@sourcegraph/wildcard": "workspace:*",
47+
"@sourcegraph/http-client": "workspace:*",
48+
"@sourcegraph/search-ui": "workspace:*",
49+
"@mdi/js": "^6.7.96",
50+
"date-fns": "^2.16.1",
51+
"https-browserify": "^1.0.0",
52+
"js-base64": "^3.7.2",
53+
"mdi-react": "^8.1.0",
54+
"path-browserify": "^1.0.1",
55+
"react": "18.1.0",
56+
"react-dom": "18.1.0",
57+
"rxjs": "^6.6.3",
58+
"stream-http": "^3.2.0",
59+
"url": "^0.11.0"
2560
}
2661
}

client/observability-client/package.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,27 @@
77
"sideEffects": false,
88
"license": "Apache-2.0",
99
"scripts": {
10-
"lint:js": "pnpm run -T eslint --cache 'src/**/*.[jt]s?(x)'",
11-
"test": "pnpm run -T jest"
10+
"lint:js": "pnpm eslint --cache 'src/**/*.[jt]s?(x)'",
11+
"test": "pnpm jest"
12+
},
13+
"devDependencies": {
14+
"@types/react": "18.0.8",
15+
"@types/react-dom": "18.0.2"
16+
},
17+
"dependencies": {
18+
"@sourcegraph/common": "workspace:*",
19+
"@opentelemetry/api": "^1.1.0",
20+
"@opentelemetry/core": "1.5.0",
21+
"@opentelemetry/exporter-trace-otlp-http": "^0.31.0",
22+
"@opentelemetry/instrumentation": "^0.31.0",
23+
"@opentelemetry/instrumentation-fetch": "^0.31.0",
24+
"@opentelemetry/resources": "1.5.0",
25+
"@opentelemetry/sdk-trace-base": "1.5.0",
26+
"@opentelemetry/sdk-trace-web": "^1.5.0",
27+
"@opentelemetry/semantic-conventions": "^1.5.0",
28+
"is-absolute-url": "^3.0.3",
29+
"lodash": "^4.17.20",
30+
"react": "18.1.0",
31+
"react-dom": "18.1.0"
1232
}
1333
}

0 commit comments

Comments
 (0)