-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix pnp indexing #262
Open
keynmol
wants to merge
6
commits into
main
Choose a base branch
from
fix-pnp-indexing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix pnp indexing #262
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ad39f87
Switch to Yarn Berry to fix Typescript working with PnP builds
keynmol 80606b5
Add integration tests on this repo + million.js
keynmol c9b6058
Revert TS downgrade
keynmol adffd50
Merge branch 'main' into fix-pnp-indexing
keynmol 757e17d
Bump to yarn 3.6.0, change what is checked in
keynmol 6e7f478
Make tests handle PnP
keynmol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
nodejs 16.7.0 | ||
nodejs 16.18.1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
yarn-path ".yarn/releases/yarn-1.22.19.cjs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
nodeLinker: pnp | ||
|
||
yarnPath: .yarn/releases/yarn-3.6.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,14 @@ | |
"publisher": "sourcegraph", | ||
"bin": "dist/src/main.js", | ||
"main": "./dist/src/main.js", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"prettier": "prettier --write --list-different '**/*.{ts,js?(on),md,yml}'", | ||
"prettier-check": "prettier --check '**/*.{ts,js?(on),md,yml}'", | ||
"tslint": "tslint -p tsconfig.json --format stylish", | ||
"eslint": "eslint --cache '**/*.ts?(x)'", | ||
"build": "node ./node_modules/typescript/bin/tsc -b .", | ||
"build": "tsc -b .", | ||
"index": "node dist/src/main.js index", | ||
"test": "uvu -r ts-node/register --ignore dist", | ||
"update-snapshots": "uvu -r ts-node/register --ignore dist --update-snapshots", | ||
"prepare": "cd snapshots && yarn && cd input/multi-project && yarn && cd ../pnpm-workspaces && pnpm install" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,130 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
# This file is generated by running "yarn install" inside your project. | ||
# Manual changes might be lost - proceed with caution! | ||
|
||
__metadata: | ||
version: 6 | ||
cacheKey: 8 | ||
|
||
"@sourcegraph/[email protected]": | ||
version "4.0.1" | ||
resolved "https://registry.yarnpkg.com/@sourcegraph/tsconfig/-/tsconfig-4.0.1.tgz#5965ec41771d2ac5b23b6e0d919cee3e70485840" | ||
integrity sha512-G/xsejsR84G5dj3kHJ7svKBo9E5tWl96rUHKP94Y2UDtA7BzUhAYbieM+b9ZUpIRt66h3+MlYbG5HK4UI2zDzw== | ||
"@example/a@workspace:input/multi-project/packages/a": | ||
version: 0.0.0-use.local | ||
resolution: "@example/a@workspace:input/multi-project/packages/a" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"@types/prop-types@*": | ||
version "15.7.4" | ||
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11" | ||
integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ== | ||
"@example/b@workspace:input/multi-project/packages/b": | ||
version: 0.0.0-use.local | ||
resolution: "@example/b@workspace:input/multi-project/packages/b" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"@types/[email protected]": | ||
version "17.0.52" | ||
resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.52.tgz#10d8b907b5c563ac014a541f289ae8eaa9bf2e9b" | ||
integrity sha512-vwk8QqVODi0VaZZpDXQCmEmiOuyjEFPY7Ttaw5vjM112LOq37yz1CDJGrRJwA1fYEq4Iitd5rnjd1yWAc/bT+A== | ||
"@sourcegraph/tsconfig@npm:4.0.1": | ||
version: 4.0.1 | ||
resolution: "@sourcegraph/tsconfig@npm:4.0.1" | ||
checksum: cd552b47dcf27b59e944dee20ff29e8f96b77c956bc96c7db44910217fb1c978ff410add86c92ff242274f91484b59b27be4980aea25c77fd922b3c5e31f5d05 | ||
languageName: node | ||
linkType: hard | ||
|
||
"@types/prop-types@npm:*": | ||
version: 15.7.4 | ||
resolution: "@types/prop-types@npm:15.7.4" | ||
checksum: ef6e1899e59b876c273811b1bd845022fc66d5a3d11cb38a25b6c566b30514ae38fe20a40f67622f362a4f4f7f9224e22d8da101cff3d6e97e11d7b4c307cfc1 | ||
languageName: node | ||
linkType: hard | ||
|
||
"@types/react@npm:17.0.52": | ||
version: 17.0.52 | ||
resolution: "@types/react@npm:17.0.52" | ||
dependencies: | ||
"@types/prop-types": "*" | ||
"@types/scheduler": "*" | ||
csstype: ^3.0.2 | ||
checksum: a51b98dd87838d161278fdf9dd78e6a4ff8c018f406d6647f77963e144fb52a8beee40c89fd0e7e840eaeaa8bd9fe2f34519410540b1a52d43a6f8b4d2fbce33 | ||
languageName: node | ||
linkType: hard | ||
|
||
"@types/scheduler@npm:*": | ||
version: 0.16.2 | ||
resolution: "@types/scheduler@npm:0.16.2" | ||
checksum: b6b4dcfeae6deba2e06a70941860fb1435730576d3689225a421280b7742318d1548b3d22c1f66ab68e414f346a9542f29240bc955b6332c5b11e561077583bc | ||
languageName: node | ||
linkType: hard | ||
|
||
"csstype@npm:^3.0.2": | ||
version: 3.0.11 | ||
resolution: "csstype@npm:3.0.11" | ||
checksum: 95e56abfe9ca219ae065acb4e43f61771a03170eed919127f558dfa168240867aba7629c8d98a201a0dd06d9a5ce82686f0570031c928516c61816adbc7c877f | ||
languageName: node | ||
linkType: hard | ||
|
||
"invalid-package-json@workspace:input/invalid-package-json": | ||
version: 0.0.0-use.local | ||
resolution: "invalid-package-json@workspace:input/invalid-package-json" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"js-tokens@npm:^3.0.0 || ^4.0.0": | ||
version: 4.0.0 | ||
resolution: "js-tokens@npm:4.0.0" | ||
checksum: 8a95213a5a77deb6cbe94d86340e8d9ace2b93bc367790b260101d2f36a2eaf4e4e22d9fa9cf459b38af3a32fb4190e638024cf82ec95ef708680e405ea7cc78 | ||
languageName: node | ||
linkType: hard | ||
|
||
"loose-envify@npm:^1.1.0": | ||
version: 1.4.0 | ||
resolution: "loose-envify@npm:1.4.0" | ||
dependencies: | ||
"@types/prop-types" "*" | ||
"@types/scheduler" "*" | ||
csstype "^3.0.2" | ||
|
||
"@types/scheduler@*": | ||
version "0.16.2" | ||
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" | ||
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== | ||
|
||
csstype@^3.0.2: | ||
version "3.0.11" | ||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.11.tgz#d66700c5eacfac1940deb4e3ee5642792d85cd33" | ||
integrity sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw== | ||
|
||
"js-tokens@^3.0.0 || ^4.0.0": | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" | ||
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== | ||
|
||
loose-envify@^1.1.0: | ||
version "1.4.0" | ||
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" | ||
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== | ||
js-tokens: ^3.0.0 || ^4.0.0 | ||
bin: | ||
loose-envify: cli.js | ||
checksum: 6517e24e0cad87ec9888f500c5b5947032cdfe6ef65e1c1936a0c48a524b81e65542c9c3edc91c97d5bddc806ee2a985dbc79be89215d613b1de5db6d1cfe6f4 | ||
languageName: node | ||
linkType: hard | ||
|
||
"multi-project@workspace:input/multi-project": | ||
version: 0.0.0-use.local | ||
resolution: "multi-project@workspace:input/multi-project" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"pnpm-workspaces@workspace:input/pnpm-workspaces": | ||
version: 0.0.0-use.local | ||
resolution: "pnpm-workspaces@workspace:input/pnpm-workspaces" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"pure-js@workspace:input/pure-js": | ||
version: 0.0.0-use.local | ||
resolution: "pure-js@workspace:input/pure-js" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"react-example@workspace:input/react": | ||
version: 0.0.0-use.local | ||
resolution: "react-example@workspace:input/react" | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"react@npm:18.0.0": | ||
version: 18.0.0 | ||
resolution: "react@npm:18.0.0" | ||
dependencies: | ||
js-tokens "^3.0.0 || ^4.0.0" | ||
loose-envify: ^1.1.0 | ||
checksum: 293020b96536b3c7113ee57ca5c990a3f25649d1751b1c7a3aabd16dff0691fe9f1eed1206616d0906d05933536052037340a0c8d0941ff870b0eb469a2f975b | ||
languageName: node | ||
linkType: hard | ||
|
||
[email protected]: | ||
version "18.0.0" | ||
resolved "https://registry.yarnpkg.com/react/-/react-18.0.0.tgz#b468736d1f4a5891f38585ba8e8fb29f91c3cb96" | ||
integrity sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A== | ||
"snapshots@workspace:.": | ||
version: 0.0.0-use.local | ||
resolution: "snapshots@workspace:." | ||
dependencies: | ||
loose-envify "^1.1.0" | ||
"@sourcegraph/tsconfig": 4.0.1 | ||
"@types/react": 17.0.52 | ||
react: 18.0.0 | ||
languageName: unknown | ||
linkType: soft | ||
|
||
"syntax@workspace:input/syntax": | ||
version: 0.0.0-use.local | ||
resolution: "syntax@workspace:input/syntax" | ||
languageName: unknown | ||
linkType: soft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, what makes it harder to use the patch package without migrating the repo to yarn berry with PnP enabled? (maybe it's impossible, but it's clear from the outside why 🙂)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several things going on:
All this hairball means that in order to apply the typescript patch I had to switch to Yarn 3.x in this project (so that TS patch is applied automatically), but that led ot other issues needing fixing.
I'm currently stuck at what appears to be that something with regards to module resolution is still broken - but it no longer happens in
tsconfig.json
(which was the original problem), but it happens when analysing the code itself - imports from modules just become local definitions, which is wrong.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just use this thread as a brain dump
I have a hunch that current issue with missing imports is related to PnP in the following way:
As a stop gap solution, we could just change
nodeLinker
tonode-modules
before yarn install.Yarn docs warn against it, and we will be operating on a dirty codebase, but IMO this will be so much quicker to fix.