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

Commit ce38bbc

Browse files
web: fix pnpm-lock issue (#47478)
Fixes the issue caused by the presence of the `sourcegraph: ''` entry in the `pnpm-lock.yaml`. If we install any new dependency, the `pnpm install` command fails on CI. [Failure example](https://github.com/sourcegraph/sourcegraph/actions/runs/4121774771/jobs/7117792725).
1 parent 7954743 commit ce38bbc

33 files changed

+318
-296
lines changed

.npmrc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,4 @@ public-hoist-pattern[]=global
1515
# We have to hoist eslint packages to use them in the `.eslintrc` config.
1616
public-hoist-pattern[]=*eslint*
1717

18-
# npm_translate_lock with the yarn.lock file will complain about missing/incorrect peer dependencies.
19-
# Temporarily ignore warnings until we switch to pnpm and can user pnpm.packageExtensions to fix them.
20-
# https://pnpm.io/package_json#pnpmpackageextensions
2118
auto-install-peers=true
22-
strict-peer-dependencies=false

BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ts_config(
2929
visibility = ["//visibility:public"],
3030
deps = [
3131
"//:node_modules/@sourcegraph/tsconfig",
32-
"//:tsconfig.json",
32+
"//:tsconfig.base.json",
3333
],
3434
)
3535

client/branded/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"module": "commonjs",

client/browser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
},
3636
"devDependencies": {
3737
"@sourcegraph/build-config": "workspace:*",
38-
"@sourcegraph/extension-api-types": "workspace:*"
38+
"@sourcegraph/extension-api-types": "workspace:*",
39+
"sourcegraph": "workspace:*"
3940
},
4041
"dependencies": {
4142
"@sourcegraph/common": "workspace:*",

client/browser/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"baseUrl": ".",
@@ -37,6 +37,9 @@
3737
{
3838
"path": "../common",
3939
},
40+
{
41+
"path": "../extension-api",
42+
},
4043
{
4144
"path": "../extension-api-types",
4245
},

client/build-config/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/client-api/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"test": "jest"
1212
},
1313
"devDependencies": {
14-
"@sourcegraph/extension-api-types": "workspace:*"
14+
"@sourcegraph/extension-api-types": "workspace:*",
15+
"sourcegraph": "workspace:*"
1516
},
1617
"dependencies": {
1718
"@sourcegraph/template-parser": "workspace:*"

client/client-api/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"module": "commonjs",
@@ -12,6 +12,9 @@
1212
},
1313
},
1414
"references": [
15+
{
16+
"path": "../extension-api",
17+
},
1518
{
1619
"path": "../extension-api-types",
1720
},

client/codeintellify/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/common/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/extension-api-types/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"lint:js": "pnpm eslint 'src/**/*.[jt]s?(x)'",
2323
"prepublish": "pnpm eslint"
2424
},
25+
"devDependencies": {
26+
"sourcegraph": "workspace:*"
27+
},
2528
"peerDependencies": {
2629
"sourcegraph": "*"
2730
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "out",
55
"rootDir": "src",
66
},
77
"include": ["src/**/*"],
8+
"references": [
9+
{
10+
"path": "../extension-api",
11+
},
12+
],
813
}

client/extension-api/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"allowJs": true,
55
"outDir": "out",

client/http-client/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/jetbrains/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"target": "es2020",

client/observability-client/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"baseUrl": ".",

client/observability-server/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/shared/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"devDependencies": {
1616
"@sourcegraph/testing": "workspace:*",
1717
"@sourcegraph/build-config": "workspace:*",
18-
"@sourcegraph/extension-api-types": "workspace:*"
18+
"@sourcegraph/extension-api-types": "workspace:*",
19+
"sourcegraph": "workspace:*"
1920
},
2021
"dependencies": {
2122
"@sourcegraph/wildcard": "workspace:*",

client/shared/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"module": "commonjs",
@@ -24,6 +24,9 @@
2424
{
2525
"path": "../common",
2626
},
27+
{
28+
"path": "../extension-api",
29+
},
2730
{
2831
"path": "../extension-api-types",
2932
},

client/storybook/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/template-parser/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"sourceRoot": "src",

client/testing/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"references": [],
44
"compilerOptions": {
55
"jsx": "react-jsx",

client/vscode/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "commonjs",
55
"target": "es2020",

client/web/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"module": "esnext",
55
"baseUrl": ".",

client/wildcard/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"jsx": "react-jsx",
55
"module": "commonjs",

dev/release/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../../tsconfig.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"lib": ["esnext"],
55
"module": "commonjs",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"format": "prettier '**/{*.{js?(on),ts?(x),graphql,md,scss},.*.js?(on)}' --list-different --config prettier.config.js --write",
1616
"format:changed": "prettier $(git diff --diff-filter=d --name-only origin/main... && git ls-files --other --modified --exclude-standard | grep -E '\\.(js|json|ts|tsx|graphql|md|scss)$' | xargs) --write --list-different --config prettier.config.js",
1717
"format:check": "prettier '**/{*.{js?(on),ts?(x),graphql,md,scss},.*.js?(on)}' --config prettier.config.js --check --write=false",
18-
"format:tsconfig": "prettier --config prettier.config.js --write tsconfig.json 'client/*/tsconfig.json'",
18+
"format:tsconfig": "prettier --config prettier.config.js --write 'client/*/tsconfig.json'",
1919
"_lint:js": "DOCSITE_LIST=\"$(./dev/docsite.sh -config doc/docsite.json ls)\" NODE_OPTIONS=\"--max_old_space_size=16192\" eslint",
2020
"lint:js:changed": "pnpm _lint:js $(git diff --diff-filter=d --name-only origin/main... | grep -E '\\.[tj]sx?$' | xargs)",
2121
"lint:js:root": "pnpm run _lint:js --quiet '*.[tj]s?(x)'",
@@ -314,6 +314,7 @@
314314
"sinon": "^9.0.2",
315315
"socket.io": "^4.5.2",
316316
"socket.io-client": "^4.5.2",
317+
"sourcegraph": "workspace:*",
317318
"speed-measure-webpack-plugin": "^1.5.0",
318319
"storybook-addon-designs": "^6.3.1",
319320
"storybook-dark-mode": "^2.0.4",

0 commit comments

Comments
 (0)