diff --git a/.pnp.cjs b/.pnp.cjs index a1b6d2c70ade..1a769d037466 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -285,7 +285,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["jest-junit", "npm:10.0.0"], ["micromatch", "npm:4.0.2"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -8131,10 +8131,20 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }] ]], ["@types/lodash", [ - ["npm:4.14.168", { - "packageLocation": "./.yarn/cache/@types-lodash-npm-4.14.168-2d65abe211-3326966ee0.zip/node_modules/@types/lodash/", + ["npm:4.14.172", { + "packageLocation": "./.yarn/cache/@types-lodash-npm-4.14.172-e52063c461-5fc51ea40d.zip/node_modules/@types/lodash/", "packageDependencies": [ - ["@types/lodash", "npm:4.14.168"] + ["@types/lodash", "npm:4.14.172"] + ], + "linkType": "HARD", + }] + ]], + ["@types/lodash-es", [ + ["npm:4.17.4", { + "packageLocation": "./.yarn/cache/@types-lodash-es-npm-4.17.4-feabb24815-acffe910e8.zip/node_modules/@types/lodash-es/", + "packageDependencies": [ + ["@types/lodash-es", "npm:4.17.4"], + ["@types/lodash", "npm:4.14.172"] ], "linkType": "HARD", }] @@ -8736,7 +8746,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["regexpp", "npm:3.1.0"], ["semver", "npm:7.3.5"], ["tsutils", "virtual:f9757ae319815ac0f58d42cf0a9c6d8c36be107ea9d2a7c2404a1a7ed67a935a83935258cd26663439e607a4f7f3b48b0bf3ac24d96805420bec678b31011fdd#npm:3.21.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/eslint", @@ -8886,7 +8896,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@typescript-eslint/typescript-estree", "virtual:e284df35cb54dbfcce36759498ed7ad082403dc825086cd5446a08b29d71ed1215922139a42316fa9353bee746689d467f5ab3f50890a5572764bdcc83192b8e#npm:4.26.1"], ["debug", "virtual:5dffae5dceca8d383e37ce1404983ff3eaf566153fb551aede58a16b625356caee63d9240a4386c2b8b44a2ff32b72c5d4444045ea31775b520ccbc9788f7985#npm:4.3.2"], ["eslint", "npm:6.8.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/eslint", @@ -8991,7 +9001,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["is-glob", "npm:4.0.1"], ["semver", "npm:7.3.5"], ["tsutils", "virtual:f9757ae319815ac0f58d42cf0a9c6d8c36be107ea9d2a7c2404a1a7ed67a935a83935258cd26663439e607a4f7f3b48b0bf3ac24d96805420bec678b31011fdd#npm:3.21.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "typescript" @@ -9469,7 +9479,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["terser-webpack-plugin", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:3.0.4"], ["ts-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:7.0.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9510,7 +9520,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["terser-webpack-plugin", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:3.0.4"], ["ts-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:7.0.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9551,7 +9561,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["terser-webpack-plugin", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:3.0.4"], ["ts-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:7.0.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9591,7 +9601,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["terser-webpack-plugin", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:3.0.4"], ["ts-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:7.0.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9638,7 +9648,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9685,7 +9695,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9732,7 +9742,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9779,7 +9789,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9826,7 +9836,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9873,7 +9883,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9920,7 +9930,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9967,7 +9977,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10014,7 +10024,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10061,7 +10071,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10108,7 +10118,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10155,7 +10165,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10201,7 +10211,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["yup", "npm:0.32.9"] ], "linkType": "SOFT", @@ -10218,7 +10228,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/ci-info", "npm:2.0.0"], ["@types/cross-spawn", "npm:6.0.0"], ["@types/diff", "npm:4.0.2"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/node", "npm:13.7.0"], ["@types/semver", "npm:7.1.0"], @@ -10283,7 +10293,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["micromatch", "npm:4.0.2"], ["p-limit", "npm:2.2.0"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -10334,7 +10344,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["eslint", "npm:6.8.0"], ["eslint-plugin-arca", "npm:0.10.0"], ["eslint-plugin-react", "virtual:4b728ee22ccd3ae66b83e3be6d39acfb5b7a775112cc78b6b4322feb849fcfe6e39510452356cb4477dc6089bee57db31d02bbfb03b9fc8e914effa16a4145be#npm:7.24.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/eslint", @@ -10389,7 +10399,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/indent-string", "npm:4.0.1"], ["@types/json-schema", "npm:7.0.7"], ["@types/loadable__component", "npm:5.10.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/marked", "npm:1.1.0"], ["@types/react", "npm:16.9.2"], ["@types/react-helmet", "npm:6.1.0"], @@ -10457,7 +10467,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["typedoc", "virtual:118b26a6cee620b5aa3e7e8d8b8e34cd9e486f75b92701001168da9be550fadd8c9d9b12643c642e2d528c2624fd8fe7e128eec9d715340efac44400432a0e0c#npm:0.17.0-3"], ["typedoc-neo-theme", "npm:1.0.7"], ["typedoc-plugin-yarn", "portal:./typedoc-plugin-yarn::locator=%40yarnpkg%2Fgatsby%40workspace%3Apackages%2Fgatsby"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["unescape-html", "npm:1.1.0"], ["unfetch", "npm:4.1.0"], ["unified", "npm:7.1.0"], @@ -10560,7 +10570,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["jest-junit", "npm:10.0.0"], ["micromatch", "npm:4.0.2"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -10595,6 +10605,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-4a5b883314/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:16f564b30745199d7e07a913c371ce0c078051290c6e08b972f07b3f1bf057a6993fe67b7c6ee24931d0b1dd67e1274151612081733a79b961dd8336318fdfb9#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10619,6 +10630,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-b605a03544/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:1c3d72c6b31a8950672985f8306a860ecc80c9a006aac95cf4a7ba13a6e7cc4e095e37186a53c9909e9efe97bc0f7f570a74b3879778e2a2356cdcf407120006#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10643,6 +10655,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-b70719e1cf/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:2351fd5ac4f83ad35b714d8af9fdeea561ada341d529d0dba50742dd5735dc3750df6c56bd680e14833d5b987026a1eab6618211ea0ef1b34b727372b3c77bc9#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10667,6 +10680,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-6f8b2cc32d/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:45a6746f11cef24d8db9429cc5650999571e6bb77a8cfb3904a0e832f542be35246ec490516049308ca15b8678eb03bcf394199e514a8145ec32731af7235c91#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10691,6 +10705,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-5fe64685a8/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:4864d30fc563f2fd1b72a5e3869493c5f50bf38f98ed3886173d80c044d981c3f68220dbf17f2b5fc5b4c5fba7d0af2e003926efe3487086484049f41c449852#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10715,6 +10730,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-adab3602d7/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:83b7a14498f70e120fb6f455fa263877f0d2954cbb68f3216e842cf37532afa9fe7895f2327708b45ae12ab75df0f3b07ed6e746fa7001bc6460dba7aaf38d31#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10739,6 +10755,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-08fe6ad7a7/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:a7c38e9a420fd3b408ea245831c2c9f0e880eac64b268fab3219f5f0b1d6015f44b1f92d23aabfc6e980bbbbda00a23e9faa983fb98544fab94119ccd31f2440#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10763,6 +10780,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-4e0e483559/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:adaf1cec8728346f1bf6a263f1954625a52d60518b8d2084da8a926203282105d2b95fb9da84922062af8d4fc84b8a1c39f220238424024e56f55577bdbc7208#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10787,6 +10805,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-bc7b846a45/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:b4c0e602e8ac4e01a7b08db41bb5808da767dd1f6802758faa5125fb2423614bb0a8806ee1b30c3a0769f86da15ad37377f5118d93cd93fa48df0008a448fb35#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10811,6 +10830,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-506110722c/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:c44c4b6360dc34d25da6d32e39622e7e40f36f37b99dc66b6ebbd615fdd49465f496bf10f81b6fa5f71b95443fda61174ad51d2799fc7ca433af9a9666cd0f37#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10835,6 +10855,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-f9d90af7d7/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:cd2af72718007566941ac9f5a6def4d055c38029c95c3ac065493603e6055c1d77b2f2df752588114932973488b5a566f49b00118e7e12f48aa0798ea38cc15b#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10859,6 +10880,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-9d09146e76/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:d1d72d9e3903ca8b8d9c23a360395cc764db2689e5992ef9af91c79f03a839db10ec675af9e4c1c8f4842aff1a614eb5b115fcc0afe8256630151ef1252de94b#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10883,6 +10905,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-compat-virtual-10001d27b8/1/packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "virtual:f8376ca2bc11738adced76b97627e7eff07ec08f93f5b76caf8d6bd4f78f5ae9c1911cb9d1a0bd256ef3e0601dedeba933acf0d2381588b6513ee81e25626459#workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@types/yarnpkg__core", null], ["@types/yarnpkg__plugin-patch", null], @@ -10907,6 +10930,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/plugin-compat/", "packageDependencies": [ ["@yarnpkg/plugin-compat", "workspace:packages/plugin-compat"], + ["@types/lodash-es", "npm:4.17.4"], ["@types/resolve", "npm:1.17.1"], ["@yarnpkg/cli", "virtual:f4e4f4a9a0213f122880195b39adaee7de5cb560c1d806ebc8bace6a3124e5b8f820bbb89ebecd4d535caeb6f527d343143210aa405689c118ff2813b78998a0#workspace:packages/yarnpkg-cli"], ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], @@ -10925,7 +10949,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/plugin-constraints/", "packageDependencies": [ ["@yarnpkg/plugin-constraints", "workspace:packages/plugin-constraints"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@yarnpkg/builder", "virtual:c44c4b6360dc34d25da6d32e39622e7e40f36f37b99dc66b6ebbd615fdd49465f496bf10f81b6fa5f71b95443fda61174ad51d2799fc7ca433af9a9666cd0f37#workspace:packages/yarnpkg-builder"], ["@yarnpkg/cli", "virtual:7bf4ad1016291a7e1c04756f55760890095421dd1b945930b62d8d0464c365d1cdce28ed812277b54dc54443922ac82afd5e98ed7f1d218ae7753d16e21541bb#workspace:packages/yarnpkg-cli"], ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], @@ -10935,7 +10959,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["node-emoji", "npm:1.10.0"], ["tau-prolog", "npm:0.2.66"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -11234,7 +11258,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:16f564b30745199d7e07a913c371ce0c078051290c6e08b972f07b3f1bf057a6993fe67b7c6ee24931d0b1dd67e1274151612081733a79b961dd8336318fdfb9#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11267,7 +11291,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:1c3d72c6b31a8950672985f8306a860ecc80c9a006aac95cf4a7ba13a6e7cc4e095e37186a53c9909e9efe97bc0f7f570a74b3879778e2a2356cdcf407120006#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11300,7 +11324,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:2351fd5ac4f83ad35b714d8af9fdeea561ada341d529d0dba50742dd5735dc3750df6c56bd680e14833d5b987026a1eab6618211ea0ef1b34b727372b3c77bc9#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11333,7 +11357,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:45a6746f11cef24d8db9429cc5650999571e6bb77a8cfb3904a0e832f542be35246ec490516049308ca15b8678eb03bcf394199e514a8145ec32731af7235c91#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11366,7 +11390,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:4864d30fc563f2fd1b72a5e3869493c5f50bf38f98ed3886173d80c044d981c3f68220dbf17f2b5fc5b4c5fba7d0af2e003926efe3487086484049f41c449852#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11399,7 +11423,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:83b7a14498f70e120fb6f455fa263877f0d2954cbb68f3216e842cf37532afa9fe7895f2327708b45ae12ab75df0f3b07ed6e746fa7001bc6460dba7aaf38d31#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11432,7 +11456,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:a7c38e9a420fd3b408ea245831c2c9f0e880eac64b268fab3219f5f0b1d6015f44b1f92d23aabfc6e980bbbbda00a23e9faa983fb98544fab94119ccd31f2440#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11465,7 +11489,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:adaf1cec8728346f1bf6a263f1954625a52d60518b8d2084da8a926203282105d2b95fb9da84922062af8d4fc84b8a1c39f220238424024e56f55577bdbc7208#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11498,7 +11522,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:b4c0e602e8ac4e01a7b08db41bb5808da767dd1f6802758faa5125fb2423614bb0a8806ee1b30c3a0769f86da15ad37377f5118d93cd93fa48df0008a448fb35#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11531,7 +11555,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:c44c4b6360dc34d25da6d32e39622e7e40f36f37b99dc66b6ebbd615fdd49465f496bf10f81b6fa5f71b95443fda61174ad51d2799fc7ca433af9a9666cd0f37#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11564,7 +11588,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:cd2af72718007566941ac9f5a6def4d055c38029c95c3ac065493603e6055c1d77b2f2df752588114932973488b5a566f49b00118e7e12f48aa0798ea38cc15b#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11597,7 +11621,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:d1d72d9e3903ca8b8d9c23a360395cc764db2689e5992ef9af91c79f03a839db10ec675af9e4c1c8f4842aff1a614eb5b115fcc0afe8256630151ef1252de94b#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11630,7 +11654,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "virtual:f8376ca2bc11738adced76b97627e7eff07ec08f93f5b76caf8d6bd4f78f5ae9c1911cb9d1a0bd256ef3e0601dedeba933acf0d2381588b6513ee81e25626459#workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11663,7 +11687,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/plugin-essentials", "workspace:packages/plugin-essentials"], ["@types/ci-info", "npm:2.0.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/micromatch", "npm:4.0.1"], ["@types/semver", "npm:7.1.0"], ["@types/treeify", "npm:1.0.0"], @@ -11693,7 +11717,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -11824,7 +11848,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-413d1bb7ba/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:16f564b30745199d7e07a913c371ce0c078051290c6e08b972f07b3f1bf057a6993fe67b7c6ee24931d0b1dd67e1274151612081733a79b961dd8336318fdfb9#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:f4e4f4a9a0213f122880195b39adaee7de5cb560c1d806ebc8bace6a3124e5b8f820bbb89ebecd4d535caeb6f527d343143210aa405689c118ff2813b78998a0#workspace:packages/yarnpkg-cli"], @@ -11846,7 +11870,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-29dac376fa/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:1c3d72c6b31a8950672985f8306a860ecc80c9a006aac95cf4a7ba13a6e7cc4e095e37186a53c9909e9efe97bc0f7f570a74b3879778e2a2356cdcf407120006#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:14a22fb3831dfc762a1bb8a042d17886271c56698e1a83233f09eaacff5a5b83fe6f87adb9255774eab3586392c18ff98cf87aa6b374d572d9b72f88829f6d9e#workspace:packages/yarnpkg-cli"], @@ -11868,7 +11892,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-cc1830b59a/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:2351fd5ac4f83ad35b714d8af9fdeea561ada341d529d0dba50742dd5735dc3750df6c56bd680e14833d5b987026a1eab6618211ea0ef1b34b727372b3c77bc9#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:616a2ba0d005227805d037f4c8ec29f1dd09fdb3e3f49f7b5c4a07a62139a147d373d38bc5ebcb31bddab3956c3fc25d54edf8722741d9ebdbe9d36d21968f91#workspace:packages/yarnpkg-cli"], @@ -11890,7 +11914,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-97d4ea4b25/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:45a6746f11cef24d8db9429cc5650999571e6bb77a8cfb3904a0e832f542be35246ec490516049308ca15b8678eb03bcf394199e514a8145ec32731af7235c91#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:ef8e1544cc953676e27fe7445218564293b5a190d023e4610c14767688870b772297269e2848a1d8d72f54605aacc9da3b2b7dc56dca754d297b70b14e6a665e#workspace:packages/yarnpkg-cli"], @@ -11912,7 +11936,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-bb60ce87e8/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:4864d30fc563f2fd1b72a5e3869493c5f50bf38f98ed3886173d80c044d981c3f68220dbf17f2b5fc5b4c5fba7d0af2e003926efe3487086484049f41c449852#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "workspace:packages/yarnpkg-cli"], @@ -11934,7 +11958,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-6107c259fb/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:83b7a14498f70e120fb6f455fa263877f0d2954cbb68f3216e842cf37532afa9fe7895f2327708b45ae12ab75df0f3b07ed6e746fa7001bc6460dba7aaf38d31#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:5d170a96e3bd35439131aba7820e7b850e9381656d638624d34e228d96fc2f134ebf73b7eb6235db8cb822a7bcd252e04750d4dfcaeb49408c4e561390950138#workspace:packages/yarnpkg-cli"], @@ -11956,7 +11980,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-682df30633/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:a7c38e9a420fd3b408ea245831c2c9f0e880eac64b268fab3219f5f0b1d6015f44b1f92d23aabfc6e980bbbbda00a23e9faa983fb98544fab94119ccd31f2440#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:a027ddc7edcbf74025e90effce333897039d2c6f8e1ebe319fb72c52c5be1b885da91acc56476d19bb6ce2e31cbc2d5b11241940b82f833a2cac262496c0088f#workspace:packages/yarnpkg-cli"], @@ -11978,7 +12002,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-082d4d1ed3/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:adaf1cec8728346f1bf6a263f1954625a52d60518b8d2084da8a926203282105d2b95fb9da84922062af8d4fc84b8a1c39f220238424024e56f55577bdbc7208#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:cfce476fbcac37853570c2d41665757b5f868b1c2f089ee6edbc8bb5aa32141e156cae7d75350d1095258d90afbabe2b2bb142142b995d133c3ee535c89d459b#workspace:packages/yarnpkg-cli"], @@ -12000,7 +12024,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-59486ea49a/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:b4c0e602e8ac4e01a7b08db41bb5808da767dd1f6802758faa5125fb2423614bb0a8806ee1b30c3a0769f86da15ad37377f5118d93cd93fa48df0008a448fb35#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:3f21a2572d1fa6d1ff8d16d86e25bcefcbff7d17161c440fdbddbd871d9d675c377d66a2cbd98ddb8f2c024060bc7bc6c01e8ae328fa1fef861c72a9b2c30755#workspace:packages/yarnpkg-cli"], @@ -12022,7 +12046,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-318d681a0f/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:c44c4b6360dc34d25da6d32e39622e7e40f36f37b99dc66b6ebbd615fdd49465f496bf10f81b6fa5f71b95443fda61174ad51d2799fc7ca433af9a9666cd0f37#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:7bf4ad1016291a7e1c04756f55760890095421dd1b945930b62d8d0464c365d1cdce28ed812277b54dc54443922ac82afd5e98ed7f1d218ae7753d16e21541bb#workspace:packages/yarnpkg-cli"], @@ -12044,7 +12068,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-39bcb727de/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:cd2af72718007566941ac9f5a6def4d055c38029c95c3ac065493603e6055c1d77b2f2df752588114932973488b5a566f49b00118e7e12f48aa0798ea38cc15b#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#workspace:packages/yarnpkg-cli"], @@ -12066,7 +12090,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-6d07f9c983/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:d1d72d9e3903ca8b8d9c23a360395cc764db2689e5992ef9af91c79f03a839db10ec675af9e4c1c8f4842aff1a614eb5b115fcc0afe8256630151ef1252de94b#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:743b60015fc887fe314a7ee01ea4843b516ac512d77939f47dc39d50bc7db742dc8994fe9bb2245ada0b3ce6f8aa58329d603fbc24093050cd499cb16a1a995f#workspace:packages/yarnpkg-cli"], @@ -12088,7 +12112,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./.yarn/__virtual__/@yarnpkg-plugin-init-virtual-8ab3e1714c/1/packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "virtual:f8376ca2bc11738adced76b97627e7eff07ec08f93f5b76caf8d6bd4f78f5ae9c1911cb9d1a0bd256ef3e0601dedeba933acf0d2381588b6513ee81e25626459#workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/yarnpkg__cli", null], ["@types/yarnpkg__core", null], ["@yarnpkg/cli", "virtual:4a733c8d9614e2148392368219d98ec1a70b4e8ce99164edd551241b22f6c5233e9d0ccf9f6d83265c8a5aafc617cfd3c4100b3efef1e092a42053c23770ed9a#workspace:packages/yarnpkg-cli"], @@ -12110,7 +12134,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/plugin-init/", "packageDependencies": [ ["@yarnpkg/plugin-init", "workspace:packages/plugin-init"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@yarnpkg/cli", "virtual:14a22fb3831dfc762a1bb8a042d17886271c56698e1a83233f09eaacff5a5b83fe6f87adb9255774eab3586392c18ff98cf87aa6b374d572d9b72f88829f6d9e#workspace:packages/yarnpkg-cli"], ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], @@ -12142,7 +12166,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react", "npm:16.13.1"], ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -14427,7 +14451,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14449,7 +14473,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14471,7 +14495,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14493,7 +14517,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14515,7 +14539,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14537,7 +14561,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14559,7 +14583,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14581,7 +14605,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14603,7 +14627,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14625,7 +14649,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14647,7 +14671,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14669,7 +14693,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14691,7 +14715,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14711,7 +14735,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["clipanion", "virtual:02f08ef8b8f3af06d08a146e8941d7fef41abbe0f441d85250a110dd2773e679dff502bd7763f42309743e1ddb33847a4bc3aab82132068c9954ae25f4c4bce5#npm:3.0.1"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -14731,7 +14755,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["algoliasearch", "npm:4.2.0"], ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -14741,7 +14765,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/plugin-version/", "packageDependencies": [ ["@yarnpkg/plugin-version", "workspace:packages/plugin-version"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/react", "npm:16.9.2"], ["@types/semver", "npm:7.1.0"], ["@yarnpkg/builder", "virtual:c44c4b6360dc34d25da6d32e39622e7e40f36f37b99dc66b6ebbd615fdd49465f496bf10f81b6fa5f71b95443fda61174ad51d2799fc7ca433af9a9666cd0f37#workspace:packages/yarnpkg-builder"], @@ -14756,7 +14780,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react", "npm:16.13.1"], ["semver", "npm:7.3.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -14776,7 +14800,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["p-limit", "npm:2.2.0"], ["tslib", "npm:1.13.0"], ["typanion", "npm:3.3.2"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "SOFT", }] @@ -14793,7 +14817,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/monorepo", "workspace:."], ["resolve.exports", "npm:1.0.2"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["webpack", "virtual:16110bda3ce959c103b1979c5d750ceb8ac9cfbd2049c118b6278e46e65aa65fd17e71e04a0ce5f75b7ca3203efd8e9c9b03c948a76c7f4bca807539915b5cfc#npm:5.38.1"], ["webpack-cli", "virtual:16110bda3ce959c103b1979c5d750ceb8ac9cfbd2049c118b6278e46e65aa65fd17e71e04a0ce5f75b7ca3203efd8e9c9b03c948a76c7f4bca807539915b5cfc#npm:4.0.0-beta.8"] ], @@ -14824,7 +14848,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["@yarnpkg/sdks", "workspace:packages/yarnpkg-sdks"], ["@types/comment-json", "npm:1.1.1"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], ["@yarnpkg/fslib", "workspace:packages/yarnpkg-fslib"], ["@yarnpkg/monorepo", "workspace:."], @@ -19744,7 +19768,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/debug", "npm:0.0.30"], ["@types/get-port", "npm:3.2.0"], ["@types/glob", "npm:5.0.36"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/mkdirp", "npm:0.5.2"], ["@types/node", "npm:8.10.60"], ["@types/rimraf", "npm:2.0.4"], @@ -22364,7 +22388,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["schema-utils", "npm:1.0.0"], ["semver", "npm:5.7.1"], ["tapable", "npm:1.1.3"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["vue-template-compiler", null], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"] ], @@ -29425,7 +29449,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react-dom", "virtual:118b26a6cee620b5aa3e7e8d8b8e34cd9e486f75b92701001168da9be550fadd8c9d9b12643c642e2d528c2624fd8fe7e128eec9d715340efac44400432a0e0c#npm:16.13.1"], ["react-lifecycles-compat", "npm:3.0.4"], ["shallowequal", "npm:1.1.0"], - ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8"] ], "packagePeers": [ "@types/react-dom", @@ -31744,7 +31768,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageLocation": "./packages/acceptance-tests/pkg-tests-specs/", "packageDependencies": [ ["pkg-tests-specs", "workspace:packages/acceptance-tests/pkg-tests-specs"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["@types/tar", "npm:4.0.4"], ["@yarnpkg/cli", "virtual:7bf4ad1016291a7e1c04756f55760890095421dd1b945930b62d8d0464c365d1cdce28ed812277b54dc54443922ac82afd5e98ed7f1d218ae7753d16e21541bb#workspace:packages/yarnpkg-cli"], ["@yarnpkg/core", "workspace:packages/yarnpkg-core"], @@ -37938,7 +37962,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["loader-utils", "npm:1.4.0"], ["micromatch", "npm:4.0.2"], ["semver", "npm:6.3.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/typescript", @@ -38068,7 +38092,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["tsutils", "virtual:f9757ae319815ac0f58d42cf0a9c6d8c36be107ea9d2a7c2404a1a7ed67a935a83935258cd26663439e607a4f7f3b48b0bf3ac24d96805420bec678b31011fdd#npm:3.21.0"], ["@types/typescript", null], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@types/typescript", @@ -38307,7 +38331,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["typedoc-default-themes", "npm:0.8.0-0"], ["typedoc-neo-theme", "npm:1.0.7"], ["typedoc-plugin-yarn", "portal:./typedoc-plugin-yarn::locator=%40yarnpkg%2Fgatsby%40workspace%3Apackages%2Fgatsby"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38336,7 +38360,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["typedoc-default-themes", "npm:0.8.0-0"], ["typedoc-neo-theme", null], ["typedoc-plugin-yarn", "portal:./typedoc-plugin-yarn::locator=%40yarnpkg%2Fgatsby%40workspace%3Apackages%2Fgatsby"], - ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38364,7 +38388,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["typedoc-default-themes", "npm:0.7.2"], ["typedoc-neo-theme", "npm:1.0.7"], ["typedoc-plugin-yarn", null], - ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=ddd1e8"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38414,30 +38438,30 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["typedoc-plugin-yarn", "portal:./typedoc-plugin-yarn::locator=%40yarnpkg%2Fgatsby%40workspace%3Apackages%2Fgatsby"], ["typedoc", "virtual:258c95d7dd1da51c9c624f238593e0bc1c34b7bd8de0b85fefd9552f2220a4555cad458eb72d96f0c7b341784726b6a8e9c8b4e838a9d27aac3796b29de01981#npm:0.17.0-3"], - ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8"] ], "linkType": "SOFT", }] ]], ["typescript", [ - ["patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=6454cb", { - "packageLocation": "./.yarn/cache/typescript-patch-8e852309b9-6a82cb02b2.zip/node_modules/typescript/", + ["patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=ddd1e8", { + "packageLocation": "./.yarn/cache/typescript-patch-34e019a968-6a82cb02b2.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=ddd1e8"] ], "linkType": "HARD", }], - ["patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb", { - "packageLocation": "./.yarn/cache/typescript-patch-c728ca43af-bfea14f536.zip/node_modules/typescript/", + ["patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8", { + "packageLocation": "./.yarn/cache/typescript-patch-63659b642f-bfea14f536.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8"] ], "linkType": "HARD", }], - ["patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb", { - "packageLocation": "./.yarn/cache/typescript-patch-a6e5645c81-120b3cc2f0.zip/node_modules/typescript/", + ["patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8", { + "packageLocation": "./.yarn/cache/typescript-patch-38108386de-1f30617046.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"] + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"] ], "linkType": "HARD", }] @@ -39435,7 +39459,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@yarnpkg/pnpify", "workspace:packages/yarnpkg-pnpify"], ["ts-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:7.0.5"], ["tslib", "npm:1.13.0"], - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb"], + ["typescript", "patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8"], ["vsce", "npm:1.85.1"], ["webpack", "virtual:4bb0e72ae00ec402a28e80560124ee13357b1a5221665b7175877ddc6b8b2b98eebe4584a111245801ecf7cecb9de577d076505c0dbcf9292aaff35440a2302f#npm:5.38.1"], ["webpack-cli", "virtual:4bb0e72ae00ec402a28e80560124ee13357b1a5221665b7175877ddc6b8b2b98eebe4584a111245801ecf7cecb9de577d076505c0dbcf9292aaff35440a2302f#npm:4.0.0-beta.8"] @@ -40825,7 +40849,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [ ["yup", "npm:0.32.9"], ["@babel/runtime", "npm:7.14.0"], - ["@types/lodash", "npm:4.14.168"], + ["@types/lodash", "npm:4.14.172"], ["lodash", "npm:4.17.21"], ["lodash-es", "npm:4.17.21"], ["nanoclone", "npm:0.2.1"], diff --git a/.yarn/cache/@types-lodash-es-npm-4.17.4-feabb24815-acffe910e8.zip b/.yarn/cache/@types-lodash-es-npm-4.17.4-feabb24815-acffe910e8.zip new file mode 100644 index 000000000000..8b380f660b27 Binary files /dev/null and b/.yarn/cache/@types-lodash-es-npm-4.17.4-feabb24815-acffe910e8.zip differ diff --git a/.yarn/cache/@types-lodash-npm-4.14.168-2d65abe211-3326966ee0.zip b/.yarn/cache/@types-lodash-npm-4.14.172-e52063c461-5fc51ea40d.zip similarity index 64% rename from .yarn/cache/@types-lodash-npm-4.14.168-2d65abe211-3326966ee0.zip rename to .yarn/cache/@types-lodash-npm-4.14.172-e52063c461-5fc51ea40d.zip index 5edd78a7a187..558cf9ddcb81 100644 Binary files a/.yarn/cache/@types-lodash-npm-4.14.168-2d65abe211-3326966ee0.zip and b/.yarn/cache/@types-lodash-npm-4.14.172-e52063c461-5fc51ea40d.zip differ diff --git a/.yarn/cache/typescript-npm-4.3.2-d108b26f78-c2a86fa03c.zip b/.yarn/cache/typescript-npm-4.3.2-d108b26f78-c2a86fa03c.zip deleted file mode 100644 index aa820d056421..000000000000 Binary files a/.yarn/cache/typescript-npm-4.3.2-d108b26f78-c2a86fa03c.zip and /dev/null differ diff --git a/.yarn/cache/typescript-npm-4.4.2-8c784d6e94-194e08e9d1.zip b/.yarn/cache/typescript-npm-4.4.2-8c784d6e94-194e08e9d1.zip new file mode 100644 index 000000000000..7ccf7d06f644 Binary files /dev/null and b/.yarn/cache/typescript-npm-4.4.2-8c784d6e94-194e08e9d1.zip differ diff --git a/.yarn/cache/typescript-patch-8e852309b9-6a82cb02b2.zip b/.yarn/cache/typescript-patch-34e019a968-6a82cb02b2.zip similarity index 100% rename from .yarn/cache/typescript-patch-8e852309b9-6a82cb02b2.zip rename to .yarn/cache/typescript-patch-34e019a968-6a82cb02b2.zip diff --git a/.yarn/cache/typescript-patch-38108386de-1f30617046.zip b/.yarn/cache/typescript-patch-38108386de-1f30617046.zip new file mode 100644 index 000000000000..71ace5b75fe9 Binary files /dev/null and b/.yarn/cache/typescript-patch-38108386de-1f30617046.zip differ diff --git a/.yarn/cache/typescript-patch-c728ca43af-bfea14f536.zip b/.yarn/cache/typescript-patch-63659b642f-bfea14f536.zip similarity index 100% rename from .yarn/cache/typescript-patch-c728ca43af-bfea14f536.zip rename to .yarn/cache/typescript-patch-63659b642f-bfea14f536.zip diff --git a/.yarn/cache/typescript-patch-a6e5645c81-120b3cc2f0.zip b/.yarn/cache/typescript-patch-a6e5645c81-120b3cc2f0.zip deleted file mode 100644 index 0349cefa7cdf..000000000000 Binary files a/.yarn/cache/typescript-patch-a6e5645c81-120b3cc2f0.zip and /dev/null differ diff --git a/.yarn/sdks/typescript/package.json b/.yarn/sdks/typescript/package.json index a979faac8fdd..39b8a974d2c4 100644 --- a/.yarn/sdks/typescript/package.json +++ b/.yarn/sdks/typescript/package.json @@ -1,6 +1,6 @@ { "name": "typescript", - "version": "4.3.2-sdk", + "version": "4.4.1-rc-sdk", "main": "./lib/typescript.js", "type": "commonjs" } diff --git a/.yarn/versions/93771db7.yml b/.yarn/versions/93771db7.yml new file mode 100644 index 000000000000..5cd2f0a9f746 --- /dev/null +++ b/.yarn/versions/93771db7.yml @@ -0,0 +1,25 @@ +releases: + "@yarnpkg/cli": minor + "@yarnpkg/plugin-compat": minor + +declined: + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-exec" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-npm-cli" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - vscode-zipfs + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/doctor" + - "@yarnpkg/pnp" diff --git a/package.json b/package.json index ebd28f962aff..8f3e6b4e515c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "jest-junit": "^10.0.0", "micromatch": "^4.0.2", "tslib": "^1.13.0", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "resolutions": { "yoga-layout-prebuilt": "patch:yoga-layout-prebuilt@1.10.0#./.yarn/patches/yoga-layout-prebuilt.patch" diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 1cd7c61b3fec..4efdc401137f 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -78,7 +78,7 @@ "typedoc": "next", "typedoc-neo-theme": "^1.0.7", "typedoc-plugin-yarn": "portal:./typedoc-plugin-yarn", - "typescript": "^4.3.2", + "typescript": "^4.4.2", "unescape-html": "^1.1.0", "unfetch": "^4.1.0", "unified": "^7.1.0", diff --git a/packages/plugin-compat/extra/typescript/gen-typescript-patch.js b/packages/plugin-compat/extra/typescript/gen-typescript-patch.js index cd4cc1dc9e73..67df169375e4 100644 --- a/packages/plugin-compat/extra/typescript/gen-typescript-patch.js +++ b/packages/plugin-compat/extra/typescript/gen-typescript-patch.js @@ -14,52 +14,71 @@ const IGNORED_VERSIONS = new Set([ `3.3.3333`, ]); -const SLICES = [{ - from: `5d50de3`, - to: `426f5a7`, - onto: `e39bdc3`, - range: `>=3.2 <3.5`, -}, { - from: `5d50de3`, - to: `426f5a7`, - onto: `cf7b2d4`, - range: `>=3.5 <=3.6`, -}, { - from: `5d50de3`, - to: `426f5a7`, - onto: `cda54b8`, - range: `>3.6 <3.7`, -}, { - from: `5d50de3`, - to: `2f85932`, - onto: `e39bdc3`, - range: `>=3.7 <3.9`, -}, { - from: `5d50de3`, - to: `3af06df`, - onto: `551f0dd`, - range: `>=3.9 <4.0`, -}, { - from: `6dbdd2f`, - to: `6dbdd2f`, - onto: `56865f7`, - range: `>=4.0 <4.1`, -}, { - from: `746d79b`, - to: `746d79b`, - onto: `69972a3`, - range: `>=4.1 <4.2`, -}, { - from: `8e0e870`, - to: `58bf162`, - onto: `bfc55b5`, - range: `>=4.2 <4.3`, -}, { - from: `ef7f019`, - to: `ef7f019`, - onto: `28e3e6f`, - range: `>=4.3`, -}]; +const SLICES = [ + { + from: `5d50de3`, + to: `426f5a7`, + onto: `e39bdc3`, + range: `>=3.2 <3.5`, + }, + { + from: `5d50de3`, + to: `426f5a7`, + onto: `cf7b2d4`, + range: `>=3.5 <=3.6`, + }, + { + from: `5d50de3`, + to: `426f5a7`, + onto: `cda54b8`, + range: `>3.6 <3.7`, + }, + { + from: `5d50de3`, + to: `2f85932`, + onto: `e39bdc3`, + range: `>=3.7 <3.9`, + }, + { + from: `5d50de3`, + to: `3af06df`, + onto: `551f0dd`, + range: `>=3.9 <4.0`, + }, + { + from: `6dbdd2f`, + to: `6dbdd2f`, + onto: `56865f7`, + range: `>=4.0 <4.1`, + }, + { + from: `746d79b`, + to: `746d79b`, + onto: `69972a3`, + range: `>=4.1 <4.2`, + }, + // https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.2 + { + from: `8e0e8703b9c95013aec7819e4593d099cdf7763a`, + to: `545d5a8c5409dac447a668d4e7d315702fd115d6`, + onto: `bfc55b5762443c37ecdef08a3b5a4e057b4d1e85`, + range: `>=4.2 <4.3`, + }, + // https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.3 + { + from: `530aad19e4ac19d35cb6b200168c91ce86cb0050`, + to: `6d7d4d2ce0df8e65a2c86a20c014c053ef530ea3`, + onto: `28e3e6ff2f49f1dbf06d31809ec73dbe42f1aa63`, + range: `>=4.3 <4.4`, + }, + // https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.4 + { + from: `793bfe32745bf6797924354b0fd5be62cf01950c`, + to: `88a10595c32309fc26eb4a7f5a858d98e883dae0`, + onto: `a10409ccaa3604790dc45f52ef0402eb49015dcf`, + range: `>=4.4`, + }, +]; async function fetch(url) { return new Promise((resolve, reject) => { @@ -172,6 +191,7 @@ async function cloneRepository() { if (!fs.existsSync(TS_REPO)) { await execFile(`git`, [`clone`, `https://github.com/arcanis/typescript`, TS_REPO]); await execFile(`git`, [`remote`, `add`, `upstream`, `https://github.com/microsoft/typescript`], TS_REPO_SPAWN); + await execFile(`git`, [`remote`, `add`, `upstream2`, `https://github.com/merceyz/typescript`], TS_REPO_SPAWN); } try { @@ -183,6 +203,7 @@ async function cloneRepository() { await execFile(`git`, [`fetch`, `origin`], TS_REPO_SPAWN); await execFile(`git`, [`fetch`, `upstream`], TS_REPO_SPAWN); + await execFile(`git`, [`fetch`, `upstream2`], TS_REPO_SPAWN); } async function resetGit(hash) { @@ -267,21 +288,24 @@ async function run({from, to, onto, range}) { } async function validate(version, patchFile) { - const code = Math.floor(Math.random() * 0x100000000).toString(16).padStart(8, `0`); - const tmpDir = path.join(TMP_DIR, `${code}`); - - const data = await fetch(`https://registry.yarnpkg.com/typescript/-/typescript-${version}.tgz`); - const tarball = path.join(tmpDir, `typescript.tgz`); + const tmpDir = path.join(TMP_DIR, `v${version}`); + const tarball = path.join(tmpDir, `package.tgz`); await fs.promises.mkdir(tmpDir, {recursive: true}); - await fs.promises.writeFile(tarball, data); + + if (!fs.existsSync(tarball)) { + const data = await fetch(`https://registry.yarnpkg.com/typescript/-/typescript-${version}.tgz`); + await fs.promises.writeFile(tarball, data); + } + + if (!fs.existsSync(path.join(tmpDir, `package`))) + await execFile(`tar`, [`xvf`, tarball], {cwd: tmpDir}); let patch = await fs.promises.readFile(patchFile, `utf8`); patch = patch.replace(/^semver .*\n/gm, ``); await fs.promises.writeFile(path.join(tmpDir, `patch.diff`), patch); - await execFile(`tar`, [`xvf`, tarball], {cwd: tmpDir}); - await execFile(`git`, [`apply`, `../patch.diff`], {cwd: path.join(tmpDir, `package`)}); + await execFile(`git`, [`apply`, `--check`, `../patch.diff`], {cwd: path.join(tmpDir, `package`)}); } async function main() { diff --git a/packages/plugin-compat/extra/typescript/patch-e2f9050c1b9d769b9f7bf63143e0da14.diff b/packages/plugin-compat/extra/typescript/patch-237f109a166d02eca3ed935b5b77dc3a.diff similarity index 96% rename from packages/plugin-compat/extra/typescript/patch-e2f9050c1b9d769b9f7bf63143e0da14.diff rename to packages/plugin-compat/extra/typescript/patch-237f109a166d02eca3ed935b5b77dc3a.diff index 3d4813ec4da5..4f17c5427a6f 100644 --- a/packages/plugin-compat/extra/typescript/patch-e2f9050c1b9d769b9f7bf63143e0da14.diff +++ b/packages/plugin-compat/extra/typescript/patch-237f109a166d02eca3ed935b5b77dc3a.diff @@ -1,5 +1,5 @@ diff --git a/lib/tsc.js b/lib/tsc.js -index 7f46cc9d8..cdb2b5407 100644 +index 7f46cc9d8..7cbce60e4 100644 semver exclusivity >=4.2 <4.3 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -139,7 +139,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + } @@ -181,13 +181,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); function updateSharedExtendedConfigFileWatcher(projectPath, parsed, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath) { var _a; -@@ -91848,6 +91940,25 @@ var ts; +@@ -91848,6 +91940,26 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + if (locator !== null) { + var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); @@ -207,7 +208,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -91875,14 +91986,18 @@ var ts; +@@ -91875,14 +91987,18 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -233,7 +234,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -92596,6 +92711,10 @@ var ts; +@@ -92596,6 +92712,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -244,7 +245,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); var getNewSourceFile = compilerHost.getSourceFile; -@@ -92664,6 +92783,10 @@ var ts; +@@ -92664,6 +92784,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -255,7 +256,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -92683,7 +92806,8 @@ var ts; +@@ -92683,7 +92807,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -265,7 +266,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -92693,7 +92817,7 @@ var ts; +@@ -92693,7 +92818,7 @@ var ts; resolutionCache.clear(); } } @@ -274,7 +275,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(undefined, undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -92869,6 +92993,12 @@ var ts; +@@ -92869,6 +92994,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -287,7 +288,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -92884,6 +93014,10 @@ var ts; +@@ -92884,6 +93015,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -299,7 +300,7 @@ semver exclusivity >=4.2 <4.3 ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); diff --git a/lib/tsserver.js b/lib/tsserver.js -index a1d0a7a17..050f609f0 100644 +index a1d0a7a17..d91fc7268 100644 semver exclusivity >=4.2 <4.3 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -455,7 +456,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -500,13 +501,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -111679,6 +111786,29 @@ var ts; +@@ -111679,6 +111786,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -530,7 +532,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -111709,18 +111839,24 @@ var ts; +@@ -111709,18 +111840,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -564,7 +566,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -112500,6 +112636,10 @@ var ts; +@@ -112500,6 +112637,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -575,7 +577,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -112575,6 +112715,10 @@ var ts; +@@ -112575,6 +112716,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -586,7 +588,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -112594,7 +112738,8 @@ var ts; +@@ -112594,7 +112739,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -596,7 +598,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -112605,7 +112750,7 @@ var ts; +@@ -112605,7 +112751,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -605,7 +607,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -112803,6 +112948,12 @@ var ts; +@@ -112803,6 +112949,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -618,7 +620,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -112818,6 +112969,10 @@ var ts; +@@ -112818,6 +112970,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -629,7 +631,7 @@ semver exclusivity >=4.2 <4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -119254,6 +119409,7 @@ var ts; +@@ -119254,6 +119410,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -637,7 +639,7 @@ semver exclusivity >=4.2 <4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -119266,8 +119422,8 @@ var ts; +@@ -119266,8 +119423,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -648,7 +650,7 @@ semver exclusivity >=4.2 <4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -119282,18 +119438,36 @@ var ts; +@@ -119282,18 +119439,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -692,7 +694,7 @@ semver exclusivity >=4.2 <4.3 } } return result; -@@ -119394,6 +119568,7 @@ var ts; +@@ -119394,6 +119569,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -700,7 +702,7 @@ semver exclusivity >=4.2 <4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -119402,11 +119577,19 @@ var ts; +@@ -119402,11 +119578,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -725,7 +727,7 @@ semver exclusivity >=4.2 <4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -138639,11 +138822,27 @@ var ts; +@@ -138639,11 +138823,27 @@ var ts; isImportablePath(from.fileName, toPath, getCanonicalFileName, globalTypingsCache); }); } @@ -754,7 +756,7 @@ semver exclusivity >=4.2 <4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -138651,6 +138850,26 @@ var ts; +@@ -138651,6 +138851,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -781,7 +783,7 @@ semver exclusivity >=4.2 <4.3 function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); } -@@ -146377,9 +146596,9 @@ var ts; +@@ -146377,9 +146597,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -794,7 +796,7 @@ semver exclusivity >=4.2 <4.3 } return statement; }); -@@ -154903,6 +155122,37 @@ var ts; +@@ -154903,6 +155123,40 @@ var ts; return this.projectReferences; }; ConfiguredProject.prototype.updateReferences = function (refs) { @@ -815,12 +817,15 @@ semver exclusivity >=4.2 <4.3 + // user-provided references in our references by directly querying + // the PnP API. This way users don't have to know the virtual paths, + // but we still support them just fine even through references. -+ var pnpApi_1 = require("pnpapi"); + var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; + var getPnpPath_1 = function (path) { + try { -+ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); -+ return pnpApi_1.resolveToUnqualified(targetLocator.name, basePath_1 + "/"); ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); + } + catch (_a) { + // something went wrong with the resolution, try not to fail @@ -832,7 +837,7 @@ semver exclusivity >=4.2 <4.3 this.projectReferences = refs; this.potentialProjectReferences = undefined; }; -@@ -155532,6 +155782,7 @@ var ts; +@@ -155532,6 +155786,7 @@ var ts; watchDirectory: ts.returnNoopFileWatcher, } : ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); @@ -840,7 +845,7 @@ semver exclusivity >=4.2 <4.3 } ProjectService.prototype.toPath = function (fileName) { return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); -@@ -157270,7 +157521,7 @@ var ts; +@@ -157270,7 +157525,7 @@ var ts; }; ProjectService.prototype.setHostConfiguration = function (args) { var _this = this; @@ -849,7 +854,7 @@ semver exclusivity >=4.2 <4.3 if (args.file) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); if (info) { -@@ -157288,7 +157539,7 @@ var ts; +@@ -157288,7 +157543,7 @@ var ts; this.logger.info("Format host information updated"); } if (args.preferences) { @@ -858,7 +863,7 @@ semver exclusivity >=4.2 <4.3 this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { // Load configured projects for external projects that are pending reload -@@ -157314,6 +157565,8 @@ var ts; +@@ -157314,6 +157569,8 @@ var ts; if (args.watchOptions) { this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); @@ -867,7 +872,7 @@ semver exclusivity >=4.2 <4.3 } } }; -@@ -158293,6 +158546,25 @@ var ts; +@@ -158293,6 +158550,26 @@ var ts; }); }; /*@internal*/ @@ -876,7 +881,8 @@ semver exclusivity >=4.2 <4.3 + if (typeof process.versions.pnp === "undefined") { + return; + } -+ var pnpFileName = require.resolve("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); + return this.watchFactory.watchFile(pnpFileName, function () { + _this.forEachProject(function (project) { + for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { @@ -893,22 +899,24 @@ semver exclusivity >=4.2 <4.3 ProjectService.prototype.watchPackageJsonFile = function (path) { var _this = this; var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map()); -@@ -163000,6 +163272,9 @@ var ts; +@@ -163000,6 +163277,10 @@ var ts; } try { var args = [ts.combinePaths(__dirname, "watchGuard.js"), path]; + if (typeof process.versions.pnp !== "undefined") { -+ args.unshift('-r', require.resolve('pnpapi')); ++ var findPnpApi = require("module").findPnpApi; ++ args.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); + } if (logger.hasLevel(server.LogLevel.verbose)) { logger.info("Starting " + process.execPath + " with args:" + server.stringifyIndented(args)); } -@@ -163329,6 +163604,9 @@ var ts; +@@ -163329,6 +163610,10 @@ var ts; break; } } + if (typeof process.versions.pnp !== "undefined") { -+ execArgv.unshift('-r', require.resolve('pnpapi')); ++ var findPnpApi = require("module").findPnpApi; ++ execArgv.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); + } this.installer = childProcess.fork(ts.combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv: execArgv }); this.installer.on("message", function (m) { return _this.handleMessage(m); }); @@ -927,7 +935,7 @@ semver exclusivity >=4.2 <4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js -index e8537e466..3a5db7fbb 100644 +index e8537e466..a9b26d7bc 100644 semver exclusivity >=4.2 <4.3 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -1083,7 +1091,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -1128,13 +1136,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -111873,6 +111980,29 @@ var ts; +@@ -111873,6 +111980,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -1158,7 +1167,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -111903,18 +112033,24 @@ var ts; +@@ -111903,18 +112034,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -1192,7 +1201,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -112694,6 +112830,10 @@ var ts; +@@ -112694,6 +112831,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -1203,7 +1212,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -112769,6 +112909,10 @@ var ts; +@@ -112769,6 +112910,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -1214,7 +1223,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -112788,7 +112932,8 @@ var ts; +@@ -112788,7 +112933,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -1224,7 +1233,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -112799,7 +112944,7 @@ var ts; +@@ -112799,7 +112945,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -1233,7 +1242,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -112997,6 +113142,12 @@ var ts; +@@ -112997,6 +113143,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -1246,7 +1255,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -113012,6 +113163,10 @@ var ts; +@@ -113012,6 +113164,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -1257,7 +1266,7 @@ semver exclusivity >=4.2 <4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -119823,6 +119978,7 @@ var ts; +@@ -119823,6 +119979,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -1265,7 +1274,7 @@ semver exclusivity >=4.2 <4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -119835,8 +119991,8 @@ var ts; +@@ -119835,8 +119992,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -1276,7 +1285,7 @@ semver exclusivity >=4.2 <4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -119851,18 +120007,36 @@ var ts; +@@ -119851,18 +120008,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -1320,7 +1329,7 @@ semver exclusivity >=4.2 <4.3 } } return result; -@@ -119963,6 +120137,7 @@ var ts; +@@ -119963,6 +120138,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -1328,7 +1337,7 @@ semver exclusivity >=4.2 <4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -119971,11 +120146,19 @@ var ts; +@@ -119971,11 +120147,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -1353,7 +1362,7 @@ semver exclusivity >=4.2 <4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -139208,11 +139391,27 @@ var ts; +@@ -139208,11 +139392,27 @@ var ts; isImportablePath(from.fileName, toPath, getCanonicalFileName, globalTypingsCache); }); } @@ -1382,7 +1391,7 @@ semver exclusivity >=4.2 <4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -139220,6 +139419,26 @@ var ts; +@@ -139220,6 +139420,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -1409,7 +1418,7 @@ semver exclusivity >=4.2 <4.3 function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); } -@@ -146946,9 +147165,9 @@ var ts; +@@ -146946,9 +147166,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -1422,7 +1431,7 @@ semver exclusivity >=4.2 <4.3 } return statement; }); -@@ -155097,6 +155316,37 @@ var ts; +@@ -155097,6 +155317,40 @@ var ts; return this.projectReferences; }; ConfiguredProject.prototype.updateReferences = function (refs) { @@ -1443,12 +1452,15 @@ semver exclusivity >=4.2 <4.3 + // user-provided references in our references by directly querying + // the PnP API. This way users don't have to know the virtual paths, + // but we still support them just fine even through references. -+ var pnpApi_1 = require("pnpapi"); + var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; + var getPnpPath_1 = function (path) { + try { -+ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); -+ return pnpApi_1.resolveToUnqualified(targetLocator.name, basePath_1 + "/"); ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); + } + catch (_a) { + // something went wrong with the resolution, try not to fail @@ -1460,7 +1472,7 @@ semver exclusivity >=4.2 <4.3 this.projectReferences = refs; this.potentialProjectReferences = undefined; }; -@@ -155726,6 +155976,7 @@ var ts; +@@ -155726,6 +155980,7 @@ var ts; watchDirectory: ts.returnNoopFileWatcher, } : ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); @@ -1468,7 +1480,7 @@ semver exclusivity >=4.2 <4.3 } ProjectService.prototype.toPath = function (fileName) { return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); -@@ -157464,7 +157715,7 @@ var ts; +@@ -157464,7 +157719,7 @@ var ts; }; ProjectService.prototype.setHostConfiguration = function (args) { var _this = this; @@ -1477,7 +1489,7 @@ semver exclusivity >=4.2 <4.3 if (args.file) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); if (info) { -@@ -157482,7 +157733,7 @@ var ts; +@@ -157482,7 +157737,7 @@ var ts; this.logger.info("Format host information updated"); } if (args.preferences) { @@ -1486,7 +1498,7 @@ semver exclusivity >=4.2 <4.3 this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { // Load configured projects for external projects that are pending reload -@@ -157508,6 +157759,8 @@ var ts; +@@ -157508,6 +157763,8 @@ var ts; if (args.watchOptions) { this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); @@ -1495,7 +1507,7 @@ semver exclusivity >=4.2 <4.3 } } }; -@@ -158487,6 +158740,25 @@ var ts; +@@ -158487,6 +158744,26 @@ var ts; }); }; /*@internal*/ @@ -1504,7 +1516,8 @@ semver exclusivity >=4.2 <4.3 + if (typeof process.versions.pnp === "undefined") { + return; + } -+ var pnpFileName = require.resolve("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); + return this.watchFactory.watchFile(pnpFileName, function () { + _this.forEachProject(function (project) { + for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { @@ -1535,7 +1548,7 @@ semver exclusivity >=4.2 <4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/typescript.js b/lib/typescript.js -index 8539f89fd..57ad1b5d9 100644 +index 8539f89fd..1a23b4f8d 100644 semver exclusivity >=4.2 <4.3 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1691,7 +1704,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -1736,13 +1749,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -111873,6 +111980,29 @@ var ts; +@@ -111873,6 +111980,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -1766,7 +1780,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -111903,18 +112033,24 @@ var ts; +@@ -111903,18 +112034,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -1800,7 +1814,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -112694,6 +112830,10 @@ var ts; +@@ -112694,6 +112831,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -1811,7 +1825,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -112769,6 +112909,10 @@ var ts; +@@ -112769,6 +112910,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -1822,7 +1836,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -112788,7 +112932,8 @@ var ts; +@@ -112788,7 +112933,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -1832,7 +1846,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -112799,7 +112944,7 @@ var ts; +@@ -112799,7 +112945,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -1841,7 +1855,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -112997,6 +113142,12 @@ var ts; +@@ -112997,6 +113143,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -1854,7 +1868,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -113012,6 +113163,10 @@ var ts; +@@ -113012,6 +113164,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -1865,7 +1879,7 @@ semver exclusivity >=4.2 <4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -119823,6 +119978,7 @@ var ts; +@@ -119823,6 +119979,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -1873,7 +1887,7 @@ semver exclusivity >=4.2 <4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -119835,8 +119991,8 @@ var ts; +@@ -119835,8 +119992,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -1884,7 +1898,7 @@ semver exclusivity >=4.2 <4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -119851,18 +120007,36 @@ var ts; +@@ -119851,18 +120008,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -1928,7 +1942,7 @@ semver exclusivity >=4.2 <4.3 } } return result; -@@ -119963,6 +120137,7 @@ var ts; +@@ -119963,6 +120138,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -1936,7 +1950,7 @@ semver exclusivity >=4.2 <4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -119971,11 +120146,19 @@ var ts; +@@ -119971,11 +120147,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -1961,7 +1975,7 @@ semver exclusivity >=4.2 <4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -139208,11 +139391,27 @@ var ts; +@@ -139208,11 +139392,27 @@ var ts; isImportablePath(from.fileName, toPath, getCanonicalFileName, globalTypingsCache); }); } @@ -1990,7 +2004,7 @@ semver exclusivity >=4.2 <4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -139220,6 +139419,26 @@ var ts; +@@ -139220,6 +139420,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -2017,7 +2031,7 @@ semver exclusivity >=4.2 <4.3 function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); } -@@ -146946,9 +147165,9 @@ var ts; +@@ -146946,9 +147166,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -2044,7 +2058,7 @@ semver exclusivity >=4.2 <4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js -index 6b08bfe23..2db549ffc 100644 +index 6b08bfe23..26108a400 100644 semver exclusivity >=4.2 <4.3 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -2200,7 +2214,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -2245,13 +2259,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -111873,6 +111980,29 @@ var ts; +@@ -111873,6 +111980,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -2275,7 +2290,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -111903,18 +112033,24 @@ var ts; +@@ -111903,18 +112034,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -2309,7 +2324,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -112694,6 +112830,10 @@ var ts; +@@ -112694,6 +112831,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -2320,7 +2335,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -112769,6 +112909,10 @@ var ts; +@@ -112769,6 +112910,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -2331,7 +2346,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -112788,7 +112932,8 @@ var ts; +@@ -112788,7 +112933,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -2341,7 +2356,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -112799,7 +112944,7 @@ var ts; +@@ -112799,7 +112945,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -2350,7 +2365,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -112997,6 +113142,12 @@ var ts; +@@ -112997,6 +113143,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -2363,7 +2378,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -113012,6 +113163,10 @@ var ts; +@@ -113012,6 +113164,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -2374,7 +2389,7 @@ semver exclusivity >=4.2 <4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -119823,6 +119978,7 @@ var ts; +@@ -119823,6 +119979,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -2382,7 +2397,7 @@ semver exclusivity >=4.2 <4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -119835,8 +119991,8 @@ var ts; +@@ -119835,8 +119992,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -2393,7 +2408,7 @@ semver exclusivity >=4.2 <4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -119851,18 +120007,36 @@ var ts; +@@ -119851,18 +120008,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -2437,7 +2452,7 @@ semver exclusivity >=4.2 <4.3 } } return result; -@@ -119963,6 +120137,7 @@ var ts; +@@ -119963,6 +120138,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -2445,7 +2460,7 @@ semver exclusivity >=4.2 <4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -119971,11 +120146,19 @@ var ts; +@@ -119971,11 +120147,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -2470,7 +2485,7 @@ semver exclusivity >=4.2 <4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -139208,11 +139391,27 @@ var ts; +@@ -139208,11 +139392,27 @@ var ts; isImportablePath(from.fileName, toPath, getCanonicalFileName, globalTypingsCache); }); } @@ -2499,7 +2514,7 @@ semver exclusivity >=4.2 <4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -139220,6 +139419,26 @@ var ts; +@@ -139220,6 +139420,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -2526,7 +2541,7 @@ semver exclusivity >=4.2 <4.3 function moduleSymbolToValidIdentifier(moduleSymbol, target) { return moduleSpecifierToValidIdentifier(ts.removeFileExtension(ts.stripQuotes(moduleSymbol.name)), target); } -@@ -146946,9 +147165,9 @@ var ts; +@@ -146946,9 +147166,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -2540,7 +2555,7 @@ semver exclusivity >=4.2 <4.3 return statement; }); diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js -index 9fa096358..02a860394 100644 +index 9fa096358..79265c286 100644 semver exclusivity >=4.2 <4.3 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -2696,7 +2711,7 @@ semver exclusivity >=4.2 <4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -2741,13 +2756,14 @@ semver exclusivity >=4.2 <4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -111668,6 +111775,29 @@ var ts; +@@ -111668,6 +111775,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -2771,7 +2787,7 @@ semver exclusivity >=4.2 <4.3 if (!parts) { return undefined; } -@@ -111698,18 +111828,24 @@ var ts; +@@ -111698,18 +111829,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -2805,7 +2821,7 @@ semver exclusivity >=4.2 <4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -112489,6 +112625,10 @@ var ts; +@@ -112489,6 +112626,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -2816,7 +2832,7 @@ semver exclusivity >=4.2 <4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -112564,6 +112704,10 @@ var ts; +@@ -112564,6 +112705,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -2827,7 +2843,7 @@ semver exclusivity >=4.2 <4.3 if (extendedConfigFilesMap) { ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher); extendedConfigFilesMap = undefined; -@@ -112583,7 +112727,8 @@ var ts; +@@ -112583,7 +112728,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -2837,7 +2853,7 @@ semver exclusivity >=4.2 <4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -112594,7 +112739,7 @@ var ts; +@@ -112594,7 +112740,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -2846,7 +2862,7 @@ semver exclusivity >=4.2 <4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -112792,6 +112937,12 @@ var ts; +@@ -112792,6 +112938,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -2859,7 +2875,7 @@ semver exclusivity >=4.2 <4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -112807,6 +112958,10 @@ var ts; +@@ -112807,6 +112959,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; diff --git a/packages/plugin-compat/extra/typescript/patch-230c01745969194f9decadfd780d08d0.diff b/packages/plugin-compat/extra/typescript/patch-44ecdba2b3c1d56d858ed0b65eeb37ae.diff similarity index 96% rename from packages/plugin-compat/extra/typescript/patch-230c01745969194f9decadfd780d08d0.diff rename to packages/plugin-compat/extra/typescript/patch-44ecdba2b3c1d56d858ed0b65eeb37ae.diff index 84907c9de280..8557fab5b97c 100644 --- a/packages/plugin-compat/extra/typescript/patch-230c01745969194f9decadfd780d08d0.diff +++ b/packages/plugin-compat/extra/typescript/patch-44ecdba2b3c1d56d858ed0b65eeb37ae.diff @@ -1,6 +1,6 @@ diff --git a/lib/tsc.js b/lib/tsc.js -index 83f54758a..75f5bd1f3 100644 -semver exclusivity >=4.3 +index 83f54758a..9e8a1c936 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -4692,6 +4692,9 @@ var ts; @@ -139,7 +139,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + } @@ -181,13 +181,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); function updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath) { var _a; -@@ -94524,6 +94616,25 @@ var ts; +@@ -94524,6 +94616,26 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + if (locator !== null) { + var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); @@ -207,7 +208,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -94551,14 +94662,18 @@ var ts; +@@ -94551,14 +94663,18 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -233,7 +234,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -95280,6 +95395,10 @@ var ts; +@@ -95280,6 +95396,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -244,7 +245,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); var getNewSourceFile = compilerHost.getSourceFile; -@@ -95351,6 +95470,10 @@ var ts; +@@ -95351,6 +95471,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -255,7 +256,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -95383,7 +95506,8 @@ var ts; +@@ -95383,7 +95507,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -265,7 +266,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -95393,7 +95517,7 @@ var ts; +@@ -95393,7 +95518,7 @@ var ts; resolutionCache.clear(); } } @@ -274,7 +275,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(undefined, undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -95571,6 +95695,12 @@ var ts; +@@ -95571,6 +95696,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -287,7 +288,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -95586,6 +95716,10 @@ var ts; +@@ -95586,6 +95717,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -299,8 +300,8 @@ semver exclusivity >=4.3 ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); diff --git a/lib/tsserver.js b/lib/tsserver.js -index 58028943d..ad0cf1001 100644 -semver exclusivity >=4.3 +index 58028943d..54dee3ec2 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -7338,6 +7338,11 @@ var ts; @@ -455,7 +456,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -500,13 +501,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -114695,6 +114802,29 @@ var ts; +@@ -114695,6 +114802,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -530,7 +532,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -114725,18 +114855,24 @@ var ts; +@@ -114725,18 +114856,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -564,7 +566,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -115524,6 +115660,10 @@ var ts; +@@ -115524,6 +115661,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -575,7 +577,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -115602,6 +115742,10 @@ var ts; +@@ -115602,6 +115743,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -586,7 +588,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -115634,7 +115778,8 @@ var ts; +@@ -115634,7 +115779,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -596,7 +598,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -115645,7 +115790,7 @@ var ts; +@@ -115645,7 +115791,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -605,7 +607,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -115845,6 +115990,12 @@ var ts; +@@ -115845,6 +115991,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -618,7 +620,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -115860,6 +116011,10 @@ var ts; +@@ -115860,6 +116012,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -629,7 +631,7 @@ semver exclusivity >=4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -121132,11 +121287,27 @@ var ts; +@@ -121132,11 +121288,27 @@ var ts; return hasImportablePath; } ts.isImportableFile = isImportableFile; @@ -658,7 +660,7 @@ semver exclusivity >=4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -121144,6 +121315,26 @@ var ts; +@@ -121144,6 +121316,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -685,7 +687,7 @@ semver exclusivity >=4.3 // #endregion })(ts || (ts = {})); var ts; -@@ -122815,6 +123006,7 @@ var ts; +@@ -122815,6 +123007,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -693,7 +695,7 @@ semver exclusivity >=4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -122827,8 +123019,8 @@ var ts; +@@ -122827,8 +123020,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -704,7 +706,7 @@ semver exclusivity >=4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -122843,18 +123035,36 @@ var ts; +@@ -122843,18 +123036,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -748,7 +750,7 @@ semver exclusivity >=4.3 } } return result; -@@ -122955,6 +123165,7 @@ var ts; +@@ -122955,6 +123166,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -756,7 +758,7 @@ semver exclusivity >=4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -122963,11 +123174,19 @@ var ts; +@@ -122963,11 +123175,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -781,7 +783,7 @@ semver exclusivity >=4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -150455,9 +150674,9 @@ var ts; +@@ -150455,9 +150675,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -794,7 +796,7 @@ semver exclusivity >=4.3 } return statement; }); -@@ -159155,6 +159374,37 @@ var ts; +@@ -159155,6 +159375,40 @@ var ts; return this.projectReferences; }; ConfiguredProject.prototype.updateReferences = function (refs) { @@ -815,12 +817,15 @@ semver exclusivity >=4.3 + // user-provided references in our references by directly querying + // the PnP API. This way users don't have to know the virtual paths, + // but we still support them just fine even through references. -+ var pnpApi_1 = require("pnpapi"); + var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; + var getPnpPath_1 = function (path) { + try { -+ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); -+ return pnpApi_1.resolveToUnqualified(targetLocator.name, basePath_1 + "/"); ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); + } + catch (_a) { + // something went wrong with the resolution, try not to fail @@ -832,7 +837,7 @@ semver exclusivity >=4.3 this.projectReferences = refs; this.potentialProjectReferences = undefined; }; -@@ -159762,6 +160012,7 @@ var ts; +@@ -159762,6 +160016,7 @@ var ts; watchDirectory: ts.returnNoopFileWatcher, } : ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); @@ -840,7 +845,7 @@ semver exclusivity >=4.3 } ProjectService.prototype.toPath = function (fileName) { return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); -@@ -161586,7 +161837,7 @@ var ts; +@@ -161586,7 +161841,7 @@ var ts; }; ProjectService.prototype.setHostConfiguration = function (args) { var _this = this; @@ -849,7 +854,7 @@ semver exclusivity >=4.3 if (args.file) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); if (info) { -@@ -161604,7 +161855,7 @@ var ts; +@@ -161604,7 +161859,7 @@ var ts; this.logger.info("Format host information updated"); } if (args.preferences) { @@ -858,7 +863,7 @@ semver exclusivity >=4.3 this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { // Load configured projects for external projects that are pending reload -@@ -161630,6 +161881,8 @@ var ts; +@@ -161630,6 +161885,8 @@ var ts; if (args.watchOptions) { this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); @@ -867,7 +872,7 @@ semver exclusivity >=4.3 } } }; -@@ -162607,6 +162860,25 @@ var ts; +@@ -162607,6 +162864,26 @@ var ts; }); }; /*@internal*/ @@ -876,7 +881,8 @@ semver exclusivity >=4.3 + if (typeof process.versions.pnp === "undefined") { + return; + } -+ var pnpFileName = require.resolve("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); + return this.watchFactory.watchFile(pnpFileName, function () { + _this.forEachProject(function (project) { + for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { @@ -893,29 +899,31 @@ semver exclusivity >=4.3 ProjectService.prototype.watchPackageJsonFile = function (path) { var _this = this; var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map()); -@@ -167357,6 +167629,9 @@ var ts; +@@ -167357,6 +167634,10 @@ var ts; } try { var args = [ts.combinePaths(__dirname, "watchGuard.js"), path]; + if (typeof process.versions.pnp !== "undefined") { -+ args.unshift('-r', require.resolve('pnpapi')); ++ var findPnpApi = require("module").findPnpApi; ++ args.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); + } if (logger.hasLevel(server.LogLevel.verbose)) { logger.info("Starting " + process.execPath + " with args:" + server.stringifyIndented(args)); } -@@ -167617,6 +167892,9 @@ var ts; +@@ -167617,6 +167898,10 @@ var ts; break; } } + if (typeof process.versions.pnp !== "undefined") { -+ execArgv.unshift('-r', require.resolve('pnpapi')); ++ var findPnpApi = require("module").findPnpApi; ++ execArgv.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); + } this.installer = childProcess.fork(ts.combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv: execArgv }); this.installer.on("message", function (m) { return _this.handleMessage(m); }); // We have to schedule this event to the next tick diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts index 6195d669a..0cabf3bdf 100644 -semver exclusivity >=4.3 +semver exclusivity >=4.3 <4.4 --- a/lib/tsserverlibrary.d.ts +++ b/lib/tsserverlibrary.d.ts @@ -4710,6 +4710,7 @@ declare namespace ts { @@ -927,8 +935,8 @@ semver exclusivity >=4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js -index ee78ce982..d798ba17f 100644 -semver exclusivity >=4.3 +index ee78ce982..a28cb6882 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -7532,6 +7532,11 @@ var ts; @@ -1083,7 +1091,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -1128,13 +1136,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -114889,6 +114996,29 @@ var ts; +@@ -114889,6 +114996,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -1158,7 +1167,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -114919,18 +115049,24 @@ var ts; +@@ -114919,18 +115050,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -1192,7 +1201,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -115718,6 +115854,10 @@ var ts; +@@ -115718,6 +115855,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -1203,7 +1212,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -115796,6 +115936,10 @@ var ts; +@@ -115796,6 +115937,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -1214,7 +1223,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -115828,7 +115972,8 @@ var ts; +@@ -115828,7 +115973,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -1224,7 +1233,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -115839,7 +115984,7 @@ var ts; +@@ -115839,7 +115985,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -1233,7 +1242,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -116039,6 +116184,12 @@ var ts; +@@ -116039,6 +116185,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -1246,7 +1255,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -116054,6 +116205,10 @@ var ts; +@@ -116054,6 +116206,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -1257,7 +1266,7 @@ semver exclusivity >=4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -121701,11 +121856,27 @@ var ts; +@@ -121701,11 +121857,27 @@ var ts; return hasImportablePath; } ts.isImportableFile = isImportableFile; @@ -1286,7 +1295,7 @@ semver exclusivity >=4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -121713,6 +121884,26 @@ var ts; +@@ -121713,6 +121885,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -1313,7 +1322,7 @@ semver exclusivity >=4.3 // #endregion })(ts || (ts = {})); var ts; -@@ -123384,6 +123575,7 @@ var ts; +@@ -123384,6 +123576,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -1321,7 +1330,7 @@ semver exclusivity >=4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -123396,8 +123588,8 @@ var ts; +@@ -123396,8 +123589,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -1332,7 +1341,7 @@ semver exclusivity >=4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -123412,18 +123604,36 @@ var ts; +@@ -123412,18 +123605,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -1376,7 +1385,7 @@ semver exclusivity >=4.3 } } return result; -@@ -123524,6 +123734,7 @@ var ts; +@@ -123524,6 +123735,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -1384,7 +1393,7 @@ semver exclusivity >=4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -123532,11 +123743,19 @@ var ts; +@@ -123532,11 +123744,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -1409,7 +1418,7 @@ semver exclusivity >=4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -151024,9 +151243,9 @@ var ts; +@@ -151024,9 +151244,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -1422,7 +1431,7 @@ semver exclusivity >=4.3 } return statement; }); -@@ -159349,6 +159568,37 @@ var ts; +@@ -159349,6 +159569,40 @@ var ts; return this.projectReferences; }; ConfiguredProject.prototype.updateReferences = function (refs) { @@ -1443,12 +1452,15 @@ semver exclusivity >=4.3 + // user-provided references in our references by directly querying + // the PnP API. This way users don't have to know the virtual paths, + // but we still support them just fine even through references. -+ var pnpApi_1 = require("pnpapi"); + var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; + var getPnpPath_1 = function (path) { + try { -+ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); -+ return pnpApi_1.resolveToUnqualified(targetLocator.name, basePath_1 + "/"); ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); + } + catch (_a) { + // something went wrong with the resolution, try not to fail @@ -1460,7 +1472,7 @@ semver exclusivity >=4.3 this.projectReferences = refs; this.potentialProjectReferences = undefined; }; -@@ -159956,6 +160206,7 @@ var ts; +@@ -159956,6 +160210,7 @@ var ts; watchDirectory: ts.returnNoopFileWatcher, } : ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); @@ -1468,7 +1480,7 @@ semver exclusivity >=4.3 } ProjectService.prototype.toPath = function (fileName) { return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); -@@ -161780,7 +162031,7 @@ var ts; +@@ -161780,7 +162035,7 @@ var ts; }; ProjectService.prototype.setHostConfiguration = function (args) { var _this = this; @@ -1477,7 +1489,7 @@ semver exclusivity >=4.3 if (args.file) { var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); if (info) { -@@ -161798,7 +162049,7 @@ var ts; +@@ -161798,7 +162053,7 @@ var ts; this.logger.info("Format host information updated"); } if (args.preferences) { @@ -1486,7 +1498,7 @@ semver exclusivity >=4.3 this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { // Load configured projects for external projects that are pending reload -@@ -161824,6 +162075,8 @@ var ts; +@@ -161824,6 +162079,8 @@ var ts; if (args.watchOptions) { this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); @@ -1495,7 +1507,7 @@ semver exclusivity >=4.3 } } }; -@@ -162801,6 +163054,25 @@ var ts; +@@ -162801,6 +163058,26 @@ var ts; }); }; /*@internal*/ @@ -1504,7 +1516,8 @@ semver exclusivity >=4.3 + if (typeof process.versions.pnp === "undefined") { + return; + } -+ var pnpFileName = require.resolve("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); + return this.watchFactory.watchFile(pnpFileName, function () { + _this.forEachProject(function (project) { + for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { @@ -1523,7 +1536,7 @@ semver exclusivity >=4.3 var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map()); diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index b86a3a299..a7937dd2e 100644 -semver exclusivity >=4.3 +semver exclusivity >=4.3 <4.4 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -4710,6 +4710,7 @@ declare namespace ts { @@ -1535,8 +1548,8 @@ semver exclusivity >=4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/typescript.js b/lib/typescript.js -index 615ad27f3..891eff5c5 100644 -semver exclusivity >=4.3 +index 615ad27f3..2d8faf3fa 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -7532,6 +7532,11 @@ var ts; @@ -1691,7 +1704,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -1736,13 +1749,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -114889,6 +114996,29 @@ var ts; +@@ -114889,6 +114996,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -1766,7 +1780,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -114919,18 +115049,24 @@ var ts; +@@ -114919,18 +115050,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -1800,7 +1814,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -115718,6 +115854,10 @@ var ts; +@@ -115718,6 +115855,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -1811,7 +1825,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -115796,6 +115936,10 @@ var ts; +@@ -115796,6 +115937,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -1822,7 +1836,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -115828,7 +115972,8 @@ var ts; +@@ -115828,7 +115973,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -1832,7 +1846,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -115839,7 +115984,7 @@ var ts; +@@ -115839,7 +115985,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -1841,7 +1855,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -116039,6 +116184,12 @@ var ts; +@@ -116039,6 +116185,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -1854,7 +1868,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -116054,6 +116205,10 @@ var ts; +@@ -116054,6 +116206,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -1865,7 +1879,7 @@ semver exclusivity >=4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -121701,11 +121856,27 @@ var ts; +@@ -121701,11 +121857,27 @@ var ts; return hasImportablePath; } ts.isImportableFile = isImportableFile; @@ -1894,7 +1908,7 @@ semver exclusivity >=4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -121713,6 +121884,26 @@ var ts; +@@ -121713,6 +121885,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -1921,7 +1935,7 @@ semver exclusivity >=4.3 // #endregion })(ts || (ts = {})); var ts; -@@ -123384,6 +123575,7 @@ var ts; +@@ -123384,6 +123576,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -1929,7 +1943,7 @@ semver exclusivity >=4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -123396,8 +123588,8 @@ var ts; +@@ -123396,8 +123589,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -1940,7 +1954,7 @@ semver exclusivity >=4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -123412,18 +123604,36 @@ var ts; +@@ -123412,18 +123605,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -1984,7 +1998,7 @@ semver exclusivity >=4.3 } } return result; -@@ -123524,6 +123734,7 @@ var ts; +@@ -123524,6 +123735,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -1992,7 +2006,7 @@ semver exclusivity >=4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -123532,11 +123743,19 @@ var ts; +@@ -123532,11 +123744,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -2017,7 +2031,7 @@ semver exclusivity >=4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -151024,9 +151243,9 @@ var ts; +@@ -151024,9 +151244,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -2032,7 +2046,7 @@ semver exclusivity >=4.3 }); diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index 2d44d601a..6fe4cf63a 100644 -semver exclusivity >=4.3 +semver exclusivity >=4.3 <4.4 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -4710,6 +4710,7 @@ declare namespace ts { @@ -2044,8 +2058,8 @@ semver exclusivity >=4.3 * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js -index 59f7d01b5..2d49e271b 100644 -semver exclusivity >=4.3 +index 59f7d01b5..2626ac05c 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -7532,6 +7532,11 @@ var ts; @@ -2200,7 +2214,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -2245,13 +2259,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -114889,6 +114996,29 @@ var ts; +@@ -114889,6 +114996,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -2275,7 +2290,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -114919,18 +115049,24 @@ var ts; +@@ -114919,18 +115050,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -2309,7 +2324,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -115718,6 +115854,10 @@ var ts; +@@ -115718,6 +115855,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -2320,7 +2335,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -115796,6 +115936,10 @@ var ts; +@@ -115796,6 +115937,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -2331,7 +2346,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -115828,7 +115972,8 @@ var ts; +@@ -115828,7 +115973,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -2341,7 +2356,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -115839,7 +115984,7 @@ var ts; +@@ -115839,7 +115985,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -2350,7 +2365,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -116039,6 +116184,12 @@ var ts; +@@ -116039,6 +116185,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -2363,7 +2378,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -116054,6 +116205,10 @@ var ts; +@@ -116054,6 +116206,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; @@ -2374,7 +2389,7 @@ semver exclusivity >=4.3 default: ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); synchronizeProgram(); -@@ -121701,11 +121856,27 @@ var ts; +@@ -121701,11 +121857,27 @@ var ts; return hasImportablePath; } ts.isImportableFile = isImportableFile; @@ -2403,7 +2418,7 @@ semver exclusivity >=4.3 // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); -@@ -121713,6 +121884,26 @@ var ts; +@@ -121713,6 +121885,26 @@ var ts; || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); } @@ -2430,7 +2445,7 @@ semver exclusivity >=4.3 // #endregion })(ts || (ts = {})); var ts; -@@ -123384,6 +123575,7 @@ var ts; +@@ -123384,6 +123576,7 @@ var ts; * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions */ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { @@ -2438,7 +2453,7 @@ semver exclusivity >=4.3 var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; var result = []; var extensionOptions = getExtensionOptions(compilerOptions); -@@ -123396,8 +123588,8 @@ var ts; +@@ -123396,8 +123589,8 @@ var ts; } } var fragmentDirectory = getFragmentDirectory(fragment); @@ -2449,7 +2464,7 @@ semver exclusivity >=4.3 result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); -@@ -123412,18 +123604,36 @@ var ts; +@@ -123412,18 +123605,36 @@ var ts; result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); } }; @@ -2493,7 +2508,7 @@ semver exclusivity >=4.3 } } return result; -@@ -123524,6 +123734,7 @@ var ts; +@@ -123524,6 +123735,7 @@ var ts; return addReplacementSpans(toComplete, range.pos + prefix.length, names); } function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { @@ -2501,7 +2516,7 @@ semver exclusivity >=4.3 if (result === void 0) { result = []; } // Check for typings specified in compiler options var seen = new ts.Map(); -@@ -123532,11 +123743,19 @@ var ts; +@@ -123532,11 +123744,19 @@ var ts; var root = typeRoots_1[_i]; getCompletionEntriesFromDirectories(root); } @@ -2526,7 +2541,7 @@ semver exclusivity >=4.3 } return result; function getCompletionEntriesFromDirectories(directory) { -@@ -151024,9 +151243,9 @@ var ts; +@@ -151024,9 +151244,9 @@ var ts; if (isTopLevelDeclarationStatement(statement) && !isExported(sourceFile, statement, useEs6Exports) && forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { @@ -2540,8 +2555,8 @@ semver exclusivity >=4.3 return statement; }); diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js -index 6810860b9..3b1d2e432 100644 -semver exclusivity >=4.3 +index 6810860b9..f2a0436f1 100644 +semver exclusivity >=4.3 <4.4 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -7327,6 +7327,11 @@ var ts; @@ -2696,7 +2711,7 @@ semver exclusivity >=4.3 + function loadPnpPackageResolution(packageName, containingDirectory) { + try { + var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); -+ return ts.normalizeSlashes(resolution); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); + } + catch (_a) { + // Nothing to do @@ -2741,13 +2756,14 @@ semver exclusivity >=4.3 })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); /** * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project -@@ -114684,6 +114791,29 @@ var ts; +@@ -114684,6 +114791,30 @@ var ts; return undefined; } var parts = getNodeModulePathParts(path); + var packageName; + if (!parts && typeof process.versions.pnp !== "undefined") { -+ var pnpApi = require("pnpapi"); ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); + var locator = pnpApi.findPackageLocator(path); + // eslint-disable-next-line no-null/no-null + if (locator !== null) { @@ -2771,7 +2787,7 @@ semver exclusivity >=4.3 if (!parts) { return undefined; } -@@ -114714,18 +114844,24 @@ var ts; +@@ -114714,18 +114845,24 @@ var ts; if (isRedirect && !isPackageRootPath) { return undefined; } @@ -2805,7 +2821,7 @@ semver exclusivity >=4.3 function tryDirectoryWithPackageJson(packageRootIndex) { var packageRootPath = path.substring(0, packageRootIndex); var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); -@@ -115513,6 +115649,10 @@ var ts; +@@ -115513,6 +115650,10 @@ var ts; if (configFileName) { configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); } @@ -2816,7 +2832,7 @@ semver exclusivity >=4.3 var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); ts.setGetSourceFileAsHashVersioned(compilerHost, host); // Members for CompilerHost -@@ -115591,6 +115731,10 @@ var ts; +@@ -115591,6 +115732,10 @@ var ts; configFileWatcher.close(); configFileWatcher = undefined; } @@ -2827,7 +2843,7 @@ semver exclusivity >=4.3 extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); extendedConfigCache = undefined; if (sharedExtendedConfigFileWatchers) { -@@ -115623,7 +115767,8 @@ var ts; +@@ -115623,7 +115768,8 @@ var ts; function getCurrentProgram() { return builderProgram && builderProgram.getProgramOrUndefined(); } @@ -2837,7 +2853,7 @@ semver exclusivity >=4.3 writeLog("Synchronizing program"); clearInvalidateResolutionsOfFailedLookupLocations(); var program = getCurrentBuilderProgram(); -@@ -115634,7 +115779,7 @@ var ts; +@@ -115634,7 +115780,7 @@ var ts; } } // All resolutions are invalid if user provided resolutions @@ -2846,7 +2862,7 @@ semver exclusivity >=4.3 if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { if (hasChangedConfigFileParsingErrors) { builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); -@@ -115834,6 +115979,12 @@ var ts; +@@ -115834,6 +115980,12 @@ var ts; reloadLevel = ts.ConfigFileProgramReloadLevel.Full; scheduleProgramUpdate(); } @@ -2859,7 +2875,7 @@ semver exclusivity >=4.3 function updateProgramWithWatchStatus() { timerToUpdateProgram = undefined; reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); -@@ -115849,6 +116000,10 @@ var ts; +@@ -115849,6 +116001,10 @@ var ts; ts.perfLogger.logStartUpdateProgram("FullConfigReload"); reloadConfigFile(); break; diff --git a/packages/plugin-compat/extra/typescript/patch-d2c5e2d343ec290eb8176b14c569cff8.diff b/packages/plugin-compat/extra/typescript/patch-d2c5e2d343ec290eb8176b14c569cff8.diff new file mode 100644 index 000000000000..f9b50b99bb9e --- /dev/null +++ b/packages/plugin-compat/extra/typescript/patch-d2c5e2d343ec290eb8176b14c569cff8.diff @@ -0,0 +1,2836 @@ +diff --git a/lib/tsc.js b/lib/tsc.js +index d425ad1b5..0f7fe5cd1 100644 +semver exclusivity >=4.4 +--- a/lib/tsc.js ++++ b/lib/tsc.js +@@ -4758,6 +4758,9 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ if (process.versions.pnp) { ++ return true; ++ } + if (platform === "win32" || platform === "win64") { + return false; + } +@@ -33390,21 +33393,52 @@ var ts; + } + } + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache) { + var traceEnabled = isTraceEnabled(options, host); + if (redirectedReference) { +@@ -33511,7 +33545,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, undefined, undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, undefined, undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -33954,9 +33990,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -34267,6 +34306,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { + var fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state); +@@ -34281,9 +34328,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { + if (state.traceEnabled) { +@@ -34421,6 +34471,47 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + var ts; + (function (ts) { +@@ -91002,6 +91093,7 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["None"] = 0] = "None"; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + function updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath) { + var _a; +@@ -96668,6 +96760,26 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -96695,14 +96807,18 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -97430,6 +97546,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + var getNewSourceFile = compilerHost.getSourceFile; +@@ -97501,6 +97621,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -97533,7 +97657,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -97543,7 +97668,7 @@ var ts; + resolutionCache.clear(); + } + } +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(undefined, undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -97727,6 +97852,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -97742,6 +97873,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); +diff --git a/lib/tsserver.js b/lib/tsserver.js +index 6e4ee30b7..561057665 100644 +semver exclusivity >=4.4 +--- a/lib/tsserver.js ++++ b/lib/tsserver.js +@@ -7458,6 +7458,11 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ // The PnP runtime is always case-sensitive ++ // @ts-ignore ++ if (process.versions.pnp) { ++ return true; ++ } + // win32\win64 are case insensitive platforms + if (platform === "win32" || platform === "win64") { + return false; +@@ -40967,24 +40972,56 @@ var ts; + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. +- * Returns undefined if there are none. + */ +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + // And if it doesn't exist, tough. + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ // Some TS consumers pass relative paths that aren't normalized ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ // eslint-disable-next-line no-null/no-null ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +@@ -41098,7 +41135,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -41653,9 +41692,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -42000,6 +42042,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + // First look for a nested package.json, as in `node_modules/foo/bar/package.json`. + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { +@@ -42015,9 +42065,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { // If "rest" is empty, we just did this search above. +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + // Don't use a "types" or "main" from here because we're not loading the root, but a subdirectory -- just here for the packageId and path mappings. + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { +@@ -42176,6 +42229,58 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ /** ++ * We only allow PnP to be used as a resolution strategy if TypeScript ++ * itself is executed under a PnP runtime (and we only allow it to access ++ * the current PnP runtime, not any on the disk). This ensures that we ++ * don't execute potentially malicious code that didn't already have a ++ * chance to be executed (if we're running within the runtime, it means ++ * that the runtime has already been executed). ++ * @internal ++ */ ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ // Nothing to do ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ /* @internal */ ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + /* @internal */ + var ts; +@@ -110519,6 +110624,8 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + /** Reload completely by re-reading contents of config file from disk and updating program */ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ /** Reload the resolutions */ ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + /** + * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project +@@ -117089,6 +117196,30 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ // eslint-disable-next-line no-null/no-null ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ // Don't use the package name when the imported file is inside ++ // the source directory (prefer a relative path instead) ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ // The last character from packageLocation is the trailing "/", we want to point to it ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -117119,18 +117250,24 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- // Get a path that's relative to node_modules or the importing file's path +- // if node_modules folder is in this folder or any of its parent folders, no need to keep it. +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ // If PnP is enabled the node_modules entries we'll get will always be relevant even if they ++ // are located in a weird path apparently outside of the source directory ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ // Get a path that's relative to node_modules or the importing file's path ++ // if node_modules folder is in this folder or any of its parent folders, no need to keep it. ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } + // If the module was found in @types, get the actual Node package name +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); + // For classic resolution, only allow importing from node_modules/@types, not other node_modules +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -117924,6 +118061,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + // Members for CompilerHost +@@ -118002,6 +118143,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -118034,7 +118179,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -118045,7 +118191,7 @@ var ts; + } + } + // All resolutions are invalid if user provided resolutions +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -118252,6 +118398,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -118267,6 +118419,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(/*forceAllFilesAsInvalidated*/ true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); +@@ -123688,7 +123844,7 @@ var ts; + * Don't include something from a `node_modules` that isn't actually reachable by a global import. + * A relative import to node_modules is usually a bad idea. + */ +- function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ function isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath) { + // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. + var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); +@@ -123696,6 +123852,33 @@ var ts; + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); + } ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function isImportablePathPnp(fromPath, toPath) { ++ var pnpApi = getPnpApi(fromPath); ++ var fromLocator = pnpApi.findPackageLocator(fromPath); ++ var toLocator = pnpApi.findPackageLocator(toPath); ++ // eslint-disable-next-line no-null/no-null ++ if (toLocator === null) { ++ return false; ++ } ++ var fromInfo = pnpApi.getPackageInformation(fromLocator); ++ var toReference = fromInfo.packageDependencies.get(toLocator.name); ++ return toReference === toLocator.reference; ++ } ++ function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ if (getPnpApi(fromPath)) { ++ return isImportablePathPnp(fromPath, toPath); ++ } ++ else { ++ return isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath); ++ } ++ } + function forEachExternalModuleToImportFrom(program, host, useAutoImportProvider, cb) { + var _a, _b; + forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), function (module, file) { return cb(module, file, program, /*isFromPackageJson*/ false); }); +@@ -125506,6 +125689,7 @@ var ts; + * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions + */ + function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { ++ var _a, _b; + var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; + var result = []; + var extensionOptions = getExtensionOptions(compilerOptions); +@@ -125518,8 +125702,8 @@ var ts; + } + } + var fragmentDirectory = getFragmentDirectory(fragment); +- for (var _i = 0, _a = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _a.length; _i++) { +- var ambientName = _a[_i]; ++ for (var _i = 0, _c = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _c.length; _i++) { ++ var ambientName = _c[_i]; + result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); +@@ -125534,18 +125718,36 @@ var ts; + result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + }; +- for (var _b = 0, _c = enumerateNodeModulesVisibleToScript(host, scriptPath); _b < _c.length; _b++) { +- var moduleName = _c[_b]; ++ for (var _d = 0, _e = enumerateNodeModulesVisibleToScript(host, scriptPath); _d < _e.length; _d++) { ++ var moduleName = _e[_d]; + _loop_3(moduleName); + } + } + if (!foundGlobal) { +- ts.forEachAncestorDirectory(scriptPath, function (ancestor) { +- var nodeModules = ts.combinePaths(ancestor, "node_modules"); +- if (ts.tryDirectoryExists(host, nodeModules)) { +- getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ var pnpapi = (_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath); ++ if (pnpapi) { ++ try { ++ // Splits a require request into its components, or return null if the request is a file path ++ var pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; ++ var dependencyNameMatch = fragment.match(pathRegExp); ++ if (dependencyNameMatch) { ++ var dependencyName = dependencyNameMatch[1], subPath = dependencyNameMatch[2]; ++ var unqualified = pnpapi.resolveToUnqualified(dependencyName, scriptPath, { considerBuiltins: false }); ++ if (unqualified) { ++ getCompletionEntriesForDirectoryFragment(subPath, ts.normalizePath(unqualified), extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ } + } +- }); ++ catch (_f) { } ++ } ++ else { ++ ts.forEachAncestorDirectory(scriptPath, function (ancestor) { ++ var nodeModules = ts.combinePaths(ancestor, "node_modules"); ++ if (ts.tryDirectoryExists(host, nodeModules)) { ++ getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ }); ++ } + } + } + return result; +@@ -125646,6 +125848,7 @@ var ts; + return addReplacementSpans(toComplete, range.pos + prefix.length, names); + } + function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { ++ var _a, _b; + if (result === void 0) { result = []; } + // Check for typings specified in compiler options + var seen = new ts.Map(); +@@ -125654,11 +125857,19 @@ var ts; + var root = typeRoots_1[_i]; + getCompletionEntriesFromDirectories(root); + } +- // Also get all @types typings installed in visible node_modules directories +- for (var _a = 0, _b = ts.findPackageJsons(scriptPath, host); _a < _b.length; _a++) { +- var packageJson = _b[_a]; +- var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); +- getCompletionEntriesFromDirectories(typesDir); ++ if ((_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath)) { ++ for (var _c = 0, _d = ts.getPnpTypeRoots(scriptPath); _c < _d.length; _c++) { ++ var root = _d[_c]; ++ getCompletionEntriesFromDirectories(root); ++ } ++ } ++ else { ++ // Also get all @types typings installed in visible node_modules directories ++ for (var _e = 0, _f = ts.findPackageJsons(scriptPath, host); _e < _f.length; _e++) { ++ var packageJson = _f[_e]; ++ var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); ++ getCompletionEntriesFromDirectories(typesDir); ++ } + } + return result; + function getCompletionEntriesFromDirectories(directory) { +@@ -153851,9 +154062,9 @@ var ts; + if (isTopLevelDeclarationStatement(statement) && + !isExported(sourceFile, statement, useEs6Exports) && + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { +- var exports = addExport(statement, useEs6Exports); +- if (exports) +- return exports; ++ var exports_1 = addExport(statement, useEs6Exports); ++ if (exports_1) ++ return exports_1; + } + return statement; + }); +@@ -162652,6 +162863,40 @@ var ts; + return this.projectReferences; + }; + ConfiguredProject.prototype.updateReferences = function (refs) { ++ // @ts-ignore ++ if (process.versions.pnp) { ++ // With Plug'n'Play, dependencies that list peer dependencies ++ // are "virtualized": they are resolved to a unique (virtual) ++ // path that the underlying filesystem layer then resolve back ++ // to the original location. ++ // ++ // When a workspace depends on another workspace with peer ++ // dependencies, this other workspace will thus be resolved to ++ // a unique path that won't match what the initial project has ++ // listed in its `references` field, and TS thus won't leverage ++ // the reference at all. ++ // ++ // To avoid that, we compute here the virtualized paths for the ++ // user-provided references in our references by directly querying ++ // the PnP API. This way users don't have to know the virtual paths, ++ // but we still support them just fine even through references. ++ var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; ++ var getPnpPath_1 = function (path) { ++ try { ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); ++ } ++ catch (_a) { ++ // something went wrong with the resolution, try not to fail ++ return path; ++ } ++ }; ++ refs = refs === null || refs === void 0 ? void 0 : refs.map(function (r) { return (__assign(__assign({}, r), { path: getPnpPath_1(r.path) })); }); ++ } + this.projectReferences = refs; + this.potentialProjectReferences = undefined; + }; +@@ -163268,6 +163513,7 @@ var ts; + watchDirectory: ts.returnNoopFileWatcher, + } : + ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); ++ this.pnpWatcher = this.watchPnpFile(); + } + ProjectService.prototype.toPath = function (fileName) { + return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); +@@ -165120,7 +165366,7 @@ var ts; + }; + ProjectService.prototype.setHostConfiguration = function (args) { + var _this = this; +- var _a; ++ var _a, _b; + if (args.file) { + var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); + if (info) { +@@ -165138,7 +165384,7 @@ var ts; + this.logger.info("Format host information updated"); + } + if (args.preferences) { +- var _b = this.hostConfiguration.preferences, lazyConfiguredProjectsFromExternalProject = _b.lazyConfiguredProjectsFromExternalProject, includePackageJsonAutoImports = _b.includePackageJsonAutoImports; ++ var _c = this.hostConfiguration.preferences, lazyConfiguredProjectsFromExternalProject = _c.lazyConfiguredProjectsFromExternalProject, includePackageJsonAutoImports = _c.includePackageJsonAutoImports; + this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); + if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { + // Load configured projects for external projects that are pending reload +@@ -165164,6 +165410,8 @@ var ts; + if (args.watchOptions) { + this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; + this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); ++ (_b = this.pnpWatcher) === null || _b === void 0 ? void 0 : _b.close(); ++ this.watchPnpFile(); + } + } + }; +@@ -166158,6 +166406,26 @@ var ts; + }); + }; + /*@internal*/ ++ ProjectService.prototype.watchPnpFile = function () { ++ var _this = this; ++ if (typeof process.versions.pnp === "undefined") { ++ return; ++ } ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); ++ return this.watchFactory.watchFile(pnpFileName, function () { ++ _this.forEachProject(function (project) { ++ for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { ++ var info = _a[_i]; ++ project.resolutionCache.invalidateResolutionOfFile(info.path); ++ } ++ project.markAsDirty(); ++ updateProjectIfDirty(project); ++ }); ++ _this.delayEnsureProjectForOpenFiles(); ++ }, ts.PollingInterval.Low, this.hostConfiguration.watchOptions, ts.WatchType.ConfigFile); ++ }; ++ /*@internal*/ + ProjectService.prototype.watchPackageJsonFile = function (path) { + var _this = this; + var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map()); +@@ -171029,6 +171297,10 @@ var ts; + } + try { + var args = [ts.combinePaths(__dirname, "watchGuard.js"), path]; ++ if (typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ args.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); ++ } + if (logger.hasLevel(server.LogLevel.verbose)) { + logger.info("Starting " + process.execPath + " with args:" + server.stringifyIndented(args)); + } +@@ -171289,6 +171561,10 @@ var ts; + break; + } + } ++ if (typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ execArgv.unshift('-r', findPnpApi(__filename).resolveRequest('pnpapi', null)); ++ } + this.installer = childProcess.fork(ts.combinePaths(__dirname, "typingsInstaller.js"), args, { execArgv: execArgv }); + this.installer.on("message", function (m) { return _this.handleMessage(m); }); + // We have to schedule this event to the next tick +diff --git a/lib/tsserverlibrary.d.ts b/lib/tsserverlibrary.d.ts +index 581d70b71..93b185e08 100644 +semver exclusivity >=4.4 +--- a/lib/tsserverlibrary.d.ts ++++ b/lib/tsserverlibrary.d.ts +@@ -4759,6 +4759,7 @@ declare namespace ts { + } + declare namespace ts { + export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; ++ export function getPnpTypeRoots(currentDirectory: string): string[]; + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js +index 5fa1cd290..a7852ed52 100644 +semver exclusivity >=4.4 +--- a/lib/tsserverlibrary.js ++++ b/lib/tsserverlibrary.js +@@ -7652,6 +7652,11 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ // The PnP runtime is always case-sensitive ++ // @ts-ignore ++ if (process.versions.pnp) { ++ return true; ++ } + // win32\win64 are case insensitive platforms + if (platform === "win32" || platform === "win64") { + return false; +@@ -41161,24 +41166,56 @@ var ts; + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. +- * Returns undefined if there are none. + */ +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + // And if it doesn't exist, tough. + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ // Some TS consumers pass relative paths that aren't normalized ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ // eslint-disable-next-line no-null/no-null ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +@@ -41292,7 +41329,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -41847,9 +41886,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -42194,6 +42236,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + // First look for a nested package.json, as in `node_modules/foo/bar/package.json`. + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { +@@ -42209,9 +42259,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { // If "rest" is empty, we just did this search above. +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + // Don't use a "types" or "main" from here because we're not loading the root, but a subdirectory -- just here for the packageId and path mappings. + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { +@@ -42370,6 +42423,58 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ /** ++ * We only allow PnP to be used as a resolution strategy if TypeScript ++ * itself is executed under a PnP runtime (and we only allow it to access ++ * the current PnP runtime, not any on the disk). This ensures that we ++ * don't execute potentially malicious code that didn't already have a ++ * chance to be executed (if we're running within the runtime, it means ++ * that the runtime has already been executed). ++ * @internal ++ */ ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ // Nothing to do ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ /* @internal */ ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + /* @internal */ + var ts; +@@ -110713,6 +110818,8 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + /** Reload completely by re-reading contents of config file from disk and updating program */ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ /** Reload the resolutions */ ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + /** + * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project +@@ -117283,6 +117390,30 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ // eslint-disable-next-line no-null/no-null ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ // Don't use the package name when the imported file is inside ++ // the source directory (prefer a relative path instead) ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ // The last character from packageLocation is the trailing "/", we want to point to it ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -117313,18 +117444,24 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- // Get a path that's relative to node_modules or the importing file's path +- // if node_modules folder is in this folder or any of its parent folders, no need to keep it. +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ // If PnP is enabled the node_modules entries we'll get will always be relevant even if they ++ // are located in a weird path apparently outside of the source directory ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ // Get a path that's relative to node_modules or the importing file's path ++ // if node_modules folder is in this folder or any of its parent folders, no need to keep it. ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } + // If the module was found in @types, get the actual Node package name +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); + // For classic resolution, only allow importing from node_modules/@types, not other node_modules +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -118118,6 +118255,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + // Members for CompilerHost +@@ -118196,6 +118337,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -118228,7 +118373,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -118239,7 +118385,7 @@ var ts; + } + } + // All resolutions are invalid if user provided resolutions +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -118446,6 +118592,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -118461,6 +118613,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(/*forceAllFilesAsInvalidated*/ true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); +@@ -124270,7 +124426,7 @@ var ts; + * Don't include something from a `node_modules` that isn't actually reachable by a global import. + * A relative import to node_modules is usually a bad idea. + */ +- function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ function isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath) { + // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. + var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); +@@ -124278,6 +124434,33 @@ var ts; + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); + } ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function isImportablePathPnp(fromPath, toPath) { ++ var pnpApi = getPnpApi(fromPath); ++ var fromLocator = pnpApi.findPackageLocator(fromPath); ++ var toLocator = pnpApi.findPackageLocator(toPath); ++ // eslint-disable-next-line no-null/no-null ++ if (toLocator === null) { ++ return false; ++ } ++ var fromInfo = pnpApi.getPackageInformation(fromLocator); ++ var toReference = fromInfo.packageDependencies.get(toLocator.name); ++ return toReference === toLocator.reference; ++ } ++ function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ if (getPnpApi(fromPath)) { ++ return isImportablePathPnp(fromPath, toPath); ++ } ++ else { ++ return isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath); ++ } ++ } + function forEachExternalModuleToImportFrom(program, host, useAutoImportProvider, cb) { + var _a, _b; + forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), function (module, file) { return cb(module, file, program, /*isFromPackageJson*/ false); }); +@@ -126088,6 +126271,7 @@ var ts; + * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions + */ + function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { ++ var _a, _b; + var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; + var result = []; + var extensionOptions = getExtensionOptions(compilerOptions); +@@ -126100,8 +126284,8 @@ var ts; + } + } + var fragmentDirectory = getFragmentDirectory(fragment); +- for (var _i = 0, _a = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _a.length; _i++) { +- var ambientName = _a[_i]; ++ for (var _i = 0, _c = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _c.length; _i++) { ++ var ambientName = _c[_i]; + result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); +@@ -126116,18 +126300,36 @@ var ts; + result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + }; +- for (var _b = 0, _c = enumerateNodeModulesVisibleToScript(host, scriptPath); _b < _c.length; _b++) { +- var moduleName = _c[_b]; ++ for (var _d = 0, _e = enumerateNodeModulesVisibleToScript(host, scriptPath); _d < _e.length; _d++) { ++ var moduleName = _e[_d]; + _loop_3(moduleName); + } + } + if (!foundGlobal) { +- ts.forEachAncestorDirectory(scriptPath, function (ancestor) { +- var nodeModules = ts.combinePaths(ancestor, "node_modules"); +- if (ts.tryDirectoryExists(host, nodeModules)) { +- getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ var pnpapi = (_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath); ++ if (pnpapi) { ++ try { ++ // Splits a require request into its components, or return null if the request is a file path ++ var pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; ++ var dependencyNameMatch = fragment.match(pathRegExp); ++ if (dependencyNameMatch) { ++ var dependencyName = dependencyNameMatch[1], subPath = dependencyNameMatch[2]; ++ var unqualified = pnpapi.resolveToUnqualified(dependencyName, scriptPath, { considerBuiltins: false }); ++ if (unqualified) { ++ getCompletionEntriesForDirectoryFragment(subPath, ts.normalizePath(unqualified), extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ } + } +- }); ++ catch (_f) { } ++ } ++ else { ++ ts.forEachAncestorDirectory(scriptPath, function (ancestor) { ++ var nodeModules = ts.combinePaths(ancestor, "node_modules"); ++ if (ts.tryDirectoryExists(host, nodeModules)) { ++ getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ }); ++ } + } + } + return result; +@@ -126228,6 +126430,7 @@ var ts; + return addReplacementSpans(toComplete, range.pos + prefix.length, names); + } + function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { ++ var _a, _b; + if (result === void 0) { result = []; } + // Check for typings specified in compiler options + var seen = new ts.Map(); +@@ -126236,11 +126439,19 @@ var ts; + var root = typeRoots_1[_i]; + getCompletionEntriesFromDirectories(root); + } +- // Also get all @types typings installed in visible node_modules directories +- for (var _a = 0, _b = ts.findPackageJsons(scriptPath, host); _a < _b.length; _a++) { +- var packageJson = _b[_a]; +- var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); +- getCompletionEntriesFromDirectories(typesDir); ++ if ((_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath)) { ++ for (var _c = 0, _d = ts.getPnpTypeRoots(scriptPath); _c < _d.length; _c++) { ++ var root = _d[_c]; ++ getCompletionEntriesFromDirectories(root); ++ } ++ } ++ else { ++ // Also get all @types typings installed in visible node_modules directories ++ for (var _e = 0, _f = ts.findPackageJsons(scriptPath, host); _e < _f.length; _e++) { ++ var packageJson = _f[_e]; ++ var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); ++ getCompletionEntriesFromDirectories(typesDir); ++ } + } + return result; + function getCompletionEntriesFromDirectories(directory) { +@@ -154433,9 +154644,9 @@ var ts; + if (isTopLevelDeclarationStatement(statement) && + !isExported(sourceFile, statement, useEs6Exports) && + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { +- var exports = addExport(statement, useEs6Exports); +- if (exports) +- return exports; ++ var exports_1 = addExport(statement, useEs6Exports); ++ if (exports_1) ++ return exports_1; + } + return statement; + }); +@@ -162846,6 +163057,40 @@ var ts; + return this.projectReferences; + }; + ConfiguredProject.prototype.updateReferences = function (refs) { ++ // @ts-ignore ++ if (process.versions.pnp) { ++ // With Plug'n'Play, dependencies that list peer dependencies ++ // are "virtualized": they are resolved to a unique (virtual) ++ // path that the underlying filesystem layer then resolve back ++ // to the original location. ++ // ++ // When a workspace depends on another workspace with peer ++ // dependencies, this other workspace will thus be resolved to ++ // a unique path that won't match what the initial project has ++ // listed in its `references` field, and TS thus won't leverage ++ // the reference at all. ++ // ++ // To avoid that, we compute here the virtualized paths for the ++ // user-provided references in our references by directly querying ++ // the PnP API. This way users don't have to know the virtual paths, ++ // but we still support them just fine even through references. ++ var basePath_1 = this.getCurrentDirectory(); ++ var findPnpApi_1 = require("module").findPnpApi; ++ var getPnpPath_1 = function (path) { ++ try { ++ var pnpApi = findPnpApi_1(path + "/"); ++ var targetLocator = pnpApi.findPackageLocator(path + "/"); ++ var packageLocation = pnpApi.getPackageInformation(targetLocator).packageLocation; ++ var request = ts.combinePaths(targetLocator.name, ts.getRelativePathFromDirectory(packageLocation, path, false)); ++ return pnpApi.resolveToUnqualified(request, basePath_1 + "/"); ++ } ++ catch (_a) { ++ // something went wrong with the resolution, try not to fail ++ return path; ++ } ++ }; ++ refs = refs === null || refs === void 0 ? void 0 : refs.map(function (r) { return (__assign(__assign({}, r), { path: getPnpPath_1(r.path) })); }); ++ } + this.projectReferences = refs; + this.potentialProjectReferences = undefined; + }; +@@ -163462,6 +163707,7 @@ var ts; + watchDirectory: ts.returnNoopFileWatcher, + } : + ts.getWatchFactory(this.host, watchLogLevel, log, getDetailWatchInfo); ++ this.pnpWatcher = this.watchPnpFile(); + } + ProjectService.prototype.toPath = function (fileName) { + return ts.toPath(fileName, this.currentDirectory, this.toCanonicalFileName); +@@ -165314,7 +165560,7 @@ var ts; + }; + ProjectService.prototype.setHostConfiguration = function (args) { + var _this = this; +- var _a; ++ var _a, _b; + if (args.file) { + var info = this.getScriptInfoForNormalizedPath(server.toNormalizedPath(args.file)); + if (info) { +@@ -165332,7 +165578,7 @@ var ts; + this.logger.info("Format host information updated"); + } + if (args.preferences) { +- var _b = this.hostConfiguration.preferences, lazyConfiguredProjectsFromExternalProject = _b.lazyConfiguredProjectsFromExternalProject, includePackageJsonAutoImports = _b.includePackageJsonAutoImports; ++ var _c = this.hostConfiguration.preferences, lazyConfiguredProjectsFromExternalProject = _c.lazyConfiguredProjectsFromExternalProject, includePackageJsonAutoImports = _c.includePackageJsonAutoImports; + this.hostConfiguration.preferences = __assign(__assign({}, this.hostConfiguration.preferences), args.preferences); + if (lazyConfiguredProjectsFromExternalProject && !this.hostConfiguration.preferences.lazyConfiguredProjectsFromExternalProject) { + // Load configured projects for external projects that are pending reload +@@ -165358,6 +165604,8 @@ var ts; + if (args.watchOptions) { + this.hostConfiguration.watchOptions = (_a = convertWatchOptions(args.watchOptions)) === null || _a === void 0 ? void 0 : _a.watchOptions; + this.logger.info("Host watch options changed to " + JSON.stringify(this.hostConfiguration.watchOptions) + ", it will be take effect for next watches."); ++ (_b = this.pnpWatcher) === null || _b === void 0 ? void 0 : _b.close(); ++ this.watchPnpFile(); + } + } + }; +@@ -166352,6 +166600,26 @@ var ts; + }); + }; + /*@internal*/ ++ ProjectService.prototype.watchPnpFile = function () { ++ var _this = this; ++ if (typeof process.versions.pnp === "undefined") { ++ return; ++ } ++ var findPnpApi = require("module").findPnpApi; ++ var pnpFileName = findPnpApi(__filename).resolveRequest('pnpapi', null); ++ return this.watchFactory.watchFile(pnpFileName, function () { ++ _this.forEachProject(function (project) { ++ for (var _i = 0, _a = project.getScriptInfos(); _i < _a.length; _i++) { ++ var info = _a[_i]; ++ project.resolutionCache.invalidateResolutionOfFile(info.path); ++ } ++ project.markAsDirty(); ++ updateProjectIfDirty(project); ++ }); ++ _this.delayEnsureProjectForOpenFiles(); ++ }, ts.PollingInterval.Low, this.hostConfiguration.watchOptions, ts.WatchType.ConfigFile); ++ }; ++ /*@internal*/ + ProjectService.prototype.watchPackageJsonFile = function (path) { + var _this = this; + var watchers = this.packageJsonFilesMap || (this.packageJsonFilesMap = new ts.Map()); +diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts +index 4902d45ad..f512e9e8c 100644 +semver exclusivity >=4.4 +--- a/lib/typescript.d.ts ++++ b/lib/typescript.d.ts +@@ -4759,6 +4759,7 @@ declare namespace ts { + } + declare namespace ts { + export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; ++ export function getPnpTypeRoots(currentDirectory: string): string[]; + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +diff --git a/lib/typescript.js b/lib/typescript.js +index 44462973f..3f5a196de 100644 +semver exclusivity >=4.4 +--- a/lib/typescript.js ++++ b/lib/typescript.js +@@ -7652,6 +7652,11 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ // The PnP runtime is always case-sensitive ++ // @ts-ignore ++ if (process.versions.pnp) { ++ return true; ++ } + // win32\win64 are case insensitive platforms + if (platform === "win32" || platform === "win64") { + return false; +@@ -41161,24 +41166,56 @@ var ts; + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. +- * Returns undefined if there are none. + */ +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + // And if it doesn't exist, tough. + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ // Some TS consumers pass relative paths that aren't normalized ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ // eslint-disable-next-line no-null/no-null ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +@@ -41292,7 +41329,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -41847,9 +41886,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -42194,6 +42236,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + // First look for a nested package.json, as in `node_modules/foo/bar/package.json`. + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { +@@ -42209,9 +42259,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { // If "rest" is empty, we just did this search above. +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + // Don't use a "types" or "main" from here because we're not loading the root, but a subdirectory -- just here for the packageId and path mappings. + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { +@@ -42370,6 +42423,58 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ /** ++ * We only allow PnP to be used as a resolution strategy if TypeScript ++ * itself is executed under a PnP runtime (and we only allow it to access ++ * the current PnP runtime, not any on the disk). This ensures that we ++ * don't execute potentially malicious code that didn't already have a ++ * chance to be executed (if we're running within the runtime, it means ++ * that the runtime has already been executed). ++ * @internal ++ */ ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ // Nothing to do ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ /* @internal */ ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + /* @internal */ + var ts; +@@ -110713,6 +110818,8 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + /** Reload completely by re-reading contents of config file from disk and updating program */ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ /** Reload the resolutions */ ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + /** + * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project +@@ -117283,6 +117390,30 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ // eslint-disable-next-line no-null/no-null ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ // Don't use the package name when the imported file is inside ++ // the source directory (prefer a relative path instead) ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ // The last character from packageLocation is the trailing "/", we want to point to it ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -117313,18 +117444,24 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- // Get a path that's relative to node_modules or the importing file's path +- // if node_modules folder is in this folder or any of its parent folders, no need to keep it. +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ // If PnP is enabled the node_modules entries we'll get will always be relevant even if they ++ // are located in a weird path apparently outside of the source directory ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ // Get a path that's relative to node_modules or the importing file's path ++ // if node_modules folder is in this folder or any of its parent folders, no need to keep it. ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } + // If the module was found in @types, get the actual Node package name +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); + // For classic resolution, only allow importing from node_modules/@types, not other node_modules +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -118118,6 +118255,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + // Members for CompilerHost +@@ -118196,6 +118337,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -118228,7 +118373,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -118239,7 +118385,7 @@ var ts; + } + } + // All resolutions are invalid if user provided resolutions +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -118446,6 +118592,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -118461,6 +118613,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(/*forceAllFilesAsInvalidated*/ true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); +@@ -124270,7 +124426,7 @@ var ts; + * Don't include something from a `node_modules` that isn't actually reachable by a global import. + * A relative import to node_modules is usually a bad idea. + */ +- function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ function isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath) { + // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. + var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); +@@ -124278,6 +124434,33 @@ var ts; + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); + } ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function isImportablePathPnp(fromPath, toPath) { ++ var pnpApi = getPnpApi(fromPath); ++ var fromLocator = pnpApi.findPackageLocator(fromPath); ++ var toLocator = pnpApi.findPackageLocator(toPath); ++ // eslint-disable-next-line no-null/no-null ++ if (toLocator === null) { ++ return false; ++ } ++ var fromInfo = pnpApi.getPackageInformation(fromLocator); ++ var toReference = fromInfo.packageDependencies.get(toLocator.name); ++ return toReference === toLocator.reference; ++ } ++ function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ if (getPnpApi(fromPath)) { ++ return isImportablePathPnp(fromPath, toPath); ++ } ++ else { ++ return isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath); ++ } ++ } + function forEachExternalModuleToImportFrom(program, host, useAutoImportProvider, cb) { + var _a, _b; + forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), function (module, file) { return cb(module, file, program, /*isFromPackageJson*/ false); }); +@@ -126088,6 +126271,7 @@ var ts; + * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions + */ + function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { ++ var _a, _b; + var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; + var result = []; + var extensionOptions = getExtensionOptions(compilerOptions); +@@ -126100,8 +126284,8 @@ var ts; + } + } + var fragmentDirectory = getFragmentDirectory(fragment); +- for (var _i = 0, _a = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _a.length; _i++) { +- var ambientName = _a[_i]; ++ for (var _i = 0, _c = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _c.length; _i++) { ++ var ambientName = _c[_i]; + result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); +@@ -126116,18 +126300,36 @@ var ts; + result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + }; +- for (var _b = 0, _c = enumerateNodeModulesVisibleToScript(host, scriptPath); _b < _c.length; _b++) { +- var moduleName = _c[_b]; ++ for (var _d = 0, _e = enumerateNodeModulesVisibleToScript(host, scriptPath); _d < _e.length; _d++) { ++ var moduleName = _e[_d]; + _loop_3(moduleName); + } + } + if (!foundGlobal) { +- ts.forEachAncestorDirectory(scriptPath, function (ancestor) { +- var nodeModules = ts.combinePaths(ancestor, "node_modules"); +- if (ts.tryDirectoryExists(host, nodeModules)) { +- getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ var pnpapi = (_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath); ++ if (pnpapi) { ++ try { ++ // Splits a require request into its components, or return null if the request is a file path ++ var pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; ++ var dependencyNameMatch = fragment.match(pathRegExp); ++ if (dependencyNameMatch) { ++ var dependencyName = dependencyNameMatch[1], subPath = dependencyNameMatch[2]; ++ var unqualified = pnpapi.resolveToUnqualified(dependencyName, scriptPath, { considerBuiltins: false }); ++ if (unqualified) { ++ getCompletionEntriesForDirectoryFragment(subPath, ts.normalizePath(unqualified), extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ } + } +- }); ++ catch (_f) { } ++ } ++ else { ++ ts.forEachAncestorDirectory(scriptPath, function (ancestor) { ++ var nodeModules = ts.combinePaths(ancestor, "node_modules"); ++ if (ts.tryDirectoryExists(host, nodeModules)) { ++ getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ }); ++ } + } + } + return result; +@@ -126228,6 +126430,7 @@ var ts; + return addReplacementSpans(toComplete, range.pos + prefix.length, names); + } + function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { ++ var _a, _b; + if (result === void 0) { result = []; } + // Check for typings specified in compiler options + var seen = new ts.Map(); +@@ -126236,11 +126439,19 @@ var ts; + var root = typeRoots_1[_i]; + getCompletionEntriesFromDirectories(root); + } +- // Also get all @types typings installed in visible node_modules directories +- for (var _a = 0, _b = ts.findPackageJsons(scriptPath, host); _a < _b.length; _a++) { +- var packageJson = _b[_a]; +- var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); +- getCompletionEntriesFromDirectories(typesDir); ++ if ((_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath)) { ++ for (var _c = 0, _d = ts.getPnpTypeRoots(scriptPath); _c < _d.length; _c++) { ++ var root = _d[_c]; ++ getCompletionEntriesFromDirectories(root); ++ } ++ } ++ else { ++ // Also get all @types typings installed in visible node_modules directories ++ for (var _e = 0, _f = ts.findPackageJsons(scriptPath, host); _e < _f.length; _e++) { ++ var packageJson = _f[_e]; ++ var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); ++ getCompletionEntriesFromDirectories(typesDir); ++ } + } + return result; + function getCompletionEntriesFromDirectories(directory) { +@@ -154433,9 +154644,9 @@ var ts; + if (isTopLevelDeclarationStatement(statement) && + !isExported(sourceFile, statement, useEs6Exports) && + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { +- var exports = addExport(statement, useEs6Exports); +- if (exports) +- return exports; ++ var exports_1 = addExport(statement, useEs6Exports); ++ if (exports_1) ++ return exports_1; + } + return statement; + }); +diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts +index c4e5e624c..1ff41ed4d 100644 +semver exclusivity >=4.4 +--- a/lib/typescriptServices.d.ts ++++ b/lib/typescriptServices.d.ts +@@ -4759,6 +4759,7 @@ declare namespace ts { + } + declare namespace ts { + export function getEffectiveTypeRoots(options: CompilerOptions, host: GetEffectiveTypeRootsHost): string[] | undefined; ++ export function getPnpTypeRoots(currentDirectory: string): string[]; + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js +index 20a6fc52e..c7d12009d 100644 +semver exclusivity >=4.4 +--- a/lib/typescriptServices.js ++++ b/lib/typescriptServices.js +@@ -7652,6 +7652,11 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ // The PnP runtime is always case-sensitive ++ // @ts-ignore ++ if (process.versions.pnp) { ++ return true; ++ } + // win32\win64 are case insensitive platforms + if (platform === "win32" || platform === "win64") { + return false; +@@ -41161,24 +41166,56 @@ var ts; + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. +- * Returns undefined if there are none. + */ +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + // And if it doesn't exist, tough. + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ // Some TS consumers pass relative paths that aren't normalized ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ // eslint-disable-next-line no-null/no-null ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +@@ -41292,7 +41329,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -41847,9 +41886,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -42194,6 +42236,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + // First look for a nested package.json, as in `node_modules/foo/bar/package.json`. + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { +@@ -42209,9 +42259,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { // If "rest" is empty, we just did this search above. +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + // Don't use a "types" or "main" from here because we're not loading the root, but a subdirectory -- just here for the packageId and path mappings. + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { +@@ -42370,6 +42423,58 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ /** ++ * We only allow PnP to be used as a resolution strategy if TypeScript ++ * itself is executed under a PnP runtime (and we only allow it to access ++ * the current PnP runtime, not any on the disk). This ensures that we ++ * don't execute potentially malicious code that didn't already have a ++ * chance to be executed (if we're running within the runtime, it means ++ * that the runtime has already been executed). ++ * @internal ++ */ ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ // Nothing to do ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ /* @internal */ ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + /* @internal */ + var ts; +@@ -110713,6 +110818,8 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + /** Reload completely by re-reading contents of config file from disk and updating program */ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ /** Reload the resolutions */ ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + /** + * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project +@@ -117283,6 +117390,30 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ // eslint-disable-next-line no-null/no-null ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ // Don't use the package name when the imported file is inside ++ // the source directory (prefer a relative path instead) ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ // The last character from packageLocation is the trailing "/", we want to point to it ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -117313,18 +117444,24 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- // Get a path that's relative to node_modules or the importing file's path +- // if node_modules folder is in this folder or any of its parent folders, no need to keep it. +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ // If PnP is enabled the node_modules entries we'll get will always be relevant even if they ++ // are located in a weird path apparently outside of the source directory ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ // Get a path that's relative to node_modules or the importing file's path ++ // if node_modules folder is in this folder or any of its parent folders, no need to keep it. ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } + // If the module was found in @types, get the actual Node package name +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); + // For classic resolution, only allow importing from node_modules/@types, not other node_modules +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -118118,6 +118255,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + // Members for CompilerHost +@@ -118196,6 +118337,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -118228,7 +118373,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -118239,7 +118385,7 @@ var ts; + } + } + // All resolutions are invalid if user provided resolutions +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -118446,6 +118592,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -118461,6 +118613,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(/*forceAllFilesAsInvalidated*/ true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); +@@ -124270,7 +124426,7 @@ var ts; + * Don't include something from a `node_modules` that isn't actually reachable by a global import. + * A relative import to node_modules is usually a bad idea. + */ +- function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ function isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath) { + // If it's in a `node_modules` but is not reachable from here via a global import, don't bother. + var toNodeModules = ts.forEachAncestorDirectory(toPath, function (ancestor) { return ts.getBaseFileName(ancestor) === "node_modules" ? ancestor : undefined; }); + var toNodeModulesParent = toNodeModules && ts.getDirectoryPath(getCanonicalFileName(toNodeModules)); +@@ -124278,6 +124434,33 @@ var ts; + || ts.startsWith(getCanonicalFileName(fromPath), toNodeModulesParent) + || (!!globalCachePath && ts.startsWith(getCanonicalFileName(globalCachePath), toNodeModulesParent)); + } ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function isImportablePathPnp(fromPath, toPath) { ++ var pnpApi = getPnpApi(fromPath); ++ var fromLocator = pnpApi.findPackageLocator(fromPath); ++ var toLocator = pnpApi.findPackageLocator(toPath); ++ // eslint-disable-next-line no-null/no-null ++ if (toLocator === null) { ++ return false; ++ } ++ var fromInfo = pnpApi.getPackageInformation(fromLocator); ++ var toReference = fromInfo.packageDependencies.get(toLocator.name); ++ return toReference === toLocator.reference; ++ } ++ function isImportablePath(fromPath, toPath, getCanonicalFileName, globalCachePath) { ++ if (getPnpApi(fromPath)) { ++ return isImportablePathPnp(fromPath, toPath); ++ } ++ else { ++ return isImportablePathNode(fromPath, toPath, getCanonicalFileName, globalCachePath); ++ } ++ } + function forEachExternalModuleToImportFrom(program, host, useAutoImportProvider, cb) { + var _a, _b; + forEachExternalModule(program.getTypeChecker(), program.getSourceFiles(), function (module, file) { return cb(module, file, program, /*isFromPackageJson*/ false); }); +@@ -126088,6 +126271,7 @@ var ts; + * This includes all files that are found in node_modules/moduleName/ with acceptable file extensions + */ + function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, compilerOptions, host, typeChecker) { ++ var _a, _b; + var baseUrl = compilerOptions.baseUrl, paths = compilerOptions.paths; + var result = []; + var extensionOptions = getExtensionOptions(compilerOptions); +@@ -126100,8 +126284,8 @@ var ts; + } + } + var fragmentDirectory = getFragmentDirectory(fragment); +- for (var _i = 0, _a = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _a.length; _i++) { +- var ambientName = _a[_i]; ++ for (var _i = 0, _c = getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker); _i < _c.length; _i++) { ++ var ambientName = _c[_i]; + result.push(nameAndKind(ambientName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + getCompletionEntriesFromTypings(host, compilerOptions, scriptPath, fragmentDirectory, extensionOptions, result); +@@ -126116,18 +126300,36 @@ var ts; + result.push(nameAndKind(moduleName, "external module name" /* externalModuleName */, /*extension*/ undefined)); + } + }; +- for (var _b = 0, _c = enumerateNodeModulesVisibleToScript(host, scriptPath); _b < _c.length; _b++) { +- var moduleName = _c[_b]; ++ for (var _d = 0, _e = enumerateNodeModulesVisibleToScript(host, scriptPath); _d < _e.length; _d++) { ++ var moduleName = _e[_d]; + _loop_3(moduleName); + } + } + if (!foundGlobal) { +- ts.forEachAncestorDirectory(scriptPath, function (ancestor) { +- var nodeModules = ts.combinePaths(ancestor, "node_modules"); +- if (ts.tryDirectoryExists(host, nodeModules)) { +- getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ var pnpapi = (_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath); ++ if (pnpapi) { ++ try { ++ // Splits a require request into its components, or return null if the request is a file path ++ var pathRegExp = /^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:@[^/]+\/)?[^/]+)\/*(.*|)$/; ++ var dependencyNameMatch = fragment.match(pathRegExp); ++ if (dependencyNameMatch) { ++ var dependencyName = dependencyNameMatch[1], subPath = dependencyNameMatch[2]; ++ var unqualified = pnpapi.resolveToUnqualified(dependencyName, scriptPath, { considerBuiltins: false }); ++ if (unqualified) { ++ getCompletionEntriesForDirectoryFragment(subPath, ts.normalizePath(unqualified), extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ } + } +- }); ++ catch (_f) { } ++ } ++ else { ++ ts.forEachAncestorDirectory(scriptPath, function (ancestor) { ++ var nodeModules = ts.combinePaths(ancestor, "node_modules"); ++ if (ts.tryDirectoryExists(host, nodeModules)) { ++ getCompletionEntriesForDirectoryFragment(fragment, nodeModules, extensionOptions, host, /*exclude*/ undefined, result); ++ } ++ }); ++ } + } + } + return result; +@@ -126228,6 +126430,7 @@ var ts; + return addReplacementSpans(toComplete, range.pos + prefix.length, names); + } + function getCompletionEntriesFromTypings(host, options, scriptPath, fragmentDirectory, extensionOptions, result) { ++ var _a, _b; + if (result === void 0) { result = []; } + // Check for typings specified in compiler options + var seen = new ts.Map(); +@@ -126236,11 +126439,19 @@ var ts; + var root = typeRoots_1[_i]; + getCompletionEntriesFromDirectories(root); + } +- // Also get all @types typings installed in visible node_modules directories +- for (var _a = 0, _b = ts.findPackageJsons(scriptPath, host); _a < _b.length; _a++) { +- var packageJson = _b[_a]; +- var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); +- getCompletionEntriesFromDirectories(typesDir); ++ if ((_b = (_a = require("module")).findPnpApi) === null || _b === void 0 ? void 0 : _b.call(_a, scriptPath)) { ++ for (var _c = 0, _d = ts.getPnpTypeRoots(scriptPath); _c < _d.length; _c++) { ++ var root = _d[_c]; ++ getCompletionEntriesFromDirectories(root); ++ } ++ } ++ else { ++ // Also get all @types typings installed in visible node_modules directories ++ for (var _e = 0, _f = ts.findPackageJsons(scriptPath, host); _e < _f.length; _e++) { ++ var packageJson = _f[_e]; ++ var typesDir = ts.combinePaths(ts.getDirectoryPath(packageJson), "node_modules/@types"); ++ getCompletionEntriesFromDirectories(typesDir); ++ } + } + return result; + function getCompletionEntriesFromDirectories(directory) { +@@ -154433,9 +154644,9 @@ var ts; + if (isTopLevelDeclarationStatement(statement) && + !isExported(sourceFile, statement, useEs6Exports) && + forEachTopLevelDeclaration(statement, function (d) { return needExport.has(ts.Debug.checkDefined(d.symbol)); })) { +- var exports = addExport(statement, useEs6Exports); +- if (exports) +- return exports; ++ var exports_1 = addExport(statement, useEs6Exports); ++ if (exports_1) ++ return exports_1; + } + return statement; + }); +diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js +index a0e7177a1..1a61d3009 100644 +semver exclusivity >=4.4 +--- a/lib/typingsInstaller.js ++++ b/lib/typingsInstaller.js +@@ -7447,6 +7447,11 @@ var ts; + : new Buffer(input, encoding); + } + function isFileSystemCaseSensitive() { ++ // The PnP runtime is always case-sensitive ++ // @ts-ignore ++ if (process.versions.pnp) { ++ return true; ++ } + // win32\win64 are case insensitive platforms + if (platform === "win32" || platform === "win64") { + return false; +@@ -40956,24 +40961,56 @@ var ts; + ts.getEffectiveTypeRoots = getEffectiveTypeRoots; + /** + * Returns the path to every node_modules/@types directory from some ancestor directory. +- * Returns undefined if there are none. + */ +- function getDefaultTypeRoots(currentDirectory, host) { ++ function getNodeModulesTypeRoots(currentDirectory, host) { + if (!host.directoryExists) { + return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)]; + // And if it doesn't exist, tough. + } +- var typeRoots; ++ var typeRoots = []; + ts.forEachAncestorDirectory(ts.normalizePath(currentDirectory), function (directory) { + var atTypes = ts.combinePaths(directory, nodeModulesAtTypes); + if (host.directoryExists(atTypes)) { +- (typeRoots || (typeRoots = [])).push(atTypes); ++ typeRoots.push(atTypes); + } + return undefined; + }); + return typeRoots; + } + var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types"); ++ function getPnpTypeRoots(currentDirectory) { ++ var pnpapi = getPnpApi(currentDirectory); ++ if (!pnpapi) { ++ return []; ++ } ++ // Some TS consumers pass relative paths that aren't normalized ++ currentDirectory = ts.sys.resolvePath(currentDirectory); ++ var currentPackage = pnpapi.findPackageLocator(currentDirectory + "/"); ++ if (!currentPackage) { ++ return []; ++ } ++ var packageDependencies = pnpapi.getPackageInformation(currentPackage).packageDependencies; ++ var typeRoots = []; ++ for (var _i = 0, _a = Array.from(packageDependencies.entries()); _i < _a.length; _i++) { ++ var _b = _a[_i], name = _b[0], referencish = _b[1]; ++ // eslint-disable-next-line no-null/no-null ++ if (name.startsWith(typesPackagePrefix) && referencish !== null) { ++ var dependencyLocator = pnpapi.getLocator(name, referencish); ++ var packageLocation = pnpapi.getPackageInformation(dependencyLocator).packageLocation; ++ typeRoots.push(ts.getDirectoryPath(packageLocation)); ++ } ++ } ++ return typeRoots; ++ } ++ ts.getPnpTypeRoots = getPnpTypeRoots; ++ var typesPackagePrefix = "@types/"; ++ function getDefaultTypeRoots(currentDirectory, host) { ++ var nmTypes = getNodeModulesTypeRoots(currentDirectory, host); ++ var pnpTypes = getPnpTypeRoots(currentDirectory); ++ if (nmTypes.length > 0 || pnpTypes.length > 0) { ++ return __spreadArray(__spreadArray([], nmTypes, true), pnpTypes, true); ++ } ++ } + /** + * @param {string | undefined} containingFile - file that contains type reference directive, can be undefined if containing file is unknown. + * This is possible in case if resolution is performed for directives specified via 'types' parameter. In this case initial path for secondary lookups +@@ -41087,7 +41124,9 @@ var ts; + } + var result_4; + if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) { +- var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); ++ var searchResult = getPnpApi(initialLocationForSecondaryLookup) ++ ? tryLoadModuleUsingPnpResolution(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState) ++ : loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, /*cache*/ undefined, /*redirectedReference*/ undefined); + result_4 = searchResult && searchResult.value; + } + else { +@@ -41642,9 +41681,12 @@ var ts; + if (traceEnabled) { + trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]); + } +- var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); +- if (!resolved_1) ++ var resolved_1 = getPnpApi(containingDirectory) ++ ? tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) ++ : loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference); ++ if (!resolved_1) { + return undefined; ++ } + var resolvedValue = resolved_1.value; + if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) { + var path = realPath(resolvedValue.path, host, traceEnabled); +@@ -41989,6 +42031,14 @@ var ts; + } + function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) { + var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, undefined, undefined); ++ } ++ function loadModuleFromPnpResolution(extensions, packageDirectory, rest, state) { ++ var candidate = ts.normalizePath(ts.combinePaths(packageDirectory, rest)); ++ return loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, undefined, undefined, true, state, candidate, rest, packageDirectory); ++ } ++ function loadModuleFromSpecificNodeModulesDirectoryImpl(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, candidate, rest, packageDirectory) { ++ var _a; + // First look for a nested package.json, as in `node_modules/foo/bar/package.json`. + var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state); + if (packageInfo) { +@@ -42004,9 +42054,12 @@ var ts; + loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths); + return withPackageId(packageInfo, pathAndExtension); + }; +- var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageName; ++ if (rest === undefined) ++ (_a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest); + if (rest !== "") { // If "rest" is empty, we just did this search above. +- var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); ++ if (packageDirectory === undefined) ++ packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName); + // Don't use a "types" or "main" from here because we're not loading the root, but a subdirectory -- just here for the packageId and path mappings. + packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state); + if (packageInfo && packageInfo.versionPaths) { +@@ -42165,6 +42218,58 @@ var ts; + function toSearchResult(value) { + return value !== undefined ? { value: value } : undefined; + } ++ /** ++ * We only allow PnP to be used as a resolution strategy if TypeScript ++ * itself is executed under a PnP runtime (and we only allow it to access ++ * the current PnP runtime, not any on the disk). This ensures that we ++ * don't execute potentially malicious code that didn't already have a ++ * chance to be executed (if we're running within the runtime, it means ++ * that the runtime has already been executed). ++ * @internal ++ */ ++ function getPnpApi(path) { ++ var findPnpApi = require("module").findPnpApi; ++ if (findPnpApi === undefined) { ++ return undefined; ++ } ++ return findPnpApi(path + "/"); ++ } ++ function loadPnpPackageResolution(packageName, containingDirectory) { ++ try { ++ var resolution = getPnpApi(containingDirectory).resolveToUnqualified(packageName, containingDirectory + "/", { considerBuiltins: false }); ++ return ts.normalizeSlashes(resolution).replace(/\/$/, ''); ++ } ++ catch (_a) { ++ // Nothing to do ++ } ++ } ++ function loadPnpTypePackageResolution(packageName, containingDirectory) { ++ return loadPnpPackageResolution(getTypesPackageName(packageName), containingDirectory); ++ } ++ /* @internal */ ++ function tryLoadModuleUsingPnpResolution(extensions, moduleName, containingDirectory, state) { ++ var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest; ++ var packageResolution = loadPnpPackageResolution(packageName, containingDirectory); ++ var packageFullResolution = packageResolution ++ ? loadModuleFromPnpResolution(extensions, packageResolution, rest, state) ++ : undefined; ++ var resolved; ++ if (packageFullResolution) { ++ resolved = packageFullResolution; ++ } ++ else if (extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) { ++ var typePackageResolution = loadPnpTypePackageResolution(packageName, containingDirectory); ++ var typePackageFullResolution = typePackageResolution ++ ? loadModuleFromPnpResolution(Extensions.DtsOnly, typePackageResolution, rest, state) ++ : undefined; ++ if (typePackageFullResolution) { ++ resolved = typePackageFullResolution; ++ } ++ } ++ if (resolved) { ++ return toSearchResult(resolved); ++ } ++ } + })(ts || (ts = {})); + /* @internal */ + var ts; +@@ -110508,6 +110613,8 @@ var ts; + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial"; + /** Reload completely by re-reading contents of config file from disk and updating program */ + ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full"; ++ /** Reload the resolutions */ ++ ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Resolutions"] = 3] = "Resolutions"; + })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {})); + /** + * Updates the map of shared extended config file watches with a new set of extended config files from a base config file of the project +@@ -117078,6 +117185,30 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var findPnpApi = require("module").findPnpApi; ++ var pnpApi = findPnpApi(path); ++ var locator = pnpApi.findPackageLocator(path); ++ // eslint-disable-next-line no-null/no-null ++ if (locator !== null) { ++ var sourceLocator = pnpApi.findPackageLocator(sourceDirectory + "/"); ++ // Don't use the package name when the imported file is inside ++ // the source directory (prefer a relative path instead) ++ if (locator === sourceLocator) { ++ return undefined; ++ } ++ var information = pnpApi.getPackageInformation(locator); ++ packageName = locator.name; ++ parts = { ++ topLevelNodeModulesIndex: undefined, ++ topLevelPackageNameIndex: undefined, ++ // The last character from packageLocation is the trailing "/", we want to point to it ++ packageRootIndex: information.packageLocation.length - 1, ++ fileNameIndex: path.lastIndexOf("/"), ++ }; ++ } ++ } + if (!parts) { + return undefined; + } +@@ -117108,18 +117239,24 @@ var ts; + if (isRedirect && !isPackageRootPath) { + return undefined; + } +- var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); +- // Get a path that's relative to node_modules or the importing file's path +- // if node_modules folder is in this folder or any of its parent folders, no need to keep it. +- var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); +- if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { +- return undefined; ++ // If PnP is enabled the node_modules entries we'll get will always be relevant even if they ++ // are located in a weird path apparently outside of the source directory ++ if (typeof process.versions.pnp === "undefined") { ++ var globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); ++ // Get a path that's relative to node_modules or the importing file's path ++ // if node_modules folder is in this folder or any of its parent folders, no need to keep it. ++ var pathToTopLevelNodeModules = getCanonicalFileName(moduleSpecifier.substring(0, parts.topLevelNodeModulesIndex)); ++ if (!(ts.startsWith(sourceDirectory, pathToTopLevelNodeModules) || globalTypingsCacheLocation && ts.startsWith(getCanonicalFileName(globalTypingsCacheLocation), pathToTopLevelNodeModules))) { ++ return undefined; ++ } + } + // If the module was found in @types, get the actual Node package name +- var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); +- var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); ++ var nodeModulesDirectoryName = typeof packageName !== "undefined" ++ ? packageName + moduleSpecifier.substring(parts.packageRootIndex) ++ : moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1); ++ var packageNameFromPath = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName); + // For classic resolution, only allow importing from node_modules/@types, not other node_modules +- return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; ++ return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageNameFromPath === nodeModulesDirectoryName ? undefined : packageNameFromPath; + function tryDirectoryWithPackageJson(packageRootIndex) { + var packageRootPath = path.substring(0, packageRootIndex); + var packageJsonPath = ts.combinePaths(packageRootPath, "package.json"); +@@ -117913,6 +118050,10 @@ var ts; + if (configFileName) { + configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); + } ++ var pnpFileWatcher; ++ if (typeof process.versions.pnp !== "undefined") { ++ pnpFileWatcher = watchFile(require.resolve("pnpapi"), scheduleResolutionReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile); ++ } + var compilerHost = ts.createCompilerHostFromProgramHost(host, function () { return compilerOptions; }, directoryStructureHost); + ts.setGetSourceFileAsHashVersioned(compilerHost, host); + // Members for CompilerHost +@@ -117991,6 +118132,10 @@ var ts; + configFileWatcher.close(); + configFileWatcher = undefined; + } ++ if (pnpFileWatcher) { ++ pnpFileWatcher.close(); ++ pnpFileWatcher = undefined; ++ } + extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear(); + extendedConfigCache = undefined; + if (sharedExtendedConfigFileWatchers) { +@@ -118023,7 +118168,8 @@ var ts; + function getCurrentProgram() { + return builderProgram && builderProgram.getProgramOrUndefined(); + } +- function synchronizeProgram() { ++ function synchronizeProgram(forceAllFilesAsInvalidated) { ++ if (forceAllFilesAsInvalidated === void 0) { forceAllFilesAsInvalidated = false; } + writeLog("Synchronizing program"); + clearInvalidateResolutionsOfFailedLookupLocations(); + var program = getCurrentBuilderProgram(); +@@ -118034,7 +118180,7 @@ var ts; + } + } + // All resolutions are invalid if user provided resolutions +- var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution); ++ var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution || forceAllFilesAsInvalidated); + if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) { + if (hasChangedConfigFileParsingErrors) { + builderProgram = createProgram(/*rootNames*/ undefined, /*options*/ undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences); +@@ -118241,6 +118387,12 @@ var ts; + reloadLevel = ts.ConfigFileProgramReloadLevel.Full; + scheduleProgramUpdate(); + } ++ function scheduleResolutionReload() { ++ writeLog("Clearing resolutions"); ++ resolutionCache.clear(); ++ reloadLevel = ts.ConfigFileProgramReloadLevel.Resolutions; ++ scheduleProgramUpdate(); ++ } + function updateProgramWithWatchStatus() { + timerToUpdateProgram = undefined; + reportWatchDiagnostic(ts.Diagnostics.File_change_detected_Starting_incremental_compilation); +@@ -118256,6 +118408,10 @@ var ts; + ts.perfLogger.logStartUpdateProgram("FullConfigReload"); + reloadConfigFile(); + break; ++ case ts.ConfigFileProgramReloadLevel.Resolutions: ++ ts.perfLogger.logStartUpdateProgram("SynchronizeProgramWithResolutions"); ++ synchronizeProgram(/*forceAllFilesAsInvalidated*/ true); ++ break; + default: + ts.perfLogger.logStartUpdateProgram("SynchronizeProgram"); + synchronizeProgram(); diff --git a/packages/plugin-compat/package.json b/packages/plugin-compat/package.json index df3e9cada1d8..06bf1edc9ee6 100644 --- a/packages/plugin-compat/package.json +++ b/packages/plugin-compat/package.json @@ -8,6 +8,7 @@ "@yarnpkg/plugin-patch": "^3.0.0" }, "devDependencies": { + "@types/lodash-es": "4.17.4", "@types/resolve": "^1.17.1", "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", diff --git a/packages/plugin-compat/sources/patches/typescript.patch.ts b/packages/plugin-compat/sources/patches/typescript.patch.ts index b347917c297e..063efdc53a01 100644 --- a/packages/plugin-compat/sources/patches/typescript.patch.ts +++ b/packages/plugin-compat/sources/patches/typescript.patch.ts @@ -2,7 +2,7 @@ let patch: string; export function getPatch() { if (typeof patch === `undefined`) - patch = require(`zlib`).brotliDecompressSync(Buffer.from(`W4WoHUXuVkUGCAuNIrcNLL4cH2+0ZgYC5wGKMPVPDGh9wI0h2AfZJ9IRxIgAv2zUtB7b+tsEhSiZnkXcv+Lg+U6xS1RrxQeLALeJH7GR+4jrD/nlLOqn43UF4xCGdDLvdq6AtPhl6utdl9Nz35WXkFMamcbfqtwqVQBKcCiQswv9DD3JZdP85/MSSpMh3CLju74uKaX5HGWFBNG4wMi6kAlWg/TMKDTHnldfox5VFeGTXC65HFN2ZayjNW7w/ZyobF2pqRpMT+jKqts46EGWB/lExC2sKky27lQEJAvna////WW9abc+04DMEIQagvBn5tSZWbXvOff0FOm7VZLWqKQe0AeCc+49971SVamn0R7JxJxETlIHoTmLq9Sl/sAYGSIIgsSTqun6kUslXQh8A+TLUfaOH3affthSl/VpA5AdTqlts5zqMmdSI7F5WJxpaa8M8/p6kmaKaNoOQKYAVIqotLYGRMcwheH9lOSnTH0Zuk89vfHH0kJYAQIFqug9TcY0/bnFhCUgCYj9q/+MmaWXneTabJlEpTQB4YsQ8EFBOXWmQI5fAXagVX24svSPP2lb5HmTDJptspqFWruvBf3empj69wLzvtPnnxN+vapXFp5f42Yyc8k38+4uKLoe/BPGPGL6x194rsrXvBV5bsL3M8myzJS/ZD5n+RijDdSTnbuR95QQHk8MVa0vJ8XJj88Sym2cW0HB39HM6wcyoGUgNnf0TijkyCu/O+Sj0v0U4fXjMoZb9KOtHA2xtGOjIQ4B/zaTJXLlF2jcKKtyhbFq0s1lqBlDQFOwrEEDO/u0ahftNv7sd53Pkb8qXxlt2SOAljSib6+3aOOy9TpVqfmSmn8D1YnFluM3K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ncP2xlzjubN/uL5gX/Ppc5Fz66HABClsrtyrteJJtA6u2NQSn2IQ19CKUpnwIAAolKZdrxaek+ZLHbTive06zangrLYGJY4KktDwBYr2ZVJx54OQennguqRm1lNDZUPdvL1iyharPXIHZB3dqhKLPMJF04zvLBXdA0lvOr5JYV74/ByzCemBe6vuD6s4iKo7MzdByUS+yhqJmbC98R0h1D1CesnHUvwnnCbrf0lRkCACt9+3yk9lgYB795cOBl7PndjZYGh/toC2NaXJc5xKjrkoAOPCkrgtiaBV/pLqTHJ9peADvNc3OrRpJrmd74DwCEhG732j+LSKKibbO5A1oY4x3Q4pGdQukBSNsEunZNCkC3OXFfZhcpkep1kTCUyA4GkkOoa3e7a6Sh7qremLFk7G7vagcAPFVQA7vlM6cYG+NhO3OOMTlTWXH4Tjm89KY8AGBKq8VUDmi4uFSAaboZuYAZ+NnKAqP1G1wERmiCcq2g6/Ud2BeFz5NnZn+C+MZ6K87daYGhbkIqZN+jcZnf7PknieHPKo3caXmyBlAPoeUJminbb2WV+J49/u7hd95ozphpEWK2uAplCR69FvrOvm2Qqu6jNV6m5c4awGxz1YaqlM1aw+TB2eOj+GGo05+n0idIo0oyYZ0sUhs4AODu2fuv1yYTEpYzSECs7Xb/pKxg4bhvr8limqDYKCESWJWI3kr5X+0uqi0Urba7OJS999yueE65J2tr/wGAkUM9xZ9slaIcl2+KtrjcWLTFccVSEdsy2IBk018L`, `base64`)).toString(); return patch; } diff --git a/packages/plugin-compat/typescript-tests/similar-basename.ts b/packages/plugin-compat/typescript-tests/similar-basename.ts new file mode 100644 index 000000000000..8ccfa946cd80 --- /dev/null +++ b/packages/plugin-compat/typescript-tests/similar-basename.ts @@ -0,0 +1,19 @@ +// Test for https://github.com/yarnpkg/berry/issues/3058 +// Fixed by https://github.com/merceyz/TypeScript/commit/98866a5a740b487c20046d4ffaa36aa1f202dde9 + +// The PnP patch returned the packageLocation with a trailing `/` which +// caused TypeScript to calculate the `subModuleName` incorrectly[1]. +// This caused different files where only the first character of their +// basename was different to end up with the same packageIdKey[2]. +// In this test the affected files were +// @types/lodash-es/find.d.ts -> @types/lodash-es/ind.d.ts@4.17.4 +// @types/lodash-es/bind.d.ts -> @types/lodash-es/ind.d.ts@4.17.4 +// +// 1: https://github.com/microsoft/TypeScript/blob/98866a5a740b487c20046d4ffaa36aa1f202dde9/src/compiler/moduleNameResolver.ts#L20 +// 2: https://github.com/arcanis/TypeScript/blob/36225c32609137d29008e9d3ecf48c6f51456eb5/src/compiler/program.ts#L2625 + +import {find} from 'lodash-es'; + +find([``], () => true); + +// This test is tested by typechecking the repository diff --git a/packages/plugin-constraints/package.json b/packages/plugin-constraints/package.json index f8c4d298146e..faf54675b28e 100644 --- a/packages/plugin-constraints/package.json +++ b/packages/plugin-constraints/package.json @@ -25,7 +25,7 @@ "@yarnpkg/builder": "workspace:*", "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-constraints": "builder build plugin", diff --git a/packages/plugin-exec/package.json b/packages/plugin-exec/package.json index a540995955d4..59da0d4b715d 100644 --- a/packages/plugin-exec/package.json +++ b/packages/plugin-exec/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@yarnpkg/core": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-exec": "builder build plugin", diff --git a/packages/plugin-interactive-tools/package.json b/packages/plugin-interactive-tools/package.json index 4dab5288be26..47d7f191b5a1 100644 --- a/packages/plugin-interactive-tools/package.json +++ b/packages/plugin-interactive-tools/package.json @@ -27,7 +27,7 @@ "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", "@yarnpkg/plugin-essentials": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "repository": { "type": "git", diff --git a/packages/plugin-stage/package.json b/packages/plugin-stage/package.json index 71973c5d8310..c762e4e57d37 100644 --- a/packages/plugin-stage/package.json +++ b/packages/plugin-stage/package.json @@ -16,7 +16,7 @@ "@yarnpkg/builder": "workspace:*", "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-stage": "builder build plugin", diff --git a/packages/plugin-typescript/package.json b/packages/plugin-typescript/package.json index 69e02de70485..99e2ad767cf8 100644 --- a/packages/plugin-typescript/package.json +++ b/packages/plugin-typescript/package.json @@ -21,7 +21,7 @@ "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", "@yarnpkg/plugin-essentials": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-typescript": "builder build plugin", diff --git a/packages/plugin-version/package.json b/packages/plugin-version/package.json index 8625e3c36b11..898779dad2e8 100644 --- a/packages/plugin-version/package.json +++ b/packages/plugin-version/package.json @@ -25,7 +25,7 @@ "@yarnpkg/builder": "workspace:*", "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-version": "builder build plugin", diff --git a/packages/plugin-workspace-tools/package.json b/packages/plugin-workspace-tools/package.json index d58017189c58..13c1ef702071 100644 --- a/packages/plugin-workspace-tools/package.json +++ b/packages/plugin-workspace-tools/package.json @@ -20,7 +20,7 @@ "@yarnpkg/builder": "workspace:*", "@yarnpkg/cli": "workspace:*", "@yarnpkg/core": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "scripts": { "build:plugin-workspace-tools": "builder build plugin", diff --git a/packages/vscode-zipfs/package.json b/packages/vscode-zipfs/package.json index 8bdc449cca2a..34577812e399 100644 --- a/packages/vscode-zipfs/package.json +++ b/packages/vscode-zipfs/package.json @@ -76,7 +76,7 @@ "@yarnpkg/libzip": "workspace:*", "@yarnpkg/pnpify": "workspace:*", "ts-loader": "^7.0.5", - "typescript": "^4.3.2", + "typescript": "^4.4.2", "vsce": "^1.85.1", "webpack": "^5.1.1", "webpack-cli": "^4.0.0-beta.8" diff --git a/packages/yarnpkg-builder/package.json b/packages/yarnpkg-builder/package.json index 104cf8d01372..bb126eb81c4c 100644 --- a/packages/yarnpkg-builder/package.json +++ b/packages/yarnpkg-builder/package.json @@ -31,7 +31,7 @@ "@types/terser-webpack-plugin": "^3.0.0", "@types/webpack-merge": "^4.1.5", "@yarnpkg/monorepo": "workspace:*", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "peerDependencies": { "typescript": "*" diff --git a/packages/yarnpkg-cli/package.json b/packages/yarnpkg-cli/package.json index 5628bbc1181b..30cf9ff2e908 100644 --- a/packages/yarnpkg-cli/package.json +++ b/packages/yarnpkg-cli/package.json @@ -40,7 +40,7 @@ "@yarnpkg/monorepo": "workspace:*", "@yarnpkg/pnpify": "workspace:*", "micromatch": "^4.0.2", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "peerDependencies": { "@yarnpkg/core": "^3.1.0-rc.2" diff --git a/packages/yarnpkg-doctor/package.json b/packages/yarnpkg-doctor/package.json index a43ccbe769d8..278b40d74bed 100644 --- a/packages/yarnpkg-doctor/package.json +++ b/packages/yarnpkg-doctor/package.json @@ -12,7 +12,7 @@ "micromatch": "^4.0.2", "p-limit": "^2.2.0", "tslib": "^1.13.0", - "typescript": "^4.3.2" + "typescript": "^4.4.2" }, "devDependencies": { "@types/micromatch": "^4.0.1", diff --git a/packages/yarnpkg-pnp/package.json b/packages/yarnpkg-pnp/package.json index aa4053f4649c..cbdece10f6e6 100644 --- a/packages/yarnpkg-pnp/package.json +++ b/packages/yarnpkg-pnp/package.json @@ -13,7 +13,7 @@ "@yarnpkg/builder": "workspace:*", "@yarnpkg/libzip": "workspace:*", "@yarnpkg/monorepo": "workspace:*", - "typescript": "^4.3.2", + "typescript": "^4.4.2", "webpack": "^5.1.1", "webpack-cli": "^4.0.0-beta.8" }, diff --git a/tsconfig.json b/tsconfig.json index 1de55cf2f0ca..fe63924d2fc1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "declaration": true, "importHelpers": true, "isolatedModules": true, - "skipLibCheck": true + "skipLibCheck": true, + "useUnknownInCatchVariables": false }, "exclude": [ "packages/*/lib", diff --git a/yarn.lock b/yarn.lock index 77166a4e8e85..9fa50b78c851 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4238,10 +4238,19 @@ __metadata: languageName: node linkType: hard -"@types/lodash@npm:^4.14.136, @types/lodash@npm:^4.14.165, @types/lodash@npm:^4.14.92": - version: 4.14.168 - resolution: "@types/lodash@npm:4.14.168" - checksum: 3326966ee089debde7a7d819e13b64991756e879945852c3357df14a7be837130f697c2cb451be9dd599eb7213fed0975bc9ca0f8f56b46fa73c46a83815b79c +"@types/lodash-es@npm:4.17.4": + version: 4.17.4 + resolution: "@types/lodash-es@npm:4.17.4" + dependencies: + "@types/lodash": "*" + checksum: acffe910e8cffe475b854d74f4372549ec700ac00d9ed885fd85ec34c3f9af1a262bf667000ea9126dc39a05a75f64593d8a5f312cfd7d90e91294d458be08a7 + languageName: node + linkType: hard + +"@types/lodash@npm:*, @types/lodash@npm:^4.14.136, @types/lodash@npm:^4.14.165, @types/lodash@npm:^4.14.92": + version: 4.14.172 + resolution: "@types/lodash@npm:4.14.172" + checksum: 5fc51ea40d7e455bd1c760bcc60c9e81f82d85988666d4d4969bd8311367c63bbf1fe2be48755ba87836710e45fff94014ec164ebe6ccaa72815014981152434 languageName: node linkType: hard @@ -5234,7 +5243,7 @@ __metadata: terser-webpack-plugin: ^3.0.4 ts-loader: ^7.0.5 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 val-loader: ^2.1.1 webpack: ^5.1.1 webpack-merge: ^4.2.2 @@ -5282,7 +5291,7 @@ __metadata: semver: ^7.1.2 tslib: ^1.13.0 typanion: ^3.3.0 - typescript: ^4.3.2 + typescript: ^4.4.2 yup: ^0.32.9 peerDependencies: "@yarnpkg/core": ^3.1.0-rc.2 @@ -5359,7 +5368,7 @@ __metadata: micromatch: ^4.0.2 p-limit: ^2.2.0 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 bin: doctor: ./sources/boot-cli-dev.js languageName: unknown @@ -5492,7 +5501,7 @@ __metadata: typedoc: next typedoc-neo-theme: ^1.0.7 typedoc-plugin-yarn: "portal:./typedoc-plugin-yarn" - typescript: ^4.3.2 + typescript: ^4.4.2 unescape-html: ^1.1.0 unfetch: ^4.1.0 unified: ^7.1.0 @@ -5570,7 +5579,7 @@ __metadata: jest-junit: ^10.0.0 micromatch: ^4.0.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 dependenciesMeta: core-js: built: false @@ -5618,6 +5627,7 @@ __metadata: version: 0.0.0-use.local resolution: "@yarnpkg/plugin-compat@workspace:packages/plugin-compat" dependencies: + "@types/lodash-es": 4.17.4 "@types/resolve": ^1.17.1 "@yarnpkg/cli": "workspace:*" "@yarnpkg/core": "workspace:*" @@ -5647,7 +5657,7 @@ __metadata: node-emoji: ^1.8.1 tau-prolog: ^0.2.66 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -5706,7 +5716,7 @@ __metadata: "@yarnpkg/core": "workspace:*" "@yarnpkg/fslib": "workspace:^2.6.0-rc.1" tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/core": ^3.1.0-rc.2 languageName: unknown @@ -5803,7 +5813,7 @@ __metadata: react: ^16.13.1 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -5957,7 +5967,7 @@ __metadata: "@yarnpkg/fslib": "workspace:^2.6.0-rc.1" clipanion: ^3.0.1 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -5978,7 +5988,7 @@ __metadata: algoliasearch: ^4.2.0 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -6005,7 +6015,7 @@ __metadata: react: ^16.13.1 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -6026,7 +6036,7 @@ __metadata: p-limit: ^2.2.0 tslib: ^1.13.0 typanion: ^3.3.0 - typescript: ^4.3.2 + typescript: ^4.4.2 peerDependencies: "@yarnpkg/cli": ^3.1.0-rc.1 "@yarnpkg/core": ^3.1.0-rc.2 @@ -6044,7 +6054,7 @@ __metadata: "@yarnpkg/monorepo": "workspace:*" resolve.exports: ^1.0.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 webpack: ^5.1.1 webpack-cli: ^4.0.0-beta.8 languageName: unknown @@ -25745,19 +25755,19 @@ typescript@^3.8.3: languageName: node linkType: hard -typescript@^4.3.2: - version: 4.3.2 - resolution: "typescript@npm:4.3.2" +typescript@^4.4.2: + version: 4.4.2 + resolution: "typescript@npm:4.4.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: c2a86fa03ce03b255adc13ccd70a55173ca6539ae12114feca59f34a4e9bb69f14fb7cd5adc6c2416e568cff05c870b89d1366768ec55fce04fbdffb429a1cee + checksum: 194e08e9d1971d667d6fd1a0554616b7022312a2319d70e81a64e502a265992061ee7817ed9a69b52bbabe7a9b85e7938cb8c11c433e40a516b277f8c4dacd51 languageName: node linkType: hard "typescript@patch:typescript@3.7.x#~builtin": version: 3.7.5 - resolution: "typescript@patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=6454cb" + resolution: "typescript@patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=ddd1e8" bin: tsc: bin/tsc tsserver: bin/tsserver @@ -25767,7 +25777,7 @@ typescript@^4.3.2: "typescript@patch:typescript@^3.8.3#~builtin": version: 3.9.5 - resolution: "typescript@patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=6454cb" + resolution: "typescript@patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=ddd1e8" bin: tsc: bin/tsc tsserver: bin/tsserver @@ -25775,13 +25785,13 @@ typescript@^4.3.2: languageName: node linkType: hard -"typescript@patch:typescript@^4.3.2#~builtin": - version: 4.3.2 - resolution: "typescript@patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=6454cb" +"typescript@patch:typescript@^4.4.2#~builtin": + version: 4.4.2 + resolution: "typescript@patch:typescript@npm%3A4.4.2#~builtin::version=4.4.2&hash=ddd1e8" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 120b3cc2f092ec537837a88a996f2bb4147cf775617322be0030451dc80f39fc3af509b6a1cfebdc43679d466784312189ab2e8c6180c33d603f3d55bbe6d576 + checksum: 1f30617046271a94d6821fe9da9c4705111e0a2f5479269c82f65aa76b2421ff90def8838dd35b1aa464d015248b06c89ff867bd282f4822b5ee18b7f92f95ee languageName: node linkType: hard @@ -26660,7 +26670,7 @@ typescript@^4.3.2: "@yarnpkg/pnpify": "workspace:*" ts-loader: ^7.0.5 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.2 vsce: ^1.85.1 webpack: ^5.1.1 webpack-cli: ^4.0.0-beta.8