Compare commits

...

3 Commits

Author SHA1 Message Date
Kelvin Schoofs b9ce772ffa (Test) Add authHandler
3 years ago
Kelvin Schoofs 1ead0e7453 Update build process to use Node 14 and `vsce` 2+
3 years ago
Kelvin Schoofs b31879d5f4 Fix/improve map-error.js utility
3 years ago

@ -29,10 +29,10 @@ jobs:
with:
artifact_prefix: "vscode-sshfs"
artifact_extension: "vsix"
- name: Use Node.js 12.x
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
- name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
@ -46,7 +46,7 @@ jobs:
- name: Install dependencies
run: yarn --immutable
- name: Build extension
run: yarn dlx vsce package -o ${{ steps.utils.outputs.artifact_name }} --yarn
run: yarn vsce package -o ${{ steps.utils.outputs.artifact_name }} --yarn
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.1
with:

@ -2510,6 +2510,16 @@ __metadata:
languageName: node
linkType: hard
"azure-devops-node-api@npm:^11.0.1":
version: 11.1.0
resolution: "azure-devops-node-api@npm:11.1.0"
dependencies:
tunnel: 0.0.6
typed-rest-client: ^1.8.4
checksum: 2b465407a5704e4faa4786ef7c4937c70eb608bc967b29a9b0d956b9babbd7ae18d95535f544cd443c855005861a6e71187d9cd21ab16311bdcf29ab5909ecd4
languageName: node
linkType: hard
"babel-eslint@npm:^10.1.0":
version: 10.1.0
resolution: "babel-eslint@npm:10.1.0"
@ -2599,6 +2609,13 @@ __metadata:
languageName: node
linkType: hard
"base64-js@npm:^1.3.1":
version: 1.5.1
resolution: "base64-js@npm:1.5.1"
checksum: 669632eb3745404c2f822a18fc3a0122d2f9a7a13f7fb8b5823ee19d1d2ff9ee5b52c53367176ea4ad093c332fd5ab4bd0ebae5a8e27917a4105a4cfc86b1005
languageName: node
linkType: hard
"batch@npm:0.6.1":
version: 0.6.1
resolution: "batch@npm:0.6.1"
@ -2629,6 +2646,17 @@ __metadata:
languageName: node
linkType: hard
"bl@npm:^4.0.3":
version: 4.1.0
resolution: "bl@npm:4.1.0"
dependencies:
buffer: ^5.5.0
inherits: ^2.0.4
readable-stream: ^3.4.0
checksum: 9e8521fa7e83aa9427c6f8ccdcba6e8167ef30cc9a22df26effcc5ab682ef91d2cbc23a239f945d099289e4bbcfae7a192e9c28c84c6202e710a0dfec3722662
languageName: node
linkType: hard
"body-parser@npm:1.19.0":
version: 1.19.0
resolution: "body-parser@npm:1.19.0"
@ -2702,6 +2730,13 @@ __metadata:
languageName: node
linkType: hard
"buffer-crc32@npm:~0.2.3":
version: 0.2.13
resolution: "buffer-crc32@npm:0.2.13"
checksum: 06252347ae6daca3453b94e4b2f1d3754a3b146a111d81c68924c22d91889a40623264e95e67955b1cb4a68cbedf317abeabb5140a9766ed248973096db5ce1c
languageName: node
linkType: hard
"buffer-from@npm:^1.0.0":
version: 1.1.2
resolution: "buffer-from@npm:1.1.2"
@ -2716,6 +2751,16 @@ __metadata:
languageName: node
linkType: hard
"buffer@npm:^5.5.0":
version: 5.7.1
resolution: "buffer@npm:5.7.1"
dependencies:
base64-js: ^1.3.1
ieee754: ^1.1.13
checksum: e2cf8429e1c4c7b8cbd30834ac09bd61da46ce35f5c22a78e6c2f04497d6d25541b16881e30a019c6fd3154150650ccee27a308eff3e26229d788bbdeb08ab84
languageName: node
linkType: hard
"bytes@npm:3.0.0":
version: 3.0.0
resolution: "bytes@npm:3.0.0"
@ -2829,6 +2874,34 @@ __metadata:
languageName: node
linkType: hard
"cheerio-select@npm:^1.5.0":
version: 1.5.0
resolution: "cheerio-select@npm:1.5.0"
dependencies:
css-select: ^4.1.3
css-what: ^5.0.1
domelementtype: ^2.2.0
domhandler: ^4.2.0
domutils: ^2.7.0
checksum: d4506d8b9ad330a18f9de3a5a22138d0804063e92aac2fc020384cc52ab86d2194d2ae614fc87f0e2a62b6a6dd0c28ad23669cec64331172a9f99ad604863010
languageName: node
linkType: hard
"cheerio@npm:^1.0.0-rc.9":
version: 1.0.0-rc.10
resolution: "cheerio@npm:1.0.0-rc.10"
dependencies:
cheerio-select: ^1.5.0
dom-serializer: ^1.3.2
domhandler: ^4.2.0
htmlparser2: ^6.1.0
parse5: ^6.0.1
parse5-htmlparser2-tree-adapter: ^6.0.1
tslib: ^2.2.0
checksum: ace2f9c5809737534b1320d11d48762013694fa905b4deacac81a634edac178c1b0534f79d7b1896a88ce489db6cb539f222317996b21c8b6923ce413dcc1a2f
languageName: node
linkType: hard
"chokidar@npm:^3.5.1":
version: 3.5.2
resolution: "chokidar@npm:3.5.2"
@ -2848,6 +2921,13 @@ __metadata:
languageName: node
linkType: hard
"chownr@npm:^1.1.1":
version: 1.1.4
resolution: "chownr@npm:1.1.4"
checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d
languageName: node
linkType: hard
"chownr@npm:^2.0.0":
version: 2.0.0
resolution: "chownr@npm:2.0.0"
@ -2965,6 +3045,13 @@ __metadata:
languageName: node
linkType: hard
"commander@npm:^6.1.0":
version: 6.2.1
resolution: "commander@npm:6.2.1"
checksum: d7090410c0de6bc5c67d3ca41c41760d6d268f3c799e530aafb73b7437d1826bbf0d2a3edac33f8b57cc9887b4a986dce307fa5557e109be40eadb7c43b21742
languageName: node
linkType: hard
"commander@npm:^7.0.0, commander@npm:^7.1.0":
version: 7.2.0
resolution: "commander@npm:7.2.0"
@ -3217,6 +3304,13 @@ __metadata:
languageName: node
linkType: hard
"css-what@npm:^5.0.1":
version: 5.1.0
resolution: "css-what@npm:5.1.0"
checksum: 0b75d1bac95c885c168573c85744a6c6843d8c33345f54f717218b37ea6296b0e99bb12105930ea170fd4a921990392a7c790c16c585c1d8960c49e2b7ec39f7
languageName: node
linkType: hard
"cssesc@npm:^3.0.0":
version: 3.0.0
resolution: "cssesc@npm:3.0.0"
@ -3341,6 +3435,15 @@ __metadata:
languageName: node
linkType: hard
"decompress-response@npm:^4.2.0":
version: 4.2.1
resolution: "decompress-response@npm:4.2.1"
dependencies:
mimic-response: ^2.0.0
checksum: 4e783ca4dfe9417354d61349750fe05236f565a4415a6ca20983a311be2371debaedd9104c0b0e7b36e5f167aeaae04f84f1a0b3f8be4162f1d7d15598b8fdba
languageName: node
linkType: hard
"deep-equal@npm:^1.0.1":
version: 1.1.1
resolution: "deep-equal@npm:1.1.1"
@ -3355,6 +3458,13 @@ __metadata:
languageName: node
linkType: hard
"deep-extend@npm:^0.6.0":
version: 0.6.0
resolution: "deep-extend@npm:0.6.0"
checksum: 7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7
languageName: node
linkType: hard
"deep-is@npm:^0.1.3":
version: 0.1.3
resolution: "deep-is@npm:0.1.3"
@ -3431,6 +3541,15 @@ __metadata:
languageName: node
linkType: hard
"detect-libc@npm:^1.0.3":
version: 1.0.3
resolution: "detect-libc@npm:1.0.3"
bin:
detect-libc: ./bin/detect-libc.js
checksum: daaaed925ffa7889bd91d56e9624e6c8033911bb60f3a50a74a87500680652969dbaab9526d1e200a4c94acf80fc862a22131841145a0a8482d60a99c24f4a3e
languageName: node
linkType: hard
"detect-node@npm:^2.0.4":
version: 2.1.0
resolution: "detect-node@npm:2.1.0"
@ -3500,7 +3619,7 @@ __metadata:
languageName: node
linkType: hard
"dom-serializer@npm:^1.0.1":
"dom-serializer@npm:^1.0.1, dom-serializer@npm:^1.3.2":
version: 1.3.2
resolution: "dom-serializer@npm:1.3.2"
dependencies:
@ -3538,6 +3657,17 @@ __metadata:
languageName: node
linkType: hard
"domutils@npm:^2.7.0":
version: 2.8.0
resolution: "domutils@npm:2.8.0"
dependencies:
dom-serializer: ^1.0.1
domelementtype: ^2.2.0
domhandler: ^4.2.0
checksum: abf7434315283e9aadc2a24bac0e00eab07ae4313b40cc239f89d84d7315ebdfd2fb1b5bf750a96bc1b4403d7237c7b2ebf60459be394d625ead4ca89b934391
languageName: node
linkType: hard
"dot-case@npm:^3.0.4":
version: 3.0.4
resolution: "dot-case@npm:3.0.4"
@ -3613,6 +3743,15 @@ __metadata:
languageName: node
linkType: hard
"end-of-stream@npm:^1.1.0, end-of-stream@npm:^1.4.1":
version: 1.4.4
resolution: "end-of-stream@npm:1.4.4"
dependencies:
once: ^1.4.0
checksum: 530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b
languageName: node
linkType: hard
"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.8.0":
version: 5.8.2
resolution: "enhanced-resolve@npm:5.8.2"
@ -3639,6 +3778,13 @@ __metadata:
languageName: node
linkType: hard
"entities@npm:~2.0.0":
version: 2.0.3
resolution: "entities@npm:2.0.3"
checksum: 5a7899fcc622e0d76afdeafe4c58a6b40ae3a8ee4772e5825a648c11a2ca324a9a02515386f512e466baac4aeb551f3d3b79eaece5cd98369b9f8601be336b1a
languageName: node
linkType: hard
"env-paths@npm:^2.2.0":
version: 2.2.1
resolution: "env-paths@npm:2.2.1"
@ -4135,6 +4281,13 @@ __metadata:
languageName: node
linkType: hard
"expand-template@npm:^2.0.3":
version: 2.0.3
resolution: "expand-template@npm:2.0.3"
checksum: 588c19847216421ed92befb521767b7018dc88f88b0576df98cb242f20961425e96a92cbece525ef28cc5becceae5d544ae0f5b9b5e2aa05acb13716ca5b3099
languageName: node
linkType: hard
"express@npm:^4.17.1":
version: 4.17.1
resolution: "express@npm:4.17.1"
@ -4232,6 +4385,15 @@ __metadata:
languageName: node
linkType: hard
"fd-slicer@npm:~1.1.0":
version: 1.1.0
resolution: "fd-slicer@npm:1.1.0"
dependencies:
pend: ~1.2.0
checksum: c8585fd5713f4476eb8261150900d2cb7f6ff2d87f8feb306ccc8a1122efd152f1783bdb2b8dc891395744583436bfd8081d8e63ece0ec8687eeefea394d4ff2
languageName: node
linkType: hard
"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
@ -4363,6 +4525,13 @@ __metadata:
languageName: node
linkType: hard
"fs-constants@npm:^1.0.0":
version: 1.0.0
resolution: "fs-constants@npm:1.0.0"
checksum: 18f5b718371816155849475ac36c7d0b24d39a11d91348cfcb308b4494824413e03572c403c86d3a260e049465518c4f0d5bd00f0371cdfcad6d4f30a85b350d
languageName: node
linkType: hard
"fs-minipass@npm:^2.0.0":
version: 2.1.0
resolution: "fs-minipass@npm:2.1.0"
@ -4459,6 +4628,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"github-from-package@npm:0.0.0":
version: 0.0.0
resolution: "github-from-package@npm:0.0.0"
checksum: 14e448192a35c1e42efee94c9d01a10f42fe790375891a24b25261246ce9336ab9df5d274585aedd4568f7922246c2a78b8a8cd2571bfe99c693a9718e7dd0e3
languageName: node
linkType: hard
"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2":
version: 5.1.2
resolution: "glob-parent@npm:5.1.2"
@ -4475,6 +4651,20 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"glob@npm:^7.0.6":
version: 7.2.0
resolution: "glob@npm:7.2.0"
dependencies:
fs.realpath: ^1.0.0
inflight: ^1.0.4
inherits: 2
minimatch: ^3.0.4
once: ^1.3.0
path-is-absolute: ^1.0.0
checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134
languageName: node
linkType: hard
"glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6":
version: 7.1.7
resolution: "glob@npm:7.1.7"
@ -4618,6 +4808,15 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"hosted-git-info@npm:^4.0.2":
version: 4.0.2
resolution: "hosted-git-info@npm:4.0.2"
dependencies:
lru-cache: ^6.0.0
checksum: d1b2d7720398ce96a788bd38d198fbddce089a2381f63cfb01743e6c7e5aed656e5547fe74090fb9fe53b2cb785b0e8c9ebdddadff48ed26bb471dd23cd25458
languageName: node
linkType: hard
"hpack.js@npm:^2.1.6":
version: 2.1.6
resolution: "hpack.js@npm:2.1.6"
@ -4842,6 +5041,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"ieee754@npm:^1.1.13":
version: 1.2.1
resolution: "ieee754@npm:1.2.1"
checksum: 5144c0c9815e54ada181d80a0b810221a253562422e7c6c3a60b1901154184f49326ec239d618c416c1c5945a2e197107aee8d986a3dd836b53dffefd99b5e7e
languageName: node
linkType: hard
"ignore@npm:^4.0.6":
version: 4.0.6
resolution: "ignore@npm:4.0.6"
@ -4909,7 +5115,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:~2.0.3":
"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3":
version: 2.0.4
resolution: "inherits@npm:2.0.4"
checksum: 4a48a733847879d6cf6691860a6b1e3f0f4754176e4d71494c41f3475553768b10f84b5ce1d40fbd0e34e6bfbb864ee35858ad4dd2cf31e02fc4a154b724d7f1
@ -4923,6 +5129,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"ini@npm:~1.3.0":
version: 1.3.8
resolution: "ini@npm:1.3.8"
checksum: dfd98b0ca3a4fc1e323e38a6c8eb8936e31a97a918d3b377649ea15bdb15d481207a0dda1021efbd86b464cae29a0d33c1d7dcaf6c5672bee17fa849bc50a1b3
languageName: node
linkType: hard
"internal-ip@npm:^6.2.0":
version: 6.2.0
resolution: "internal-ip@npm:6.2.0"
@ -5390,6 +5603,17 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"keytar@npm:^7.7.0":
version: 7.7.0
resolution: "keytar@npm:7.7.0"
dependencies:
node-addon-api: ^3.0.0
node-gyp: latest
prebuild-install: ^6.0.0
checksum: ea180b713a15e7baa52323d38940255d2df809ed5c2f91d132bf1c44c93515ad28e41119a4589786c28b1c2728010e2b259b8083c032484df1ced61655ea3d6e
languageName: node
linkType: hard
"killable@npm:^1.0.1":
version: 1.0.1
resolution: "killable@npm:1.0.1"
@ -5420,6 +5644,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"leven@npm:^3.1.0":
version: 3.1.0
resolution: "leven@npm:3.1.0"
checksum: 638401d534585261b6003db9d99afd244dfe82d75ddb6db5c0df412842d5ab30b2ef18de471aaec70fe69a46f17b4ae3c7f01d8a4e6580ef7adb9f4273ad1e55
languageName: node
linkType: hard
"levn@npm:^0.4.1":
version: 0.4.1
resolution: "levn@npm:0.4.1"
@ -5444,6 +5675,15 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"linkify-it@npm:^2.0.0":
version: 2.2.0
resolution: "linkify-it@npm:2.2.0"
dependencies:
uc.micro: ^1.0.1
checksum: d198871d0b3f3cfdb745dae564bfd6743474f20cd0ef1057e6ca29451834749e7f3da52b59b4de44e98f31a1e5c71bdad160490d4ae54de251cbcde57e4d7837
languageName: node
linkType: hard
"load-json-file@npm:^4.0.0":
version: 4.0.0
resolution: "load-json-file@npm:4.0.0"
@ -5634,6 +5874,21 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"markdown-it@npm:^10.0.0":
version: 10.0.0
resolution: "markdown-it@npm:10.0.0"
dependencies:
argparse: ^1.0.7
entities: ~2.0.0
linkify-it: ^2.0.0
mdurl: ^1.0.1
uc.micro: ^1.0.5
bin:
markdown-it: bin/markdown-it.js
checksum: 69f5ee640cbebb451b80d3cce308fff7230767e05c0f8c206a1e413775b7a6e5a08e91e9f3ec59f9b5c5a45493f9ce7ac089379cffb60c9d3e6677ed9d535086
languageName: node
linkType: hard
"mdn-data@npm:2.0.14":
version: 2.0.14
resolution: "mdn-data@npm:2.0.14"
@ -5641,6 +5896,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"mdurl@npm:^1.0.1":
version: 1.0.1
resolution: "mdurl@npm:1.0.1"
checksum: 71731ecba943926bfbf9f9b51e28b5945f9411c4eda80894221b47cc105afa43ba2da820732b436f0798fd3edbbffcd1fc1415843c41a87fea08a41cc1e3d02b
languageName: node
linkType: hard
"media-typer@npm:0.3.0":
version: 0.3.0
resolution: "media-typer@npm:0.3.0"
@ -5721,7 +5983,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"mime@npm:1.6.0":
"mime@npm:1.6.0, mime@npm:^1.3.4":
version: 1.6.0
resolution: "mime@npm:1.6.0"
bin:
@ -5744,6 +6006,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"mimic-response@npm:^2.0.0":
version: 2.1.0
resolution: "mimic-response@npm:2.1.0"
checksum: 014fad6ab936657e5f2f48bd87af62a8e928ebe84472aaf9e14fec4fcb31257a5edff77324d8ac13ddc6685ba5135cf16e381efac324e5f174fb4ddbf902bf07
languageName: node
linkType: hard
"mini-css-extract-plugin@npm:0.11.3":
version: 0.11.3
resolution: "mini-css-extract-plugin@npm:0.11.3"
@ -5765,7 +6034,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"minimatch@npm:^3.0.4":
"minimatch@npm:^3.0.3, minimatch@npm:^3.0.4":
version: 3.0.4
resolution: "minimatch@npm:3.0.4"
dependencies:
@ -5774,7 +6043,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"minimist@npm:^1.2.0, minimist@npm:^1.2.5":
"minimist@npm:^1.2.0, minimist@npm:^1.2.3, minimist@npm:^1.2.5":
version: 1.2.5
resolution: "minimist@npm:1.2.5"
checksum: 86706ce5b36c16bfc35c5fe3dbb01d5acdc9a22f2b6cc810b6680656a1d2c0e44a0159c9a3ba51fb072bb5c203e49e10b51dcd0eec39c481f4c42086719bae52
@ -5851,6 +6120,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"mkdirp-classic@npm:^0.5.2, mkdirp-classic@npm:^0.5.3":
version: 0.5.3
resolution: "mkdirp-classic@npm:0.5.3"
checksum: 3f4e088208270bbcc148d53b73e9a5bd9eef05ad2cbf3b3d0ff8795278d50dd1d11a8ef1875ff5aea3fa888931f95bfcb2ad5b7c1061cfefd6284d199e6776ac
languageName: node
linkType: hard
"mkdirp@npm:^0.5.3, mkdirp@npm:^0.5.5":
version: 0.5.5
resolution: "mkdirp@npm:0.5.5"
@ -5918,6 +6194,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"mute-stream@npm:~0.0.4":
version: 0.0.8
resolution: "mute-stream@npm:0.0.8"
checksum: ff48d251fc3f827e5b1206cda0ffdaec885e56057ee86a3155e1951bc940fd5f33531774b1cc8414d7668c10a8907f863f6561875ee6e8768931a62121a531a1
languageName: node
linkType: hard
"nanoid@npm:^3.1.23":
version: 3.1.25
resolution: "nanoid@npm:3.1.25"
@ -5927,6 +6210,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"napi-build-utils@npm:^1.0.1":
version: 1.0.2
resolution: "napi-build-utils@npm:1.0.2"
checksum: 06c14271ee966e108d55ae109f340976a9556c8603e888037145d6522726aebe89dd0c861b4b83947feaf6d39e79e08817559e8693deedc2c94e82c5cbd090c7
languageName: node
linkType: hard
"natural-compare@npm:^1.4.0":
version: 1.4.0
resolution: "natural-compare@npm:1.4.0"
@ -5958,6 +6248,24 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"node-abi@npm:^2.21.0":
version: 2.30.1
resolution: "node-abi@npm:2.30.1"
dependencies:
semver: ^5.4.1
checksum: 3f4b0c912ce4befcd7ceab4493ba90b51d60dfcc90f567c93f731d897ef8691add601cb64c181683b800f21d479d68f9a6e15d8ab8acd16a5706333b9e30a881
languageName: node
linkType: hard
"node-addon-api@npm:^3.0.0":
version: 3.2.1
resolution: "node-addon-api@npm:3.2.1"
dependencies:
node-gyp: latest
checksum: 2369986bb0881ccd9ef6bacdf39550e07e089a9c8ede1cbc5fc7712d8e2faa4d50da0e487e333d4125f8c7a616c730131d1091676c9d499af1d74560756b4a18
languageName: node
linkType: hard
"node-forge@npm:^0.10.0":
version: 0.10.0
resolution: "node-forge@npm:0.10.0"
@ -6050,7 +6358,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"npmlog@npm:^4.1.2":
"npmlog@npm:^4.0.1, npmlog@npm:^4.1.2":
version: 4.1.2
resolution: "npmlog@npm:4.1.2"
dependencies:
@ -6178,7 +6486,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"once@npm:^1.3.0":
"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0":
version: 1.4.0
resolution: "once@npm:1.4.0"
dependencies:
@ -6381,6 +6689,31 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"parse-semver@npm:^1.1.1":
version: 1.1.1
resolution: "parse-semver@npm:1.1.1"
dependencies:
semver: ^5.1.0
checksum: 0a9abc24b829b4db6dfd733727c2dd15b085c388b7c0bcc03e801412c1ebfe53a087613240f90af0dbed3a3283057bd320014b0df4b9222e01b4e3757b5c6e6a
languageName: node
linkType: hard
"parse5-htmlparser2-tree-adapter@npm:^6.0.1":
version: 6.0.1
resolution: "parse5-htmlparser2-tree-adapter@npm:6.0.1"
dependencies:
parse5: ^6.0.1
checksum: 1848378b355d027915645c13f13f982e60502d201f53bc2067a508bf2dba4aac08219fc781dcd160167f5f50f0c73f58d20fa4fb3d90ee46762c20234fa90a6d
languageName: node
linkType: hard
"parse5@npm:^6.0.1":
version: 6.0.1
resolution: "parse5@npm:6.0.1"
checksum: 7d569a176c5460897f7c8f3377eff640d54132b9be51ae8a8fa4979af940830b2b0c296ce75e5bd8f4041520aadde13170dbdec44889975f906098ea0002f4bd
languageName: node
linkType: hard
"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3":
version: 1.3.3
resolution: "parseurl@npm:1.3.3"
@ -6465,6 +6798,13 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"pend@npm:~1.2.0":
version: 1.2.0
resolution: "pend@npm:1.2.0"
checksum: 6c72f5243303d9c60bd98e6446ba7d30ae29e3d56fdb6fae8767e8ba6386f33ee284c97efe3230a0d0217e2b1723b8ab490b1bbf34fcbb2180dbc8a9de47850d
languageName: node
linkType: hard
"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3":
version: 2.3.0
resolution: "picomatch@npm:2.3.0"
@ -6938,6 +7278,29 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"prebuild-install@npm:^6.0.0":
version: 6.1.4
resolution: "prebuild-install@npm:6.1.4"
dependencies:
detect-libc: ^1.0.3
expand-template: ^2.0.3
github-from-package: 0.0.0
minimist: ^1.2.3
mkdirp-classic: ^0.5.3
napi-build-utils: ^1.0.1
node-abi: ^2.21.0
npmlog: ^4.0.1
pump: ^3.0.0
rc: ^1.2.7
simple-get: ^3.0.3
tar-fs: ^2.0.0
tunnel-agent: ^0.6.0
bin:
prebuild-install: bin.js
checksum: de4313eda821305912af922700a2db04bb8e77fe8aa9c2788550f1000c026cbefc82da468ec0c0a37764c5417bd8169dbd540928535fb38d00bb9bbd673dd217
languageName: node
linkType: hard
"prelude-ls@npm:^1.2.1":
version: 1.2.1
resolution: "prelude-ls@npm:1.2.1"
@ -7014,6 +7377,16 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"pump@npm:^3.0.0":
version: 3.0.0
resolution: "pump@npm:3.0.0"
dependencies:
end-of-stream: ^1.1.0
once: ^1.3.1
checksum: e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9
languageName: node
linkType: hard
"punycode@npm:1.3.2":
version: 1.3.2
resolution: "punycode@npm:1.3.2"
@ -7035,6 +7408,15 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"qs@npm:^6.9.1":
version: 6.10.1
resolution: "qs@npm:6.10.1"
dependencies:
side-channel: ^1.0.4
checksum: 00e390dbf98eff4d8ff121b61ab2fe32106852290de99ecd0e40fc76651c4101f43fc6cc8313cb69423563876fc532951b11dda55d2917def05f292258263480
languageName: node
linkType: hard
"query-string@npm:^4.1.0":
version: 4.3.4
resolution: "query-string@npm:4.3.4"
@ -7087,6 +7469,20 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"rc@npm:^1.2.7":
version: 1.2.8
resolution: "rc@npm:1.2.8"
dependencies:
deep-extend: ^0.6.0
ini: ~1.3.0
minimist: ^1.2.0
strip-json-comments: ~2.0.1
bin:
rc: ./cli.js
checksum: 2e26e052f8be2abd64e6d1dabfbd7be03f80ec18ccbc49562d31f617d0015fbdbcf0f9eed30346ea6ab789e0fdfe4337f033f8016efdbee0df5354751842080e
languageName: node
linkType: hard
"react-dom@npm:^17.0.2":
version: 17.0.2
resolution: "react-dom@npm:17.0.2"
@ -7166,6 +7562,15 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"read@npm:^1.0.7":
version: 1.0.7
resolution: "read@npm:1.0.7"
dependencies:
mute-stream: ~0.0.4
checksum: 2777c254e5732cac96f5d0a1c0f6b836c89ae23d8febd405b206f6f24d5de1873420f1a0795e0e3721066650d19adf802c7882c4027143ee0acf942a4f34f97b
languageName: node
linkType: hard
"readable-stream@npm:^2.0.1, readable-stream@npm:^2.0.6":
version: 2.3.7
resolution: "readable-stream@npm:2.3.7"
@ -7181,7 +7586,7 @@ fsevents@~2.3.2:
languageName: node
linkType: hard
"readable-stream@npm:^3.0.6":
"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.4.0":
version: 3.6.0
resolution: "readable-stream@npm:3.6.0"
dependencies:
@ -7432,7 +7837,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"rimraf@npm:^3.0.2":
"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
version: 3.0.2
resolution: "rimraf@npm:3.0.2"
dependencies:
@ -7473,6 +7878,13 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"sax@npm:>=0.6.0":
version: 1.2.4
resolution: "sax@npm:1.2.4"
checksum: d3df7d32b897a2c2f28e941f732c71ba90e27c24f62ee918bd4d9a8cfb3553f2f81e5493c7f0be94a11c1911b643a9108f231dd6f60df3fa9586b5d2e3e9e1fe
languageName: node
linkType: hard
"scheduler@npm:^0.20.2":
version: 0.20.2
resolution: "scheduler@npm:0.20.2"
@ -7532,7 +7944,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.5.1, semver@npm:^5.6.0":
"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.1.0, semver@npm:^5.4.1, semver@npm:^5.5.0, semver@npm:^5.5.1, semver@npm:^5.6.0":
version: 5.7.1
resolution: "semver@npm:5.7.1"
bin:
@ -7691,6 +8103,24 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"simple-concat@npm:^1.0.0":
version: 1.0.1
resolution: "simple-concat@npm:1.0.1"
checksum: 4d211042cc3d73a718c21ac6c4e7d7a0363e184be6a5ad25c8a1502e49df6d0a0253979e3d50dbdd3f60ef6c6c58d756b5d66ac1e05cda9cacd2e9fc59e3876a
languageName: node
linkType: hard
"simple-get@npm:^3.0.3":
version: 3.1.0
resolution: "simple-get@npm:3.1.0"
dependencies:
decompress-response: ^4.2.0
once: ^1.3.1
simple-concat: ^1.0.0
checksum: cca91a9ab2b532fa8d367757c196b54e2dfe3325aab0298d66a3e2a45a29a9d335d1a3fb41f036dad14000f78baddd4170fbf9621d72869791d2912baf9469aa
languageName: node
linkType: hard
"slash@npm:^3.0.0":
version: 3.0.0
resolution: "slash@npm:3.0.0"
@ -8103,6 +8533,13 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"strip-json-comments@npm:~2.0.1":
version: 2.0.1
resolution: "strip-json-comments@npm:2.0.1"
checksum: 1074ccb63270d32ca28edfb0a281c96b94dc679077828135141f27d52a5a398ef5e78bcf22809d23cadc2b81dfbe345eb5fd8699b385c8b1128907dec4a7d1e1
languageName: node
linkType: hard
"style-loader@npm:1.3.0":
version: 1.3.0
resolution: "style-loader@npm:1.3.0"
@ -8201,6 +8638,31 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"tar-fs@npm:^2.0.0":
version: 2.1.1
resolution: "tar-fs@npm:2.1.1"
dependencies:
chownr: ^1.1.1
mkdirp-classic: ^0.5.2
pump: ^3.0.0
tar-stream: ^2.1.4
checksum: f5b9a70059f5b2969e65f037b4e4da2daf0fa762d3d232ffd96e819e3f94665dbbbe62f76f084f1acb4dbdcce16c6e4dac08d12ffc6d24b8d76720f4d9cf032d
languageName: node
linkType: hard
"tar-stream@npm:^2.1.4":
version: 2.2.0
resolution: "tar-stream@npm:2.2.0"
dependencies:
bl: ^4.0.3
end-of-stream: ^1.4.1
fs-constants: ^1.0.0
inherits: ^2.0.3
readable-stream: ^3.1.1
checksum: 699831a8b97666ef50021c767f84924cfee21c142c2eb0e79c63254e140e6408d6d55a065a2992548e72b06de39237ef2b802b99e3ece93ca3904a37622a66f3
languageName: node
linkType: hard
"tar@npm:^6.0.2, tar@npm:^6.1.0":
version: 6.1.8
resolution: "tar@npm:6.1.8"
@ -8285,6 +8747,15 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"tmp@npm:^0.2.1":
version: 0.2.1
resolution: "tmp@npm:0.2.1"
dependencies:
rimraf: ^3.0.0
checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e
languageName: node
linkType: hard
"to-fast-properties@npm:^2.0.0":
version: 2.0.0
resolution: "to-fast-properties@npm:2.0.0"
@ -8351,7 +8822,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"tslib@npm:^2.0.3, tslib@npm:^2.3.1":
"tslib@npm:^2.0.3, tslib@npm:^2.2.0, tslib@npm:^2.3.1":
version: 2.3.1
resolution: "tslib@npm:2.3.1"
checksum: de17a98d4614481f7fcb5cd53ffc1aaf8654313be0291e1bfaee4b4bb31a20494b7d218ff2e15017883e8ea9626599b3b0e0229c18383ba9dce89da2adf15cb9
@ -8369,6 +8840,22 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"tunnel-agent@npm:^0.6.0":
version: 0.6.0
resolution: "tunnel-agent@npm:0.6.0"
dependencies:
safe-buffer: ^5.0.1
checksum: 05f6510358f8afc62a057b8b692f05d70c1782b70db86d6a1e0d5e28a32389e52fa6e7707b6c5ecccacc031462e4bc35af85ecfe4bbc341767917b7cf6965711
languageName: node
linkType: hard
"tunnel@npm:0.0.6":
version: 0.0.6
resolution: "tunnel@npm:0.0.6"
checksum: c362948df9ad34b649b5585e54ce2838fa583aa3037091aaed66793c65b423a264e5229f0d7e9a95513a795ac2bd4cb72cda7e89a74313f182c1e9ae0b0994fa
languageName: node
linkType: hard
"tweetnacl@npm:^0.14.3":
version: 0.14.5
resolution: "tweetnacl@npm:0.14.5"
@ -8402,6 +8889,17 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"typed-rest-client@npm:^1.8.4":
version: 1.8.6
resolution: "typed-rest-client@npm:1.8.6"
dependencies:
qs: ^6.9.1
tunnel: 0.0.6
underscore: ^1.12.1
checksum: a7c79080bd0d24cb8dfe1b7aeaf63f71569a96ecf93017f5bdbc97bf9e4e130eb38ea552ddf6742b501842a830672d019913a02925476506412a3cb26f5927bf
languageName: node
linkType: hard
typescript@^4.4.3:
version: 4.4.3
resolution: "typescript@npm:4.4.3"
@ -8422,6 +8920,13 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"uc.micro@npm:^1.0.1, uc.micro@npm:^1.0.5":
version: 1.0.6
resolution: "uc.micro@npm:1.0.6"
checksum: 6898bb556319a38e9cf175e3628689347bd26fec15fc6b29fa38e0045af63075ff3fea4cf1fdba9db46c9f0cbf07f2348cd8844889dd31ebd288c29fe0d27e7a
languageName: node
linkType: hard
"unbox-primitive@npm:^1.0.1":
version: 1.0.1
resolution: "unbox-primitive@npm:1.0.1"
@ -8434,6 +8939,13 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"underscore@npm:^1.12.1":
version: 1.13.1
resolution: "underscore@npm:1.13.1"
checksum: 69bb4e6dd92c387ad322dd5b105f496fa64896d92ff1eea987610920d452667a12bca0938def4c4d60acd12da62410540fd268e7ca4f2480d89324498382fcac
languageName: node
linkType: hard
"unicode-canonical-property-names-ecmascript@npm:^1.0.4":
version: 1.0.4
resolution: "unicode-canonical-property-names-ecmascript@npm:1.0.4"
@ -8506,6 +9018,13 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"url-join@npm:^4.0.1":
version: 4.0.1
resolution: "url-join@npm:4.0.1"
checksum: f74e868bf25dbc8be6a8d7237d4c36bb5b6c62c72e594d5ab1347fe91d6af7ccd9eb5d621e30152e4da45c2e9a26bec21390e911ab54a62d4d82e76028374ee5
languageName: node
linkType: hard
"url-loader@npm:4.1.1":
version: 4.1.1
resolution: "url-loader@npm:4.1.1"
@ -8594,6 +9113,36 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"vsce@npm:^2.5.1":
version: 2.5.1
resolution: "vsce@npm:2.5.1"
dependencies:
azure-devops-node-api: ^11.0.1
chalk: ^2.4.2
cheerio: ^1.0.0-rc.9
commander: ^6.1.0
glob: ^7.0.6
hosted-git-info: ^4.0.2
keytar: ^7.7.0
leven: ^3.1.0
markdown-it: ^10.0.0
mime: ^1.3.4
minimatch: ^3.0.3
parse-semver: ^1.1.1
read: ^1.0.7
semver: ^5.1.0
tmp: ^0.2.1
typed-rest-client: ^1.8.4
url-join: ^4.0.1
xml2js: ^0.4.23
yauzl: ^2.3.1
yazl: ^2.2.2
bin:
vsce: vsce
checksum: d6d281d51b58d5a70ab061002772754a10fdfc7c093f78b749bc2f7152cb105aeae672e3e5d93fc2b35f6ecf261d3f048d801405ca2670e794e4785e097712f1
languageName: node
linkType: hard
"vscode-sshfs@workspace:.":
version: 0.0.0-use.local
resolution: "vscode-sshfs@workspace:."
@ -8613,6 +9162,7 @@ typescript@^4.4.3:
ssh2-streams: ^0.4.10
ts-loader: ^9.2.3
typescript: ^4.4.3
vsce: ^2.5.1
webpack: ^5.50.0
webpack-cli: ^4.7.2
webview: "workspace:*"
@ -8936,6 +9486,23 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"xml2js@npm:^0.4.23":
version: 0.4.23
resolution: "xml2js@npm:0.4.23"
dependencies:
sax: ">=0.6.0"
xmlbuilder: ~11.0.0
checksum: ca0cf2dfbf6deeaae878a891c8fbc0db6fd04398087084edf143cdc83d0509ad0fe199b890f62f39c4415cf60268a27a6aed0d343f0658f8779bd7add690fa98
languageName: node
linkType: hard
"xmlbuilder@npm:~11.0.0":
version: 11.0.1
resolution: "xmlbuilder@npm:11.0.1"
checksum: 7152695e16f1a9976658215abab27e55d08b1b97bca901d58b048d2b6e106b5af31efccbdecf9b07af37c8377d8e7e821b494af10b3a68b0ff4ae60331b415b0
languageName: node
linkType: hard
"yallist@npm:^4.0.0":
version: 4.0.0
resolution: "yallist@npm:4.0.0"
@ -8950,6 +9517,25 @@ typescript@^4.4.3:
languageName: node
linkType: hard
"yauzl@npm:^2.3.1":
version: 2.10.0
resolution: "yauzl@npm:2.10.0"
dependencies:
buffer-crc32: ~0.2.3
fd-slicer: ~1.1.0
checksum: 7f21fe0bbad6e2cb130044a5d1d0d5a0e5bf3d8d4f8c4e6ee12163ce798fee3de7388d22a7a0907f563ac5f9d40f8699a223d3d5c1718da90b0156da6904022b
languageName: node
linkType: hard
"yazl@npm:^2.2.2":
version: 2.5.1
resolution: "yazl@npm:2.5.1"
dependencies:
buffer-crc32: ~0.2.3
checksum: daec5154b5485d8621bfea359e905ddca0b2f068430a4aa0a802bf5d67391157a383e0c2767acccbf5964264851da643bc740155a9458e2d8dce55b94c1cc2ed
languageName: node
linkType: hard
"yocto-queue@npm:^0.1.0":
version: 0.1.0
resolution: "yocto-queue@npm:0.1.0"

