From 233a0dbb5e7c32b7eb748618c4d169766e69d2b4 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Sun, 28 Apr 2024 20:48:23 +0100 Subject: [PATCH] fix: use version of glob that works on windows --- .npmignore | 1 + .projen/deps.json | 5 +- .projen/tasks.json | 4 +- .projenrc.ts | 3 +- package.json | 3 +- src/docgen/view/documentation.ts | 4 +- yarn.lock | 92 +++++++++++++++++++------------- 7 files changed, 64 insertions(+), 48 deletions(-) diff --git a/.npmignore b/.npmignore index 1579e2d8..d33ec41b 100644 --- a/.npmignore +++ b/.npmignore @@ -23,3 +23,4 @@ tsconfig.tsbuildinfo /.eslintrc.json /.gitattributes /.projenrc.ts +/projenrc diff --git a/.projen/deps.json b/.projen/deps.json index e4fdb0db..2ad4e470 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -103,10 +103,7 @@ }, { "name": "glob", - "type": "runtime" - }, - { - "name": "glob-promise", + "version": "10.1.0", "type": "runtime" }, { diff --git a/.projen/tasks.json b/.projen/tasks.json index 6c57936a..da46e8d9 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -235,13 +235,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=prod --filter=@jsii/spec,case,fs-extra,glob,glob-promise,jsii-reflect,semver,yargs" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=prod --filter=@jsii/spec,case,fs-extra,jsii-reflect,semver,yargs" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @jsii/spec case fs-extra glob glob-promise jsii-reflect semver yargs" + "exec": "yarn upgrade @jsii/spec case fs-extra glob jsii-reflect semver yargs" }, { "exec": "npx projen" diff --git a/.projenrc.ts b/.projenrc.ts index 7a34ea1d..845a39d2 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -25,8 +25,7 @@ const project = new CdklabsTypeScriptProject({ '@jsii/spec', 'case', 'fs-extra', - 'glob-promise', - 'glob', + 'glob@10.1.0', // yarn can't handle the jackspeak dependency introduced in newer versions, see https://github.com/isaacs/node-glob/issues/542 'jsii-reflect', 'semver', 'yargs', diff --git a/package.json b/package.json index fdb3d124..8872152b 100644 --- a/package.json +++ b/package.json @@ -64,8 +64,7 @@ "@jsii/spec": "^1.97.0", "case": "^1.6.3", "fs-extra": "^10.1.0", - "glob": "^8.1.0", - "glob-promise": "^6.0.5", + "glob": "10.1.0", "jsii-reflect": "^1.97.0", "semver": "^7.6.0", "yargs": "^16.2.0" diff --git a/src/docgen/view/documentation.ts b/src/docgen/view/documentation.ts index 5942b2cc..37494b22 100644 --- a/src/docgen/view/documentation.ts +++ b/src/docgen/view/documentation.ts @@ -2,7 +2,7 @@ import * as os from 'os'; import * as path from 'path'; import { loadAssemblyFromFile, SPEC_FILE_NAME } from '@jsii/spec'; import * as fs from 'fs-extra'; -import * as glob from 'glob-promise'; +import { glob } from 'glob'; import * as reflect from 'jsii-reflect'; import { TargetLanguage, transliterateAssembly, UnknownSnippetMode } from 'jsii-rosetta'; import { Npm } from './_npm'; @@ -407,7 +407,7 @@ export class Documentation { }); const ts = new reflect.TypeSystem(); - for (let dotJsii of await glob.promise(`${this.assembliesDir}/**/${SPEC_FILE_NAME}`)) { + for (let dotJsii of await glob(`${this.assembliesDir}/**/${SPEC_FILE_NAME}`)) { // we only transliterate the top level assembly and not the entire type-system. // note that the only reason to translate dependant assemblies is to show code examples // for expanded python arguments - which we don't to right now anyway. diff --git a/yarn.lock b/yarn.lock index b894678e..c5aa748d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -758,14 +758,6 @@ dependencies: "@types/node" "*" -"@types/glob@^8.0.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" - integrity sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w== - dependencies: - "@types/minimatch" "^5.1.2" - "@types/node" "*" - "@types/graceful-fs@^4.1.3": version "4.1.9" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" @@ -810,11 +802,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== -"@types/minimatch@^5.1.2": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - "@types/minimist@^1.2.0": version "1.2.5" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" @@ -1316,11 +1303,11 @@ case@^1.6.3: integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== cdklabs-projen-project-types@^0.1.193: - version "0.1.193" - resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.1.193.tgz#f54bef75180540cfcb77bf4a0a2791aca4a9dfd3" - integrity sha512-wpMISlzHq4De8zBjuEFEQHVSw/4QJAfJvTf5xxN1CEbriAY+APUsPCA7kpJrA0vQsc+vXcoZ3T55/n2MWJeOXQ== + version "0.1.194" + resolved "https://registry.yarnpkg.com/cdklabs-projen-project-types/-/cdklabs-projen-project-types-0.1.194.tgz#75b49260f540379a6dc4be90683d4959bb4613f0" + integrity sha512-PF2SzqC2EXRKQhf6INcW+yCoV00JgRIhaZ+4YzFOnu0N5qpvr6TANCK00MCAsBuLRsk/hr5RiYTEJaUhqT6rzg== dependencies: - yaml "^2.4.1" + yaml "^2.4.2" chalk@^2.4.2: version "2.4.2" @@ -1350,9 +1337,9 @@ ci-info@^3.2.0: integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cjs-module-lexer@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.0.tgz#73de79dec6585a39fb72a4905851423b3f4f420b" - integrity sha512-bVFe+IGccK6kz2sM7Er2CoAcllmIVZFeauiyy/0r7UpBMAFTXD3yduZ7w1+MowSb0htol+zTArLTuzjoMZa14w== + version "1.3.1" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c" + integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q== cliui@^7.0.2: version "7.0.4" @@ -2414,12 +2401,15 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-promise@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/glob-promise/-/glob-promise-6.0.5.tgz#3d56331b324fd7d097b43ba9e9959e9c7e200e2c" - integrity sha512-uUzvxo60yo/vMLXZHCNAlfdM5U5A07jCnUO8xTK44Z0Vc58poGDXhDx8ju1DmPdprOORh+4Lpog64hl+AJ5piA== +glob@10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.1.0.tgz#baa48c6a157cfa34ca7887f2a29c6156bc6b65f8" + integrity sha512-daGobsYuT0G4hng24B5LbeLNvwKZYRhWyDl3RvqqAGZjJnCopWWK6PWnAGBY1M/vdA63QE+jddhZcYp+74Bq6Q== dependencies: - "@types/glob" "^8.0.0" + fs.realpath "^1.0.0" + minimatch "^9.0.0" + minipass "^5.0.0" + path-scurry "^1.7.0" glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: version "7.2.3" @@ -2433,7 +2423,7 @@ glob@^7.0.0, glob@^7.1.3, glob@^7.1.4, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8, glob@^8.1.0: +glob@^8: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -3498,6 +3488,11 @@ log4js@^6.9.1: rfdc "^1.3.0" streamroller "^3.1.5" +lru-cache@^10.2.0: + version "10.2.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.1.tgz#e8d901141f22937968e45a6533d52824070151e4" + integrity sha512-tS24spDe/zXhWbNPErCHs/AGOzbKGHT+ybSBqmdLm8WZ1xXLWvH8Qn71QPAlqVhd0qUTWjy+Kl9JmISgDdEjsA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -3612,6 +3607,13 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" +minimatch@^9.0.0: + version "9.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51" + integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -3626,6 +3628,16 @@ minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6, minimist@~1. resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0": + version "7.0.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" + integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== + mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -3886,6 +3898,14 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^1.7.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.2.tgz#8f6357eb1239d5fa1da8b9f70e9c080675458ba7" + integrity sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA== + dependencies: + lru-cache "^10.2.0" + minipass "^5.0.0 || ^6.0.2 || ^7.0.0" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -3955,9 +3975,9 @@ process-nextick-args@~2.0.0: integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== projen@^0.81.3: - version "0.81.3" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.81.3.tgz#9c7fa6cbda6e5e9f2a6c98afc5df5dbcdcddde92" - integrity sha512-IuorTvuqJqTecEJ2auZjpaRkFmo9sp8fUj/t5diw/S0hdiyuhlkg2pAkmmbLehW7ib7B8wjqlYUH5pcaAtFU3g== + version "0.81.4" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.81.4.tgz#f105c17f0dfe5485fb422b2cf1eadd4b8ae7b7a3" + integrity sha512-6iw5OA46wBfwUu05BKdtxFGT1lkgt0PJ3pXRw40VQLi8suFKEqcguRxM8hOFKycvspKxjtR0jmmIrzv9SfSwgg== dependencies: "@iarna/toml" "^2.2.5" case "^1.6.3" @@ -4742,9 +4762,9 @@ typedarray@^0.0.6: integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typescript@next: - version "5.5.0-dev.20240427" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.0-dev.20240427.tgz#09958be59d0a93c6191036ee6cb6ffb091bfdba0" - integrity sha512-vm3WnPi2ZVIJib+bLBXzoakaw/1F4X+C+Uycboz2B6k4y0LS1JflVySjUfNthvjFRqtDbKFOzXdyCXkuGbytWg== + version "5.5.0-dev.20240428" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.0-dev.20240428.tgz#d40edc89e41dd118ba4cfb82788223b7f3e7b063" + integrity sha512-CJeSji05UX6V7wZYqDivyYE2aUTjmWun7iGp8n0cQnM773e9ZboeYt6Wx14OBIhVzbwf2ot1Y5jUwTw80hStTg== typescript@~5.4, typescript@~5.4.5: version "5.4.5" @@ -4936,10 +4956,10 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^2.2.2, yaml@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.1.tgz#2e57e0b5e995292c25c75d2658f0664765210eed" - integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg== +yaml@^2.2.2, yaml@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.4.2.tgz#7a2b30f2243a5fc299e1f14ca58d475ed4bc5362" + integrity sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA== yargs-parser@^20.2.2, yargs-parser@^20.2.3: version "20.2.9"