diff --git a/.pnp.cjs b/.pnp.cjs index 10bc662dfed7..a3b386ec87fd 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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -8736,7 +8736,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/eslint", @@ -8886,7 +8886,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/eslint", @@ -8991,7 +8991,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "typescript" @@ -9469,7 +9469,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9510,7 +9510,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9551,7 +9551,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9591,7 +9591,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["val-loader", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:2.1.1"], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"], ["webpack-merge", "npm:4.2.2"] @@ -9638,7 +9638,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9685,7 +9685,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9732,7 +9732,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9779,7 +9779,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9826,7 +9826,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9873,7 +9873,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9920,7 +9920,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -9967,7 +9967,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10014,7 +10014,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10061,7 +10061,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10108,7 +10108,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10155,7 +10155,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "packagePeers": [ @@ -10201,7 +10201,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["yup", "npm:0.32.9"] ], "linkType": "SOFT", @@ -10283,7 +10283,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -10334,7 +10334,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/eslint", @@ -10457,7 +10457,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["unescape-html", "npm:1.1.0"], ["unfetch", "npm:4.1.0"], ["unified", "npm:7.1.0"], @@ -10560,7 +10560,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -10935,7 +10935,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -11693,7 +11693,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -12142,7 +12142,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -14427,7 +14427,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14449,7 +14449,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14471,7 +14471,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14493,7 +14493,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14515,7 +14515,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14537,7 +14537,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14559,7 +14559,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14581,7 +14581,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14603,7 +14603,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14625,7 +14625,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14647,7 +14647,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14669,7 +14669,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14691,7 +14691,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/yarnpkg__cli", @@ -14711,7 +14711,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -14731,7 +14731,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -14756,7 +14756,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -14776,7 +14776,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "SOFT", }] @@ -14793,7 +14793,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["webpack", "virtual:16110bda3ce959c103b1979c5d750ceb8ac9cfbd2049c118b6278e46e65aa65fd17e71e04a0ce5f75b7ca3203efd8e9c9b03c948a76c7f4bca807539915b5cfc#npm:5.38.1"], ["webpack-cli", "virtual:16110bda3ce959c103b1979c5d750ceb8ac9cfbd2049c118b6278e46e65aa65fd17e71e04a0ce5f75b7ca3203efd8e9c9b03c948a76c7f4bca807539915b5cfc#npm:4.0.0-beta.8"] ], @@ -22364,7 +22364,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["vue-template-compiler", null], ["webpack", "virtual:e04a2594c769771b96db34e7a92a8a3af1c98ae86dce662589a5c5d5209e16875506f8cb5f4c2230a2b2ae06335b14466352c4ed470d39edf9edb6c515984525#npm:5.38.1"] ], @@ -29425,7 +29425,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587"] ], "packagePeers": [ "@types/react-dom", @@ -37938,7 +37938,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/typescript", @@ -38068,7 +38068,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@types/typescript", @@ -38307,7 +38307,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38336,7 +38336,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38364,7 +38364,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=3a4587"] ], "packagePeers": [ "@strictsoftware/typedoc-plugin-monorepo", @@ -38414,30 +38414,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=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587"] ], "linkType": "SOFT", }] ]], ["typescript", [ - ["patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=d8b4e7", { - "packageLocation": "./.yarn/cache/typescript-patch-d2df8dc698-fb62f24bfd.zip/node_modules/typescript/", + ["patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=3a4587", { + "packageLocation": "./.yarn/cache/typescript-patch-af6997381f-fb62f24bfd.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=3a4587"] ], "linkType": "HARD", }], - ["patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=d8b4e7", { - "packageLocation": "./.yarn/cache/typescript-patch-d32c42dc9f-ac6b67d951.zip/node_modules/typescript/", + ["patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587", { + "packageLocation": "./.yarn/cache/typescript-patch-ec1e73f0d0-ac6b67d951.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=d8b4e7"] + ["typescript", "patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587"] ], "linkType": "HARD", }], - ["patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=d8b4e7", { - "packageLocation": "./.yarn/cache/typescript-patch-6b7c9f6752-3d3dec06ba.zip/node_modules/typescript/", + ["patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587", { + "packageLocation": "./.yarn/cache/typescript-patch-b2b6f622e3-9b5b29131e.zip/node_modules/typescript/", "packageDependencies": [ - ["typescript", "patch:typescript@npm%3A4.3.2#~builtin::version=4.3.2&hash=d8b4e7"] + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"] ], "linkType": "HARD", }] @@ -39435,7 +39435,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=d8b4e7"], + ["typescript", "patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587"], ["vsce", "npm:1.85.1"], ["webpack", "virtual:4bb0e72ae00ec402a28e80560124ee13357b1a5221665b7175877ddc6b8b2b98eebe4584a111245801ecf7cecb9de577d076505c0dbcf9292aaff35440a2302f#npm:5.38.1"], ["webpack-cli", "virtual:4bb0e72ae00ec402a28e80560124ee13357b1a5221665b7175877ddc6b8b2b98eebe4584a111245801ecf7cecb9de577d076505c0dbcf9292aaff35440a2302f#npm:4.0.0-beta.8"] @@ -45756,13 +45756,15 @@ class FakeFS { async changeFilePromise(p, content, opts = {}) { if (Buffer.isBuffer(content)) { - return this.changeFileBufferPromise(p, content); + return this.changeFileBufferPromise(p, content, opts); } else { return this.changeFileTextPromise(p, content, opts); } } - async changeFileBufferPromise(p, content) { + async changeFileBufferPromise(p, content, { + mode + } = {}) { let current = Buffer.alloc(0); try { @@ -45771,11 +45773,14 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - await this.writeFilePromise(p, content); + await this.writeFilePromise(p, content, { + mode + }); } async changeFileTextPromise(p, content, { - automaticNewlines + automaticNewlines, + mode } = {}) { let current = ``; @@ -45786,18 +45791,22 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - await this.writeFilePromise(p, normalizedContent); + await this.writeFilePromise(p, normalizedContent, { + mode + }); } changeFileSync(p, content, opts = {}) { if (Buffer.isBuffer(content)) { - return this.changeFileBufferSync(p, content); + return this.changeFileBufferSync(p, content, opts); } else { return this.changeFileTextSync(p, content, opts); } } - changeFileBufferSync(p, content) { + changeFileBufferSync(p, content, { + mode + } = {}) { let current = Buffer.alloc(0); try { @@ -45806,11 +45815,14 @@ class FakeFS { } if (Buffer.compare(current, content) === 0) return; - this.writeFileSync(p, content); + this.writeFileSync(p, content, { + mode + }); } changeFileTextSync(p, content, { - automaticNewlines = false + automaticNewlines = false, + mode } = {}) { let current = ``; @@ -45821,7 +45833,9 @@ class FakeFS { const normalizedContent = automaticNewlines ? normalizeLineEndings(current, content) : content; if (current === normalizedContent) return; - this.writeFileSync(p, normalizedContent); + this.writeFileSync(p, normalizedContent, { + mode + }); } async movePromise(fromP, toP) { @@ -46871,7 +46885,7 @@ class VirtualFS extends ProxiedFS { if (this.pathUtils.isAbsolute(p)) return VirtualFS.resolveVirtual(p); const resolvedRoot = VirtualFS.resolveVirtual(this.baseFs.resolve(PortablePath.dot)); const resolvedP = VirtualFS.resolveVirtual(this.baseFs.resolve(p)); - return ppath.relative(resolvedRoot, resolvedP); + return ppath.relative(resolvedRoot, resolvedP) || PortablePath.dot; } mapFromBase(p) { @@ -46961,6 +46975,7 @@ const constants_S_IFLNK = 0o120000; ;// CONCATENATED MODULE: ../yarnpkg-fslib/sources/statUtils.ts +const DEFAULT_MODE = constants_S_IFREG | 0o644; class DirEntry { constructor() { this.name = ``; @@ -47012,7 +47027,7 @@ class StatEntry { this.birthtime = new Date(0); this.dev = 0; this.ino = 0; - this.mode = constants_S_IFREG | 0o644; + this.mode = DEFAULT_MODE; this.nlink = 1; this.rdev = 0; this.blocks = 1; @@ -47067,7 +47082,7 @@ class BigIntStatsEntry { this.birthtime = new Date(0); this.dev = BigInt(0); this.ino = BigInt(0); - this.mode = BigInt(constants_S_IFREG | 0o644); + this.mode = BigInt(DEFAULT_MODE); this.nlink = BigInt(1); this.rdev = BigInt(0); this.blocks = BigInt(1); @@ -47443,6 +47458,9 @@ function toUnixTimestamp(time) { throw new Error(`Invalid time`); } +function makeEmptyArchive() { + return Buffer.from([0x50, 0x4B, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); +} class ZipFS extends BasePortableFakeFS { constructor(source, opts) { super(); @@ -47463,10 +47481,7 @@ class ZipFS extends BasePortableFakeFS { this.libzip = opts.libzip; const pathOptions = opts; this.level = typeof pathOptions.level !== `undefined` ? pathOptions.level : DEFAULT_COMPRESSION_LEVEL; - - if (source === null) { - source = Buffer.from([0x50, 0x4B, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]); - } + source !== null && source !== void 0 ? source : source = makeEmptyArchive(); if (typeof source === `string`) { const { @@ -47631,15 +47646,22 @@ class ZipFS extends BasePortableFakeFS { return; } - const previousMod = this.baseFs.existsSync(this.path) ? this.baseFs.statSync(this.path).mode & 0o777 : null; - const rc = this.libzip.close(this.zip); - if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); // this.libzip overrides the chmod when writing the archive, which is a weird - // behavior I don't totally understand (plus the umask seems bogus in some - // weird cases - maybe related to emscripten?) - // - // See also https://github.com/nih-at/libzip/issues/77 + const newMode = this.baseFs.existsSync(this.path) || this.stats.mode === DEFAULT_MODE ? undefined : this.stats.mode; // zip_close doesn't persist empty archives + + if (this.entries.size === 0) { + this.discardAndClose(); + this.baseFs.writeFileSync(this.path, makeEmptyArchive(), { + mode: newMode + }); + } else { + const rc = this.libzip.close(this.zip); + if (rc === -1) throw this.makeLibzipError(this.libzip.getError(this.zip)); + + if (typeof newMode !== `undefined`) { + this.baseFs.chmodSync(this.path, newMode); + } + } - if (previousMod === null) this.baseFs.chmodSync(this.path, this.stats.mode);else if (previousMod !== (this.baseFs.statSync(this.path).mode & 0o777)) this.baseFs.chmodSync(this.path, previousMod); this.ready = false; } @@ -48305,6 +48327,7 @@ class ZipFS extends BasePortableFakeFS { async writeFilePromise(p, content, opts) { const { encoding, + mode, index, resolvedP } = this.prepareWriteFile(p, opts); @@ -48313,24 +48336,27 @@ class ZipFS extends BasePortableFakeFS { }), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) this.registerEntry(resolvedP, newIndex); - if (newIndex !== index) { - this.registerEntry(resolvedP, newIndex); + if (mode !== null) { + await this.chmodPromise(resolvedP, mode); } } writeFileSync(p, content, opts) { const { encoding, + mode, index, resolvedP } = this.prepareWriteFile(p, opts); if (index !== undefined && typeof opts === `object` && opts.flag && opts.flag.includes(`a`)) content = Buffer.concat([this.getFileSource(index), Buffer.from(content)]); if (encoding !== null) content = content.toString(encoding); const newIndex = this.setFileSource(resolvedP, content); + if (newIndex !== index) this.registerEntry(resolvedP, newIndex); - if (newIndex !== index) { - this.registerEntry(resolvedP, newIndex); + if (mode !== null) { + this.chmodSync(resolvedP, mode); } } @@ -48339,11 +48365,22 @@ class ZipFS extends BasePortableFakeFS { if (this.readOnly) throw EROFS(`open '${p}'`); const resolvedP = this.resolveFilename(`open '${p}'`, p); if (this.listings.has(resolvedP)) throw EISDIR(`open '${p}'`); - let encoding = null; - if (typeof opts === `string`) encoding = opts;else if (typeof opts === `object` && opts.encoding) encoding = opts.encoding; + let encoding = null, + mode = null; + + if (typeof opts === `string`) { + encoding = opts; + } else if (typeof opts === `object`) { + ({ + encoding = null, + mode = null + } = opts); + } + const index = this.entries.get(resolvedP); return { encoding, + mode, resolvedP, index }; @@ -48621,24 +48658,23 @@ class ZipFS extends BasePortableFakeFS { const ZIP_FD = 0x80000000; -const DOT_ZIP = `.zip`; /** - * Extracts the archive part (ending in the first `.zip`) from a path. + * Extracts the archive part (ending in the first instance of `extension`) from a path. * * The indexOf-based implementation is ~3.7x faster than a RegExp-based implementation. */ -const getArchivePart = path => { - let idx = path.indexOf(DOT_ZIP); +const getArchivePart = (path, extension) => { + let idx = path.indexOf(extension); if (idx <= 0) return null; let nextCharIdx = idx; while (idx >= 0) { - nextCharIdx = idx + DOT_ZIP.length; + nextCharIdx = idx + extension.length; if (path[nextCharIdx] === ppath.sep) break; // Disallow files named ".zip" if (path[idx - 1] === ppath.sep) return null; - idx = path.indexOf(DOT_ZIP, nextCharIdx); + idx = path.indexOf(extension, nextCharIdx); } // The path either has to end in ".zip" or contain an archive subpath (".zip/...") @@ -48653,7 +48689,8 @@ class ZipOpenFS extends BasePortableFakeFS { maxOpenFiles = Infinity, readOnlyArchives = false, useCache = true, - maxAge = 5000 + maxAge = 5000, + fileExtensions = null }) { super(); this.fdMap = new Map(); @@ -48669,6 +48706,7 @@ class ZipOpenFS extends BasePortableFakeFS { this.maxOpenFiles = maxOpenFiles; this.readOnlyArchives = readOnlyArchives; this.maxAge = maxAge; + this.fileExtensions = fileExtensions; } static async openPromise(fn, opts) { @@ -49508,7 +49546,21 @@ class ZipOpenFS extends BasePortableFakeFS { let filePath = ``; while (true) { - const archivePart = getArchivePart(p.substr(filePath.length)); + const pathPartWithArchive = p.substr(filePath.length); + let archivePart; + + if (!this.fileExtensions) { + archivePart = getArchivePart(pathPartWithArchive, `.zip`); + } else { + for (const ext of this.fileExtensions) { + archivePart = getArchivePart(pathPartWithArchive, ext); + + if (archivePart) { + break; + } + } + } + if (!archivePart) return null; filePath = this.pathUtils.join(filePath, archivePart); @@ -49863,7 +49915,7 @@ class URLFS extends ProxiedFS { ;// CONCATENATED MODULE: ../yarnpkg-fslib/sources/patchFs.ts -const SYNC_IMPLEMENTATIONS = new Set([`accessSync`, `appendFileSync`, `createReadStream`, `chmodSync`, `chownSync`, `closeSync`, `copyFileSync`, `linkSync`, `lstatSync`, `fstatSync`, `lutimesSync`, `mkdirSync`, `openSync`, `opendirSync`, `readSync`, `readlinkSync`, `readFileSync`, `readdirSync`, `readlinkSync`, `realpathSync`, `renameSync`, `rmdirSync`, `statSync`, `symlinkSync`, `truncateSync`, `unlinkSync`, `unwatchFile`, `utimesSync`, `watch`, `watchFile`, `writeFileSync`, `writeSync`]); +const SYNC_IMPLEMENTATIONS = new Set([`accessSync`, `appendFileSync`, `createReadStream`, `createWriteStream`, `chmodSync`, `chownSync`, `closeSync`, `copyFileSync`, `linkSync`, `lstatSync`, `fstatSync`, `lutimesSync`, `mkdirSync`, `openSync`, `opendirSync`, `readSync`, `readlinkSync`, `readFileSync`, `readdirSync`, `readlinkSync`, `realpathSync`, `renameSync`, `rmdirSync`, `statSync`, `symlinkSync`, `truncateSync`, `unlinkSync`, `unwatchFile`, `utimesSync`, `watch`, `watchFile`, `writeFileSync`, `writeSync`]); const ASYNC_IMPLEMENTATIONS = new Set([`accessPromise`, `appendFilePromise`, `chmodPromise`, `chownPromise`, `closePromise`, `copyFilePromise`, `linkPromise`, `fstatPromise`, `lstatPromise`, `lutimesPromise`, `mkdirPromise`, `openPromise`, `opendirPromise`, `readdirPromise`, `realpathPromise`, `readFilePromise`, `readdirPromise`, `readlinkPromise`, `renamePromise`, `rmdirPromise`, `statPromise`, `symlinkPromise`, `truncatePromise`, `unlinkPromise`, `utimesPromise`, `writeFilePromise`, `writeSync`]); const FILEHANDLE_IMPLEMENTATIONS = new Set([`appendFilePromise`, `chmodPromise`, `chownPromise`, `closePromise`, `readPromise`, `readFilePromise`, `statPromise`, `truncatePromise`, `utimesPromise`, `writePromise`, `writeFilePromise`]); function patchFs(patchedFs, fakeFs) { 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.1-rc-b51e0e63f5-14a64cd01c.zip b/.yarn/cache/typescript-npm-4.4.1-rc-b51e0e63f5-14a64cd01c.zip new file mode 100644 index 000000000000..2ae4e283d455 Binary files /dev/null and b/.yarn/cache/typescript-npm-4.4.1-rc-b51e0e63f5-14a64cd01c.zip differ diff --git a/.yarn/cache/typescript-patch-6b7c9f6752-3d3dec06ba.zip b/.yarn/cache/typescript-patch-6b7c9f6752-3d3dec06ba.zip deleted file mode 100644 index 29061995f0a0..000000000000 Binary files a/.yarn/cache/typescript-patch-6b7c9f6752-3d3dec06ba.zip and /dev/null differ diff --git a/.yarn/cache/typescript-patch-d2df8dc698-fb62f24bfd.zip b/.yarn/cache/typescript-patch-af6997381f-fb62f24bfd.zip similarity index 100% rename from .yarn/cache/typescript-patch-d2df8dc698-fb62f24bfd.zip rename to .yarn/cache/typescript-patch-af6997381f-fb62f24bfd.zip diff --git a/.yarn/cache/typescript-patch-b2b6f622e3-9b5b29131e.zip b/.yarn/cache/typescript-patch-b2b6f622e3-9b5b29131e.zip new file mode 100644 index 000000000000..1c8b69c60fa9 Binary files /dev/null and b/.yarn/cache/typescript-patch-b2b6f622e3-9b5b29131e.zip differ diff --git a/.yarn/cache/typescript-patch-d32c42dc9f-ac6b67d951.zip b/.yarn/cache/typescript-patch-ec1e73f0d0-ac6b67d951.zip similarity index 100% rename from .yarn/cache/typescript-patch-d32c42dc9f-ac6b67d951.zip rename to .yarn/cache/typescript-patch-ec1e73f0d0-ac6b67d951.zip 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/package.json b/package.json index ebd28f962aff..552a6bc0b43c 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.1-rc" }, "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..389dff70a5d5 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.1-rc", "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 da0ca00b8ecc..36d02bcbea16 100644 --- a/packages/plugin-compat/extra/typescript/gen-typescript-patch.js +++ b/packages/plugin-compat/extra/typescript/gen-typescript-patch.js @@ -71,6 +71,13 @@ const SLICES = [ onto: `28e3e6ff2f49f1dbf06d31809ec73dbe42f1aa63`, range: `>=4.3 <4.4`, }, + // https://github.com/merceyz/TypeScript/tree/merceyz/pnp-4.4 + { + from: `0fc83b4d571df33a3c40c20c0eba68965fb52aca`, + to: `98866a5a740b487c20046d4ffaa36aa1f202dde9`, + onto: `55dd850009603aafa6ef8cc88020fa30d217d5b6`, + range: `>=4.4`, + }, ]; async function fetch(url) { diff --git a/packages/plugin-compat/extra/typescript/patch-c9078d484579dcd7af2a3e01b62cd251.diff b/packages/plugin-compat/extra/typescript/patch-c9078d484579dcd7af2a3e01b62cd251.diff new file mode 100644 index 000000000000..c90c9a42eee1 --- /dev/null +++ b/packages/plugin-compat/extra/typescript/patch-c9078d484579dcd7af2a3e01b62cd251.diff @@ -0,0 +1,2820 @@ +diff --git a/lib/tsc.js b/lib/tsc.js +index 1b1811b4d..42c785d3d 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; + } +@@ -33386,21 +33389,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) { +@@ -33507,7 +33541,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 { +@@ -33950,9 +33986,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); +@@ -34263,6 +34302,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); +@@ -34277,9 +34324,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) { +@@ -34417,6 +34467,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) { +@@ -91001,6 +91092,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; +@@ -96667,6 +96759,25 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -96694,14 +96805,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"); +@@ -97429,6 +97544,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; +@@ -97500,6 +97619,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) { +@@ -97532,7 +97655,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(); +@@ -97542,7 +97666,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); +@@ -97726,6 +97850,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); +@@ -97741,6 +97871,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 ac49ace7b..a88e5e2b7 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; +@@ -40962,24 +40967,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 +@@ -41093,7 +41130,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 { +@@ -41648,9 +41687,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); +@@ -41995,6 +42037,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) { +@@ -42010,9 +42060,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) { +@@ -42171,6 +42224,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; +@@ -110517,6 +110622,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 +@@ -117087,6 +117194,29 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -117117,18 +117247,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"); +@@ -117922,6 +118058,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 +@@ -118000,6 +118140,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) { +@@ -118032,7 +118176,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(); +@@ -118043,7 +118188,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); +@@ -118250,6 +118395,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); +@@ -118265,6 +118416,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(); +@@ -123686,7 +123841,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)); +@@ -123694,6 +123849,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); }); +@@ -125507,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); +@@ -125519,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); +@@ -125535,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; +@@ -125647,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(); +@@ -125655,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) { +@@ -153846,9 +154056,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; + }); +@@ -162653,6 +162863,37 @@ 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 pnpApi_1 = require("pnpapi"); ++ var basePath_1 = this.getCurrentDirectory(); ++ var getPnpPath_1 = function (path) { ++ try { ++ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); ++ return pnpApi_1.resolveToUnqualified(targetLocator.name, 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; + }; +@@ -163269,6 +163510,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); +@@ -165121,7 +165363,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) { +@@ -165139,7 +165381,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 +@@ -165165,6 +165407,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(); + } + } + }; +@@ -166159,6 +166403,25 @@ var ts; + }); + }; + /*@internal*/ ++ ProjectService.prototype.watchPnpFile = function () { ++ var _this = this; ++ if (typeof process.versions.pnp === "undefined") { ++ return; ++ } ++ var pnpFileName = require.resolve("pnpapi"); ++ 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()); +@@ -171030,6 +171293,9 @@ var ts; + } + try { + var args = [ts.combinePaths(__dirname, "watchGuard.js"), path]; ++ if (typeof process.versions.pnp !== "undefined") { ++ args.unshift('-r', require.resolve('pnpapi')); ++ } + if (logger.hasLevel(server.LogLevel.verbose)) { + logger.info("Starting " + process.execPath + " with args:" + server.stringifyIndented(args)); + } +@@ -171290,6 +171556,9 @@ var ts; + break; + } + } ++ if (typeof process.versions.pnp !== "undefined") { ++ execArgv.unshift('-r', require.resolve('pnpapi')); ++ } + 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 8a80179e8..f4953df32 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 47d329d5e..762c02cbf 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; +@@ -41156,24 +41161,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 +@@ -41287,7 +41324,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 { +@@ -41842,9 +41881,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); +@@ -42189,6 +42231,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) { +@@ -42204,9 +42254,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) { +@@ -42365,6 +42418,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; +@@ -110711,6 +110816,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 +@@ -117281,6 +117388,29 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -117311,18 +117441,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"); +@@ -118116,6 +118252,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 +@@ -118194,6 +118334,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) { +@@ -118226,7 +118370,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(); +@@ -118237,7 +118382,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); +@@ -118444,6 +118589,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); +@@ -118459,6 +118610,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(); +@@ -124268,7 +124423,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)); +@@ -124276,6 +124431,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); }); +@@ -126089,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); +@@ -126101,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); +@@ -126117,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; +@@ -126229,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(); +@@ -126237,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) { +@@ -154428,9 +154638,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; + }); +@@ -162847,6 +163057,37 @@ 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 pnpApi_1 = require("pnpapi"); ++ var basePath_1 = this.getCurrentDirectory(); ++ var getPnpPath_1 = function (path) { ++ try { ++ var targetLocator = pnpApi_1.findPackageLocator(path + "/"); ++ return pnpApi_1.resolveToUnqualified(targetLocator.name, 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; + }; +@@ -163463,6 +163704,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); +@@ -165315,7 +165557,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) { +@@ -165333,7 +165575,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 +@@ -165359,6 +165601,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(); + } + } + }; +@@ -166353,6 +166597,25 @@ var ts; + }); + }; + /*@internal*/ ++ ProjectService.prototype.watchPnpFile = function () { ++ var _this = this; ++ if (typeof process.versions.pnp === "undefined") { ++ return; ++ } ++ var pnpFileName = require.resolve("pnpapi"); ++ 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 260d3c005..cbda09150 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 189df310e..eb34ff0b5 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; +@@ -41156,24 +41161,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 +@@ -41287,7 +41324,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 { +@@ -41842,9 +41881,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); +@@ -42189,6 +42231,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) { +@@ -42204,9 +42254,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) { +@@ -42365,6 +42418,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; +@@ -110711,6 +110816,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 +@@ -117281,6 +117388,29 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -117311,18 +117441,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"); +@@ -118116,6 +118252,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 +@@ -118194,6 +118334,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) { +@@ -118226,7 +118370,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(); +@@ -118237,7 +118382,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); +@@ -118444,6 +118589,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); +@@ -118459,6 +118610,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(); +@@ -124268,7 +124423,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)); +@@ -124276,6 +124431,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); }); +@@ -126089,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); +@@ -126101,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); +@@ -126117,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; +@@ -126229,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(); +@@ -126237,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) { +@@ -154428,9 +154638,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 4b0f6f740..0c268e7e8 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 43e2dcfb4..b9203780c 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; +@@ -41156,24 +41161,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 +@@ -41287,7 +41324,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 { +@@ -41842,9 +41881,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); +@@ -42189,6 +42231,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) { +@@ -42204,9 +42254,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) { +@@ -42365,6 +42418,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; +@@ -110711,6 +110816,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 +@@ -117281,6 +117388,29 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -117311,18 +117441,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"); +@@ -118116,6 +118252,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 +@@ -118194,6 +118334,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) { +@@ -118226,7 +118370,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(); +@@ -118237,7 +118382,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); +@@ -118444,6 +118589,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); +@@ -118459,6 +118610,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(); +@@ -124268,7 +124423,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)); +@@ -124276,6 +124431,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); }); +@@ -126089,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); +@@ -126101,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); +@@ -126117,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; +@@ -126229,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(); +@@ -126237,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) { +@@ -154428,9 +154638,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 a987e972d..02a82a38a 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; +@@ -40951,24 +40956,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 +@@ -41082,7 +41119,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 { +@@ -41637,9 +41676,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); +@@ -41984,6 +42026,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) { +@@ -41999,9 +42049,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) { +@@ -42160,6 +42213,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; +@@ -110506,6 +110611,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 +@@ -117076,6 +117183,29 @@ var ts; + return undefined; + } + var parts = getNodeModulePathParts(path); ++ var packageName; ++ if (!parts && typeof process.versions.pnp !== "undefined") { ++ var pnpApi = require("pnpapi"); ++ 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; + } +@@ -117106,18 +117236,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"); +@@ -117911,6 +118047,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 +@@ -117989,6 +118129,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) { +@@ -118021,7 +118165,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(); +@@ -118032,7 +118177,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); +@@ -118239,6 +118384,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); +@@ -118254,6 +118405,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/sources/patches/typescript.patch.ts b/packages/plugin-compat/sources/patches/typescript.patch.ts index 2892ad3178c6..dd47d00e5476 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(`W5apHUVuB6iP9+XUKHI7Ev8c/cdfNEKHjQM8kP+6Ab0cb8DoUd2V5FQSdyFE4dEa8YRNX9Oe10ES2NWRodlAD6/6qdVoSqAXVoGxy2NEVOxVxQuZbaTsejiQgrzbVHEN6eznCkiLqpu/URUXa9Y3noZwowGU48+f6n9+voSyMIQ8ZDyy5NExlu2oT0hQHfOwUnrF8tNX9T8/X6/7aJyodCy5S1lTXZMePMtMtcCjUyhAG6RnRqEu9v37vkadqdqYVyCBkKmyy/ZvjfvrD/nlLOqn43UF4xCGdDLvNvz/fsNUbbJiGiwvZKPpbhzYA/cP/IdBVTRzXIpCDx9xG53k7P/nq5UpG+NdG66XMwxCnh62fLiZfKpMnrj1Xr0eOK6aAHkGIHsMp2dNG1n3qurVBwiAnLbSkHLeJ5GSVEEon8UACa7xPpKJtBsEif6a+Ur/KO1tKYf2OZm/60xH7o32E2ID1hPgsKjdXf9MUKaoRQ10jhsH/UsrVkBaRO0Cwsrw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MTo9AREAABC/h+NdaqtEXQYktakfSx9ppTuz/gGAgIHkgKrPlhayVWUwt5n/eIZsDVTx9i5l0one4rxujKjxkiLkTgF1YCILlVawEzh5hiwshbI8hQ9X2st+pndfbrnsf4lb5ZOBjI//jczy/s0QPs5AENfMheiS8b1JbJ1r4sdLx+53nzr8f9M3f8sjFkRwyfZz14eP8afS5W5ZXw+6uysh//BGv2xIrUe+d44BQKiX3NR8q/bEJ5tMtXCPaHuDZLp0Z3vdVO4fQpnNnybX2h9rKfinR8uV+aOLyUSqmF1510arbUh9lTEoRRvSiEcdIm3yFAAQg1EiM4ZPS9chS5bbaeWaZmltFZZWKaXEsFiahAIArMc1D3wXU7hRF0SNnspoPBD1XCVbsw1RW5UGsQJx6+p0zBqOp2tk1TrAje00rhhrRLK0p0Pnft7949B8j3BXJGB0Xqdn6KDZvoT3le2+GR/AT13Q4RedtyLWXUjlNXXLzgIHALrdtXFC2NjNA4KWUHa7u7ECMQsJeq/EAtMgFJU61Oi0WINoLC2CvTHL2dNdSLdNtG0A2yVks8vCdE/6BwDIprXdtn4gAH00mjMEAI+LZ1e/igFMrNJZACT1Am1vNMFSxn/dLEsIb6WLxECIuDaQnIa49qa7Rhrirq6MGUta7s6sdgDAUwUxcFM+c4qWMam3M+dokVhrxbOgZWajAABTCkCPiUsRmJaakRZIG6KZsbOlQDQ6u0EuiEdTk2NdCC7yoTRqfakB1P2uSYhWSU57aIyh9joypJ/f9+jVr/tbxO9BidSghyboagA11dk98QalueD0jKv78EHdn60HnGzQOMR8bSVKM/1w+oq7X4E12foEGmrQhF8NYL63cqP8SWd4fmH4dh/wOD7kT/Ap/pwnlSpJW3Vq8SrJEADYVLNGJDloaC405z6ak/R8wj/FNZf5FTCtvrtcCR5NVyqidyJ39nbXKceKttisjBPnke1wbrn4HwAY43TrPgyHc3tjTORkS4wOOire8Z7jnIFemuDMxQxWXA7Ogon+BQ==`, `base64`)).toString(); return patch; } diff --git a/packages/plugin-constraints/package.json b/packages/plugin-constraints/package.json index b15ae5a19837..240d8abdd06f 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.1-rc" }, "scripts": { "build:plugin-constraints": "builder build plugin", diff --git a/packages/plugin-exec/package.json b/packages/plugin-exec/package.json index fce7a26537ac..3e3f2a2cb23b 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.1-rc" }, "scripts": { "build:plugin-exec": "builder build plugin", diff --git a/packages/plugin-interactive-tools/package.json b/packages/plugin-interactive-tools/package.json index 78b3440b25a2..92d66341bb74 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.1-rc" }, "repository": { "type": "git", diff --git a/packages/plugin-stage/package.json b/packages/plugin-stage/package.json index d87c60755301..cfaaf37b55b8 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.1-rc" }, "scripts": { "build:plugin-stage": "builder build plugin", diff --git a/packages/plugin-typescript/package.json b/packages/plugin-typescript/package.json index 19fc4a03581d..b7807ea503f1 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.1-rc" }, "scripts": { "build:plugin-typescript": "builder build plugin", diff --git a/packages/plugin-version/package.json b/packages/plugin-version/package.json index 0da1f25931aa..aad4bce28611 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.1-rc" }, "scripts": { "build:plugin-version": "builder build plugin", diff --git a/packages/plugin-workspace-tools/package.json b/packages/plugin-workspace-tools/package.json index 65b951b831f9..d55edcc8443b 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.1-rc" }, "scripts": { "build:plugin-workspace-tools": "builder build plugin", diff --git a/packages/vscode-zipfs/package.json b/packages/vscode-zipfs/package.json index aa10b3968748..cb68af1eab32 100644 --- a/packages/vscode-zipfs/package.json +++ b/packages/vscode-zipfs/package.json @@ -75,7 +75,7 @@ "@yarnpkg/libzip": "workspace:*", "@yarnpkg/pnpify": "workspace:*", "ts-loader": "^7.0.5", - "typescript": "^4.3.2", + "typescript": "^4.4.1-rc", "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 9cd7f70cef72..fa90e7b2f487 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.1-rc" }, "peerDependencies": { "typescript": "*" diff --git a/packages/yarnpkg-cli/package.json b/packages/yarnpkg-cli/package.json index 7168b8fc19d9..a2abea1e363d 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.1-rc" }, "peerDependencies": { "@yarnpkg/core": "^3.1.0-rc.1" diff --git a/packages/yarnpkg-doctor/package.json b/packages/yarnpkg-doctor/package.json index 3aaf0f987699..a39e55bc0165 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.1-rc" }, "devDependencies": { "@types/micromatch": "^4.0.1", diff --git a/packages/yarnpkg-pnp/package.json b/packages/yarnpkg-pnp/package.json index d0e9e91a71a6..91d19cec7501 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.1-rc", "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 7fa040894288..10917df9c192 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5234,7 +5234,7 @@ __metadata: terser-webpack-plugin: ^3.0.4 ts-loader: ^7.0.5 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc val-loader: ^2.1.1 webpack: ^5.1.1 webpack-merge: ^4.2.2 @@ -5282,7 +5282,7 @@ __metadata: semver: ^7.1.2 tslib: ^1.13.0 typanion: ^3.3.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc yup: ^0.32.9 peerDependencies: "@yarnpkg/core": ^3.1.0-rc.1 @@ -5359,7 +5359,7 @@ __metadata: micromatch: ^4.0.2 p-limit: ^2.2.0 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc bin: doctor: ./sources/boot-cli-dev.js languageName: unknown @@ -5492,7 +5492,7 @@ __metadata: typedoc: next typedoc-neo-theme: ^1.0.7 typedoc-plugin-yarn: "portal:./typedoc-plugin-yarn" - typescript: ^4.3.2 + typescript: ^4.4.1-rc unescape-html: ^1.1.0 unfetch: ^4.1.0 unified: ^7.1.0 @@ -5570,7 +5570,7 @@ __metadata: jest-junit: ^10.0.0 micromatch: ^4.0.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc dependenciesMeta: core-js: built: false @@ -5647,7 +5647,7 @@ __metadata: node-emoji: ^1.8.1 tau-prolog: ^0.2.66 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -5706,7 +5706,7 @@ __metadata: "@yarnpkg/core": "workspace:*" "@yarnpkg/fslib": "workspace:^2.5.1" tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/core": ^3.1.0-rc.1 languageName: unknown @@ -5803,7 +5803,7 @@ __metadata: react: ^16.13.1 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -5957,7 +5957,7 @@ __metadata: "@yarnpkg/fslib": "workspace:^2.5.1" clipanion: ^3.0.1 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -5978,7 +5978,7 @@ __metadata: algoliasearch: ^4.2.0 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -6005,7 +6005,7 @@ __metadata: react: ^16.13.1 semver: ^7.1.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -6026,7 +6026,7 @@ __metadata: p-limit: ^2.2.0 tslib: ^1.13.0 typanion: ^3.3.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc peerDependencies: "@yarnpkg/cli": ^3.0.1 "@yarnpkg/core": ^3.1.0-rc.1 @@ -6044,7 +6044,7 @@ __metadata: "@yarnpkg/monorepo": "workspace:*" resolve.exports: ^1.0.2 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc webpack: ^5.1.1 webpack-cli: ^4.0.0-beta.8 languageName: unknown @@ -25745,19 +25745,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.1-rc: + version: 4.4.1-rc + resolution: "typescript@npm:4.4.1-rc" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: c2a86fa03ce03b255adc13ccd70a55173ca6539ae12114feca59f34a4e9bb69f14fb7cd5adc6c2416e568cff05c870b89d1366768ec55fce04fbdffb429a1cee + checksum: 14a64cd01ccbd8d31cc4f22a756cd1ce54c8cba7e30a77e005ea623a187b7baa20b784acf60a3e71b5227961ff70bd275657f809703185a0c265220060bf3c53 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=d8b4e7" + resolution: "typescript@patch:typescript@npm%3A3.7.5#~builtin::version=3.7.5&hash=3a4587" bin: tsc: bin/tsc tsserver: bin/tsserver @@ -25767,7 +25767,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=d8b4e7" + resolution: "typescript@patch:typescript@npm%3A3.9.5#~builtin::version=3.9.5&hash=3a4587" bin: tsc: bin/tsc tsserver: bin/tsserver @@ -25775,13 +25775,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=d8b4e7" +"typescript@patch:typescript@^4.4.1-rc#~builtin": + version: 4.4.1-rc + resolution: "typescript@patch:typescript@npm%3A4.4.1-rc#~builtin::version=4.4.1-rc&hash=3a4587" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 3d3dec06ba6e5b05caa292355712ed9db813fa1c2377630b1f24b42e5ee8957f0bcdd5efd1500c970a11a6f684897f5728f5542ac822932227159a0611499a5e + checksum: 9b5b29131e31226da8a708d3941005ced7df269910ff90e954cfff126d68ef2e5e429aa07d64f50e8ff77acc239bb84bdac80bad3f06fd21ff4d571aaff5a3f6 languageName: node linkType: hard @@ -26660,7 +26660,7 @@ typescript@^4.3.2: "@yarnpkg/pnpify": "workspace:*" ts-loader: ^7.0.5 tslib: ^1.13.0 - typescript: ^4.3.2 + typescript: ^4.4.1-rc vsce: ^1.85.1 webpack: ^5.1.1 webpack-cli: ^4.0.0-beta.8