@ -1,8 +1,11 @@
const sm = require('source-map');
const rl = require('readline');
const path = require('path');
const fs = require('fs');
const { formatId } = require('./webpack.plugin.js');
/** @type {Record<string, Promise<sm.BasicSourceMapConsumer>>} */
const maps = {};
@ -18,8 +21,11 @@ for (const file of fs.readdirSync('./dist')) {
console.log();
const SOURCE_NAME_REGEX = /^\s*at .*? \(.*?[/\\]dist[/\\]((?:\d+\.)?extension\.js):(\d+):(\d+)\)$/;
const SOURCE_ANOM_REGEX = /^\s*at .*?[/\\]dist[/\\]((?:\d+\.)?extension\.js):(\d+):(\d+)$/;
const SOURCE_NAME_REGEX = /^\s*at .*? \(.*?[/\\]dist[/\\]((?:[\da-zA-Z]+\.)?extension\.js):(\d+):(\d+)\)$/;
const SOURCE_ANOM_REGEX = /^\s*at .*?[/\\]dist[/\\]((?:[\da-zA-Z]+\.)?extension\.js):(\d+):(\d+)$/;
const ROOT_PATH = path.resolve(__dirname);
const FORMAT_ID = process.argv.includes('--format-id');
let error = '';
rl.createInterface(process.stdin).on('line', async l => {
@ -44,10 +50,11 @@ rl.createInterface(process.stdin).on('line', async l => {
continue;
}
const ws = stack.match(/^\s*/)[0];
const source = FORMAT_ID ? formatId(pos.source, ROOT_PATH) : pos.source;
if (named && pos.name) {
stack = `${ws}at ${pos.name} (${pos.source}:${pos.line}:${pos.column})`;
stack = `${ws}at ${pos.name} (${source}:${pos.line}:${pos.column})`;
} else {
stack = `${ws}at ${pos.source}:${pos.line}:${pos.column}`;
stack = `${ws}at ${source}:${pos.line}:${pos.column}`;
}
}
console.log(stack);

@ -418,6 +418,7 @@
"source-map-support": "^0.5.19",
"ts-loader": "^9.2.3",
"typescript": "^4.4.3",
"vsce": "^2.5.1",
"webpack": "^5.50.0",
"webpack-cli": "^4.7.2"
},

@ -261,6 +261,18 @@ export async function createSSH(config: FileSystemConfig, sock?: NodeJS.Readable
const scope = Logging.scope(`ssh2(${config.name})`);
finalConfig.debug = (msg: string) => scope.debug(msg);
}
// TODO: Temporary for #331 (and possibly problems with `publickey` going before `agent`)
const authsAllowed: string[] = [];
if (finalConfig.password) authsAllowed.push('password');
if (finalConfig.agent) authsAllowed.push('agent');
if (finalConfig.privateKey) authsAllowed.push('publickey');
authsAllowed.push('keyboard-interactive');
authsAllowed.push('none');
if (finalConfig.privateKey && finalConfig.localHostname && finalConfig.localUsername) authsAllowed.push('hostbased');
finalConfig.authHandler = (methodsLeft, partialSuccess) => {
logging.debug`authHandler(${methodsLeft}, ${partialSuccess}) => ${authsAllowed[0] || false}`;
return authsAllowed.shift() || false;
};
// Unless the flag 'DF-GE' is specified, disable DiffieHellman groupex algorithms (issue #239)
// Note: If the config already specifies a custom `algorithms.key`, ignore it (trust the user?)
const [flagV, flagR] = getFlagBoolean('DF-GE', false, config.flags);

@ -1,134 +1,139 @@
//@ts-check
'use strict';
"use strict";
const webpack = require("webpack");
const { createHash } = require("crypto");
const webpack = require('webpack');
const { createHash } = require('crypto');
const _formatIdCache = new Map();
/** @type {(id: string, rootPath: string) => string} */
function formatId(id, rootPath) {
// Make sure all paths use /
id = id.replace(/\\/g, "/");
// For `[path]` we unwrap, format then rewrap
if (id[0] === "[" && id.endsWith("]")) {
return `[${formatId(id.slice(1, id.length - 1), rootPath)}]`;
}
// When dealing with `path1!path2`, format each segment separately
if (id.includes("!")) {
id = id
.split("!")
.map((s) => formatId(s, rootPath))
.join("!");
}
// Make the paths relative to the project's rooth path if possible
if (id.startsWith(rootPath)) {
id = id.slice(rootPath.length);
id = (id[0] === "/" ? "." : "./") + id;
}
let formatted = _formatIdCache.get(id);
if (formatted) return formatted;
// Check if we're dealing with a Yarn directory
let match = id.match(/^.*\/(\.?Yarn\/Berry|\.yarn)\/(.*)$/i);
if (!match) {
_formatIdCache.set(id, (formatted = id));
return formatted;
}
const [, yarn, filepath] = match;
// Check if we can extract the package name/version from the path
match =
filepath.match(/^unplugged\/([^/]+?)\-[\da-f]{10}\/node_modules\/(.*)$/i) ||
filepath.match(/^cache\/([^/]+?)\-[\da-f]{10}\-\d+\.zip\/node_modules\/(.*)$/i);
if (!match) {
formatted = `/${yarn.toLowerCase() === ".yarn" ? "." : ""}yarn/${filepath}`;
_formatIdCache.set(id, formatted);
return formatted;
}
const [, name, path] = match;
formatted = `${yarn.toLowerCase() === ".yarn" ? "." : "/"}yarn/${name}/${path}`;
_formatIdCache.set(id, formatted);
return formatted;
}
module.exports.formatId = formatId;
class WebpackPlugin {
_formatIdCache = new Map();
/** @type {(id: string, rootPath: string) => string} */
formatId(id, rootPath) {
// Make sure all paths use /
id = id.replace(/\\/g, '/');
// For `[path]` we unwrap, format then rewrap
if (id[0] === '[' && id.endsWith(']')) {
return `[${this.formatId(id.slice(1, id.length - 1), rootPath)}]`;
}
// When dealing with `path1!path2`, format each segment separately
if (id.includes('!')) {
id = id.split('!').map(s => this.formatId(s, rootPath)).join('!');
}
// Make the paths relative to the project's rooth path if possible
if (id.startsWith(rootPath)) {
id = id.slice(rootPath.length);
id = (id[0] === '/' ? '.' : './') + id;
}
let formatted = this._formatIdCache.get(id);
if (formatted) return formatted;
// Check if we're dealing with a Yarn directory
let match = id.match(/^.*\/(\.?Yarn\/Berry|\.yarn)\/(.*)$/i);
if (!match) {
this._formatIdCache.set(id, formatted = id);
return formatted;
_hashModuleCache = new Map();
/** @type {(mod: webpack.Module, rootPath: string) => string} */
hashModule(mod, rootPath) {
// Prefer `nameForCondition()` as it usually gives the actual file path
// while `identifier()` can have extra `!` or `|` suffixes, i.e. a hash that somehow differs between devices
const identifier = formatId(mod.nameForCondition() || mod.identifier(), rootPath);
let hash = this._hashModuleCache.get(identifier);
if (hash) return hash;
hash = createHash("sha1").update(identifier).digest("hex");
this._hashModuleCache.set(identifier, hash);
return hash;
}
/** @param {webpack.Compiler} compiler */
apply(compiler) {
// Output start/stop messages making the $ts-webpack-watch problemMatcher (provided by an extension) work
let compilationDepth = 0; // We ignore nested compilations
compiler.hooks.beforeCompile.tap("WebpackPlugin-BeforeCompile", (params) => {
if (compilationDepth++) return;
console.log("Compilation starting");
});
compiler.hooks.afterCompile.tap("WebpackPlugin-AfterCompile", () => {
if (--compilationDepth) return;
console.log("Compilation finished");
});
compiler.hooks.compilation.tap("WebpackPlugin-Compilation", (compilation) => {
const rootPath = (compilation.options.context || "").replace(/\\/g, "/");
compilation.options.optimization.chunkIds = false;
// Format `../../../Yarn/Berry/` with all the `cache`/`unplugged`/`__virtual__` to be more readable
// (i.e. `/yarn/package-npm-x.y.z/package/index.js` for global Yarn cache or `/.yarn/...` for local)
compilation.hooks.statsPrinter.tap("WebpackPlugin-StatsPrinter", (stats) => {
/** @type {(id: string | {}, context: any) => string} */
const tapModId = (id, context) => (typeof id === "string" ? formatId(context.formatModuleId(id), rootPath) : "???");
stats.hooks.print.for("module.name").tap("WebpackPlugin-ModuleName", tapModId);
});
// Include an `excludeModules` to `options.stats` to exclude modules loaded by dependencies
compilation.hooks.statsNormalize.tap("WebpackPlugin-StatsNormalize", (stats) => {
(stats.excludeModules || (stats.excludeModules = [])).push((name, { issuerPath }) => {
if (name.startsWith('external "')) return true;
const issuer = issuerPath && (issuerPath[issuerPath.length - 1].name || "").replace(/\\/g, "/");
if (!issuer) return false;
const lower = formatId(issuer, rootPath).toLowerCase();
if (lower.startsWith("/yarn/")) return true;
if (lower.startsWith(".yarn/")) return true;
return false;
});
});
// Determines how chunk IDs are generated, which is now actually deterministic
// (we make sure to clean Yarn paths to prevent issues with `../../Yarn/Berry` being different on devices)
compilation.hooks.chunkIds.tap("WebpackPlugin-ChunkIds", (chunks) => {
const chunkIds = new Map();
const overlapMap = new Set();
let minLength = 4; // show at least 3 characters
// Calculate the hashes for all the chunks
for (const chunk of chunks) {
if (chunk.id) {
console.log(`Chunk ${chunk.id} already has an ID`);
}
// We're kinda doing something similar to Webpack 5's DeterministicChunkIdsPlugin but different
const modules = compilation.chunkGraph.getChunkRootModules(chunk);
const hashes = modules.map((m) => this.hashModule(m, rootPath)).sort();
const hasher = createHash("sha1");
for (const hash of hashes) hasher.update(hash);
const hash = hasher.digest("hex");
// With a 160-bit value, a clash is very unlikely, but let's check anyway
if (chunkIds.has(hash)) throw new Error("Hash collision for chunk IDs");
chunkIds.set(chunk, hash);
chunk.id = hash;
// Make sure the minLength remains high enough to avoid collisions
for (let i = minLength; i < hash.length; i++) {
const part = hash.slice(0, i);
if (overlapMap.has(part)) continue;
overlapMap.add(part);
minLength = i;
break;
}
}
const [, yarn, filepath] = match;
// Check if we can extract the package name/version from the path
match = filepath.match(/^unplugged\/([^/]+?)\-[\da-f]{10}\/node_modules\/(.*)$/i)
|| filepath.match(/^cache\/([^/]+?)\-[\da-f]{10}\-\d+\.zip\/node_modules\/(.*)$/i);
if (!match) {
formatted = `/${yarn.toLowerCase() === '.yarn' ? '.' : ''}yarn/${filepath}`;
this._formatIdCache.set(id, formatted);
return formatted;
// Assign the shortened (collision-free) hashes for all the chunks
for (const [chunk, hash] of chunkIds) {
chunk.id = hash.slice(0, minLength);
chunk.ids = [chunk.id];
}
const [, name, path] = match;
formatted = `${yarn.toLowerCase() === '.yarn' ? '.' : '/'}yarn/${name}/${path}`;
this._formatIdCache.set(id, formatted);
return formatted;
}
_hashModuleCache = new Map();
/** @type {(mod: webpack.Module, rootPath: string) => string} */
hashModule(mod, rootPath) {
// Prefer `nameForCondition()` as it usually gives the actual file path
// while `identifier()` can have extra `!` or `|` suffixes, i.e. a hash that somehow differs between devices
const identifier = this.formatId(mod.nameForCondition() || mod.identifier(), rootPath);
let hash = this._hashModuleCache.get(identifier);
if (hash) return hash;
hash = createHash('sha1').update(identifier).digest('hex');
this._hashModuleCache.set(identifier, hash);
return hash;
}
/** @param {webpack.Compiler} compiler */
apply(compiler) {
// Output start/stop messages making the $ts-webpack-watch problemMatcher (provided by an extension) work
let compilationDepth = 0; // We ignore nested compilations
compiler.hooks.beforeCompile.tap('WebpackPlugin-BeforeCompile', (params) => {
if (compilationDepth++) return;
console.log('Compilation starting');
});
compiler.hooks.afterCompile.tap('WebpackPlugin-AfterCompile', () => {
if (--compilationDepth) return;
console.log('Compilation finished');
});
compiler.hooks.compilation.tap('WebpackPlugin-Compilation', compilation => {
const rootPath = (compilation.options.context || '').replace(/\\/g, '/');
compilation.options.optimization.chunkIds = false;
// Format `../../../Yarn/Berry/` with all the `cache`/`unplugged`/`__virtual__` to be more readable
// (i.e. `/yarn/package-npm-x.y.z/package/index.js` for global Yarn cache or `/.yarn/...` for local)
compilation.hooks.statsPrinter.tap('WebpackPlugin-StatsPrinter', stats => {
/** @type {(id: string | {}, context: any) => string} */
const tapModId = (id, context) => typeof id === 'string' ? this.formatId(context.formatModuleId(id), rootPath) : '???';
stats.hooks.print.for('module.name').tap('WebpackPlugin-ModuleName', tapModId);
});
// Include an `excludeModules` to `options.stats` to exclude modules loaded by dependencies
compilation.hooks.statsNormalize.tap('WebpackPlugin-StatsNormalize', stats => {
(stats.excludeModules || (stats.excludeModules = [])).push((name, { issuerPath }) => {
if (name.startsWith('external "')) return true;
const issuer = issuerPath && (issuerPath[issuerPath.length - 1].name || '').replace(/\\/g, '/');
if (!issuer) return false;
const lower = this.formatId(issuer, rootPath).toLowerCase();
if (lower.startsWith('/yarn/')) return true;
if (lower.startsWith('.yarn/')) return true;
return false;
});
});
// Determines how chunk IDs are generated, which is now actually deterministic
// (we make sure to clean Yarn paths to prevent issues with `../../Yarn/Berry` being different on devices)
compilation.hooks.chunkIds.tap('WebpackPlugin-ChunkIds', chunks => {
const chunkIds = new Map();
const overlapMap = new Set();
let minLength = 4; // show at least 3 characters
// Calculate the hashes for all the chunks
for (const chunk of chunks) {
if (chunk.id) {
console.log(`Chunk ${chunk.id} already has an ID`);
}
// We're kinda doing something similar to Webpack 5's DeterministicChunkIdsPlugin but different
const modules = compilation.chunkGraph.getChunkRootModules(chunk);
const hashes = modules.map(m => this.hashModule(m, rootPath)).sort();
const hasher = createHash('sha1');
for (const hash of hashes) hasher.update(hash);
const hash = hasher.digest('hex');
// With a 160-bit value, a clash is very unlikely, but let's check anyway
if (chunkIds.has(hash)) throw new Error('Hash collision for chunk IDs');
chunkIds.set(chunk, hash);
chunk.id = hash;
// Make sure the minLength remains high enough to avoid collisions
for (let i = minLength; i < hash.length; i++) {
const part = hash.slice(0, i);
if (overlapMap.has(part)) continue;
overlapMap.add(part);
minLength = i;
break;
}
}
// Assign the shortened (collision-free) hashes for all the chunks
for (const [chunk, hash] of chunkIds) {
chunk.id = hash.slice(0, minLength);
chunk.ids = [chunk.id];
}
});
});
}
});
});
}
}
module.exports.WebpackPlugin = WebpackPlugin;

Loading…
Cancel
Save