diff --git a/.github/workflows/bevry.yml b/.github/workflows/bevry.yml index 3939cf8..96f3c42 100644 --- a/.github/workflows/bevry.yml +++ b/.github/workflows/bevry.yml @@ -66,7 +66,7 @@ jobs: if: github.actor == 'dependabot[bot]' steps: - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --merge "$PR_URL" + run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/HISTORY.md b/HISTORY.md index dd46ebc..17c1c44 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,27 @@ # History +## v1.86.0 2023 November 21 + +- ci: + - Update `bevry-actions/npm` version + - Auto-merge dependabot should squash, rather than making an additional merge commit +- editions: + - Types is now it's own edition + - Types point to an entry now, instead of the directory (as that is what typescript now wants) + - Provide `types` field in each `exports` entry +- questions: + - Add `nodeVersionsRange`, `nodeVersionsSupportedRange`, `nodeVersionsTestedRange`, `nodeVersionsTargetedRange` and remove the complexity that was needed without them + - Overriding `*Minimum` and `*Maximum` versions is now disabled, use the `\*Range`` properties instead +- runtime: + - Fix incompatible version upgrades breaking before compatible versions can be installed + - Fix `npm-check-updates` having to be installed, using `npx` to invoke `npm-check-updates` instead + - Compatible versions are now corrected for latest ecosystem improvements + - tsconfig's `skipLibCheck` is now persisted + - if targetting ES5, tsconfig's `downlevelIteration` will be enabled +- versions: + - Update for latest `@bevry/testen` version +- Updated dependencies, [base files](https://github.com/bevry/base), and [editions](https://editions.bevry.me) using [boundation](https://github.com/bevry/boundation) + ## v1.85.0 2023 November 18 - Rename `organisation` to `githubOrganisation` and make it automatic diff --git a/package-lock.json b/package-lock.json index 7e7e7ac..47e15b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "boundation", - "version": "1.85.0", + "version": "1.86.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "boundation", - "version": "1.85.0", + "version": "1.86.0", "license": "Artistic-2.0", "dependencies": { "@bevry/ansi": "^6.3.0", @@ -18,10 +18,10 @@ "@bevry/fs-unlink": "^1.0.0", "@bevry/fs-write": "^1.0.0", "@bevry/github-orgs": "^2.3.0", - "@bevry/list": "^1.8.0", - "@bevry/nodejs-ecmascript-compatibility": "^5.1.0", - "@bevry/nodejs-versions": "^2.4.0", - "@bevry/testen": "^5.0.2", + "@bevry/list": "^2.0.0", + "@bevry/nodejs-ecmascript-compatibility": "^5.3.0", + "@bevry/nodejs-versions": "^3.0.0", + "@bevry/testen": "^7.0.0", "arrange-package-json": "^4.3.0", "arrangekeys": "^6.2.0", "errlop": "^7.2.0", @@ -30,9 +30,9 @@ "inquirer": "^9.2.12", "js-yaml": "^4.1.0", "safeps": "^11.2.0", - "typechecker": "^8.2.0", + "typechecker": "^8.4.0", "version-compare": "^3.2.0", - "version-range": "^3.2.0" + "version-range": "^4.2.0" }, "bin": { "boundation": "bin.mjs" @@ -41,7 +41,7 @@ "@bevry/update-contributors": "^1.23.0", "assert-helpers": "^11.4.0", "eslint": "^8.54.0", - "eslint-config-bevry": "^4.0.0", + "eslint-config-bevry": "^5.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", "kava": "^7.2.0", @@ -66,8 +66,7 @@ }, "node_modules/@bevry/ansi": { "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@bevry/ansi/-/ansi-6.3.0.tgz", - "integrity": "sha512-4l7MexuIZuOj9FoBIbRD+nkMvZZASe1ukzanjrmfROlCzzd6ZiM0qmG3aa6sZdt45w4E3rUreGHaN6WhKc9Z9g==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0" }, @@ -80,8 +79,7 @@ }, "node_modules/@bevry/ecmascript-versions": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@bevry/ecmascript-versions/-/ecmascript-versions-4.3.0.tgz", - "integrity": "sha512-0jlIdPlCLoylJoBunPrZMrZ99OlX7+0RCoYEuMggV505E1EmN85Ol8DHkc7jjKwYMbvjt3VZAVdf5AdyWQ61og==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0" }, @@ -94,8 +92,7 @@ }, "node_modules/@bevry/figures": { "version": "6.1.0-next.1698850111.f5bb3c31370762d9ad6c5c5dac50637a8dc1840d", - "resolved": "https://registry.npmjs.org/@bevry/figures/-/figures-6.1.0-next.1698850111.f5bb3c31370762d9ad6c5c5dac50637a8dc1840d.tgz", - "integrity": "sha512-AFYmvIbmcU8S2dQ8WLjjCJRHub8fY66hZZ9+GDuoySTil6Y1TCqjqYipGtoM5IM3WyY21nYJjOtSkfyjzfRBIg==", + "license": "Artistic-2.0", "engines": { "node": ">=8" }, @@ -105,8 +102,7 @@ }, "node_modules/@bevry/fs-accessible": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-accessible/-/fs-accessible-2.0.0.tgz", - "integrity": "sha512-UG5j7WdxhYdmcFdMfhK+12HeBYUtHJ980ATrxDLwlGFNwPekxTya25nh8FAl8s+Ot4iB69SXkkUQBuTb28eCiQ==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0" }, @@ -119,9 +115,8 @@ }, "node_modules/@bevry/fs-list": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-list/-/fs-list-2.0.0.tgz", - "integrity": "sha512-95W6ha0IX1nUw9+nngjWW3oAquTTpWMQZiiNM3Ks5+u2ZuYqq4I23KbPWCZvwIOW4BJSbc9QJgw1d2KiHxV9Aw==", "dev": true, + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", @@ -137,8 +132,7 @@ }, "node_modules/@bevry/fs-mkdirp": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-mkdirp/-/fs-mkdirp-1.0.0.tgz", - "integrity": "sha512-R5mEQBFYl/Kf6DWeITih9JRJn7otLJRb/vSjCFbeWOyscgZ0VOuuv8mElR5v4x4furv8I6f3233R61KcU5xoww==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", @@ -154,8 +148,7 @@ }, "node_modules/@bevry/fs-read": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-read/-/fs-read-1.0.0.tgz", - "integrity": "sha512-BYndXVIC//KPbsoJkcZvX3x+hTXAWST5bwaxN3wXmZqZlM0t0OP4k/psUbDr8c6WxVFPHVT4IIKguk+IoyHdsQ==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", @@ -170,8 +163,7 @@ }, "node_modules/@bevry/fs-readable": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-readable/-/fs-readable-2.0.0.tgz", - "integrity": "sha512-2XIzMcsWypAnXJ5ylorIPhn40dMBSaV/sArluxmkrzI2LJuMiL3ae55U4oQIv81ZqyFre2KVZUf4FjePCeI8+Q==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0" @@ -185,8 +177,7 @@ }, "node_modules/@bevry/fs-remove": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-remove/-/fs-remove-1.0.0.tgz", - "integrity": "sha512-6A6hKToCqsDNf9UCwPEBpE3yp9Ricc6qTPQQMhHpqT5FOw51hhO8+uyqX6C+LJ2IZDzxdU+VTfhTEPfU5bPyMA==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", @@ -202,8 +193,7 @@ }, "node_modules/@bevry/fs-unlink": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-unlink/-/fs-unlink-1.0.0.tgz", - "integrity": "sha512-sN3aOeYlqvLLorQesWrtiV3pcH7ygp5eztLrh9V7Ylnm20+GNpsHuXh94lyJcCz89e7rB/ZPnUji9l4pRJgGQA==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "editions": "^6.13.0", @@ -218,8 +208,7 @@ }, "node_modules/@bevry/fs-write": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@bevry/fs-write/-/fs-write-1.0.0.tgz", - "integrity": "sha512-tX92v6YEj4E4H16kG5DYjGFvl8M9yggLyukl24VFB0mrbnawvJ8dlMIvmmj2DyafaoqFzIg8WrCRv4meEquhEA==", + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-accessible": "^2.0.0", "@bevry/fs-mkdirp": "^1.0.0", @@ -234,12 +223,11 @@ } }, "node_modules/@bevry/github-api": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/@bevry/github-api/-/github-api-10.0.0.tgz", - "integrity": "sha512-2V3iJEWuBxbvaEOHL/f1Wk9QeuCFNmAR8A43DHw8uLdH1/yJ0vTkYEzaHDLWjlsLUZMbJoYR0dYgAQkeCCYn/g==", + "version": "10.1.0", "dev": true, + "license": "Artistic-2.0", "dependencies": { - "@bevry/wait": "^1.0.0", + "@bevry/wait": "^2.0.0", "simplytyped": "^3.3.0" }, "engines": { @@ -249,11 +237,21 @@ "url": "https://bevry.me/fund" } }, + "node_modules/@bevry/github-api/node_modules/@bevry/wait": { + "version": "2.1.0", + "dev": true, + "license": "Artistic-2.0", + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/@bevry/github-contributors": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@bevry/github-contributors/-/github-contributors-4.1.0.tgz", - "integrity": "sha512-PwwvrtdQx06r4haHh4PK3cbkSmml7KFjOXPqZhce5mfCkjD+aEPmYaklO2zkLKvYaekRzEXjErJO31rPyKt7gw==", "dev": true, + "license": "Artistic-2.0", "dependencies": { "@bevry/github-api": "^10.0.0", "@bevry/github-repos": "^6.1.0", @@ -270,8 +268,7 @@ }, "node_modules/@bevry/github-orgs": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@bevry/github-orgs/-/github-orgs-2.3.0.tgz", - "integrity": "sha512-/cUbsy3n6WtowkDSMCkrA5l9vKJLHQpRYG7+SBUjicROtvfTRCXl/GZl5nKH7lHtjTAWUGUyq4Ebj4PvCGHkSQ==", + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -281,9 +278,8 @@ }, "node_modules/@bevry/github-repos": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@bevry/github-repos/-/github-repos-6.1.0.tgz", - "integrity": "sha512-hzExXsztBWKO6ECld72UoTuYcISjfecwZlZs2ibbfQPcjwB/BAjavsSDcpniG0eNBeCrOsizwh7Dv0QP59nMsg==", "dev": true, + "license": "MIT", "dependencies": { "@bevry/github-api": "^9.0.0", "@bevry/list": "^1.7.0", @@ -299,9 +295,8 @@ }, "node_modules/@bevry/github-repos/node_modules/@bevry/github-api": { "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@bevry/github-api/-/github-api-9.0.0.tgz", - "integrity": "sha512-Vi6wqGSmDQeSeFm6bAcFvICjVr0CRHLde4JXpvRrwtItpa5xCoastQpbHdJTL5LEubsB9taHF9HW/dwdJw3laA==", "dev": true, + "license": "MIT", "dependencies": { "@bevry/wait": "^1.0.0", "node-fetch": "^2.6.1", @@ -314,11 +309,20 @@ "url": "https://bevry.me/fund" } }, + "node_modules/@bevry/github-repos/node_modules/@bevry/list": { + "version": "1.8.0", + "dev": true, + "license": "Artistic-2.0", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/@bevry/json": { "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@bevry/json/-/json-1.9.0.tgz", - "integrity": "sha512-22RLqQDrKapGvTJoNnunr3TQr9E2/Qr882n9X/DyoNspYgHZ5ijsF3VRAWdgr7HJhrA0ApuFfTaOVVQoSCj99g==", - "dev": true, + "license": "Artistic-2.0", "dependencies": { "@bevry/fs-read": "^1.0.0", "@bevry/fs-unlink": "^1.0.0", @@ -333,25 +337,26 @@ } }, "node_modules/@bevry/list": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@bevry/list/-/list-1.8.0.tgz", - "integrity": "sha512-qkLuLrM+AO2XDX87pySdRX31qXeB0jDBEL0PfY+LJSV56QhfDS1PGrqkCz4Ux+/eq/PfiQ/2hQhNgOHGb2HvSw==", + "version": "2.0.0", + "license": "Artistic-2.0", + "dependencies": { + "editions": "^6.13.0" + }, "engines": { - "node": ">=10" + "node": ">=4" }, "funding": { "url": "https://bevry.me/fund" } }, "node_modules/@bevry/nodejs-ecmascript-compatibility": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@bevry/nodejs-ecmascript-compatibility/-/nodejs-ecmascript-compatibility-5.1.0.tgz", - "integrity": "sha512-bbHSGTLfDkqWKWUFD19OsKHyw+RPGdr5Vo1ld5cFMWYboNE3Fi79PNtQiHB1TOPPI2mnrgjgn9kOwcYhcbXIXQ==", + "version": "5.3.0", + "license": "Artistic-2.0", "dependencies": { - "@bevry/ecmascript-versions": "^3.6.0", - "@bevry/list": "^1.8.0", - "@bevry/nodejs-releases": "^2.0.0", - "errlop": "^4.6.0" + "@bevry/ecmascript-versions": "^4.3.0", + "@bevry/list": "^2.0.0", + "@bevry/nodejs-releases": "^2.3.0", + "errlop": "^7.2.0" }, "engines": { "node": ">=18" @@ -360,35 +365,12 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-ecmascript-compatibility/node_modules/@bevry/ecmascript-versions": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@bevry/ecmascript-versions/-/ecmascript-versions-3.6.0.tgz", - "integrity": "sha512-a7AwMXRL2/4jPGadK0kvpFJM+smcJ+fxCR+J6BZCFTlOqZ6pW50zwAHRCCt2HNG5JbsHlAGRk8R5MwcTQaOevg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/@bevry/nodejs-ecmascript-compatibility/node_modules/errlop": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-4.6.0.tgz", - "integrity": "sha512-9a1m+bGJeZiCQHZmXwjdpmiSXfOVbp6g/BvLFeJ4Xx2Iu/3ReWGdG5+z4ZPE+F1JU66S+CY9dp4Bm7vw0l3LGA==", - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, "node_modules/@bevry/nodejs-releases": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@bevry/nodejs-releases/-/nodejs-releases-2.1.0.tgz", - "integrity": "sha512-e0NtJFH+tIvG/NvtJhhgvH/wTDapoaGk+5YoeWbJPxWgj4HEj5x/wanqLeCamzlWeJ86T9UUIkfi/g3vCsfyPw==", + "version": "2.4.0", + "license": "Artistic-2.0", "dependencies": { - "errlop": "^4.6.0", - "version-compare": "^1.4.0" + "errlop": "^7.2.0", + "version-compare": "^3.2.0" }, "engines": { "node": ">=18" @@ -397,35 +379,29 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-releases/node_modules/errlop": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-4.6.0.tgz", - "integrity": "sha512-9a1m+bGJeZiCQHZmXwjdpmiSXfOVbp6g/BvLFeJ4Xx2Iu/3ReWGdG5+z4ZPE+F1JU66S+CY9dp4Bm7vw0l3LGA==", - "engines": { - "node": ">=4" + "node_modules/@bevry/nodejs-schedule": { + "version": "2.4.0", + "license": "Artistic-2.0", + "dependencies": { + "errlop": "^7.2.0", + "version-compare": "^3.2.0" }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/@bevry/nodejs-releases/node_modules/version-compare": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/version-compare/-/version-compare-1.5.0.tgz", - "integrity": "sha512-uyseECqCI6Ix6Vlh5bE1b53RPUAy48Wwy5itj/cl7LciSLIARObR35oH52vA5lcq/WwcWVvhTHNL9Vvt4WRXmA==", "engines": { - "node": ">=4" + "node": ">=18" }, "funding": { "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-schedule": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@bevry/nodejs-schedule/-/nodejs-schedule-2.1.0.tgz", - "integrity": "sha512-Rj1K1+PXyvSsPpThpojOTo2Lgy9SL2lJLqZx5W+vptA1PcsaE2v9LoYTiB4A9gniwxC+gi5VTJF13IwrlvWDhQ==", + "node_modules/@bevry/nodejs-versions": { + "version": "3.0.0", + "license": "Artistic-2.0", "dependencies": { - "errlop": "^4.6.0", - "version-compare": "^1.4.0" + "@bevry/list": "^2.0.0", + "@bevry/nodejs-releases": "^2.4.0", + "@bevry/nodejs-schedule": "^2.4.0", + "version-compare": "^3.2.0", + "version-range": "^4.2.0" }, "engines": { "node": ">=18" @@ -434,32 +410,50 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-schedule/node_modules/errlop": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-4.6.0.tgz", - "integrity": "sha512-9a1m+bGJeZiCQHZmXwjdpmiSXfOVbp6g/BvLFeJ4Xx2Iu/3ReWGdG5+z4ZPE+F1JU66S+CY9dp4Bm7vw0l3LGA==", + "node_modules/@bevry/testen": { + "version": "7.0.0", + "license": "Artistic-2.0", + "dependencies": { + "@bevry/ansi": "^6.3.0", + "@bevry/figures": "^6.1.0-next.1698850111.f5bb3c31370762d9ad6c5c5dac50637a8dc1840d", + "@bevry/fs-readable": "^2.0.0", + "@bevry/json": "^1.9.0", + "@bevry/nodejs-versions": "^2.4.0", + "@bevry/wait": "^2.1.0", + "filedirname": "^2.10.0", + "logger-clearable": "^4.2.0", + "minimist": "^1.2.8", + "spinner-title": "^4.1.0", + "string-width": "^7.0.0", + "text-table": "^0.2.0", + "then-exec": "^0.0.1", + "version-clean": "^1.0.0", + "version-compare": "^3.2.0", + "version-range": "^4.2.0" + }, + "bin": { + "testen": "bin.cjs" + }, "engines": { - "node": ">=4" + "node": ">=18" }, "funding": { "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-schedule/node_modules/version-compare": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/version-compare/-/version-compare-1.5.0.tgz", - "integrity": "sha512-uyseECqCI6Ix6Vlh5bE1b53RPUAy48Wwy5itj/cl7LciSLIARObR35oH52vA5lcq/WwcWVvhTHNL9Vvt4WRXmA==", + "node_modules/@bevry/testen/node_modules/@bevry/list": { + "version": "1.8.0", + "license": "Artistic-2.0", "engines": { - "node": ">=4" + "node": ">=10" }, "funding": { "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-versions": { + "node_modules/@bevry/testen/node_modules/@bevry/nodejs-versions": { "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@bevry/nodejs-versions/-/nodejs-versions-2.4.0.tgz", - "integrity": "sha512-1UAfmgS8tKoksYOsFKosCryGe+aRSaEugAIo2nLV7MxprDF01NMyzVHl/ta0njCl7Vo+hs9SJZ/xrdn0ZluSmw==", + "license": "Artistic-2.0", "dependencies": { "@bevry/list": "^1.8.0", "@bevry/nodejs-releases": "^2.0.0", @@ -474,10 +468,9 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-versions/node_modules/version-compare": { + "node_modules/@bevry/testen/node_modules/@bevry/nodejs-versions/node_modules/version-compare": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/version-compare/-/version-compare-1.5.0.tgz", - "integrity": "sha512-uyseECqCI6Ix6Vlh5bE1b53RPUAy48Wwy5itj/cl7LciSLIARObR35oH52vA5lcq/WwcWVvhTHNL9Vvt4WRXmA==", + "license": "Artistic-2.0", "engines": { "node": ">=4" }, @@ -485,10 +478,9 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/nodejs-versions/node_modules/version-range": { + "node_modules/@bevry/testen/node_modules/@bevry/nodejs-versions/node_modules/version-range": { "version": "1.5.0", - "resolved": "https://registry.npmjs.org/version-range/-/version-range-1.5.0.tgz", - "integrity": "sha512-+tHAV0jemmfzYV6fLBfCxyI3ypBwNpYhoceDOJFrhi2T8XZvEL1whiPIO3BKXsAzCj4eSyGRqFI1NnfzG0XkiQ==", + "license": "Artistic-2.0", "dependencies": { "version-compare": "^1.4.0" }, @@ -499,45 +491,56 @@ "url": "https://bevry.me/fund" } }, - "node_modules/@bevry/testen": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@bevry/testen/-/testen-5.0.2.tgz", - "integrity": "sha512-fbTn/jklZ/o0yIdoVThPtlGe1/WleX0Y5jcabMOmF2qDW+s/VRVuAfVyXhdibApd9q/UElTQGLvWZfdavGaz0g==", - "dependencies": { - "@bevry/ansi": "^3.3.0", - "@bevry/figures": "^6.1.0-next.1698850111.f5bb3c31370762d9ad6c5c5dac50637a8dc1840d", - "@bevry/nodejs-versions": "^2.3.0", - "@bevry/wait": "^1.0.0", - "logger-clearable": "^3.16.0", - "minimist": "^1.2.8", - "semver": "^7.5.4", - "spinner-title": "^3.16.0", - "string-width": "^4.2.0", - "text-table": "^0.2.0", - "then-exec": "^0.0.1" + "node_modules/@bevry/testen/node_modules/@bevry/wait": { + "version": "2.1.0", + "license": "Artistic-2.0", + "engines": { + "node": ">=4" }, - "bin": { - "testen": "bin.cjs" + "funding": { + "url": "https://bevry.me/fund" + } + }, + "node_modules/@bevry/testen/node_modules/ansi-regex": { + "version": "6.0.1", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@bevry/testen/node_modules/emoji-regex": { + "version": "10.3.0", + "license": "MIT" + }, + "node_modules/@bevry/testen/node_modules/string-width": { + "version": "7.0.0", + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { "node": ">=18" }, "funding": { - "url": "https://bevry.me/fund" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@bevry/testen/node_modules/@bevry/ansi": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@bevry/ansi/-/ansi-3.5.0.tgz", - "integrity": "sha512-64cTf9QlwvRErbcyblGN/pTlV6wFCobu+2uv4hXpBPHrin5vkXTI4QPdVCjn2o+W4NSJGVqu26at2Y0n4MXqpw==", + "node_modules/@bevry/testen/node_modules/strip-ansi": { + "version": "7.1.0", + "license": "MIT", "dependencies": { - "editions": "^6.8.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=12" }, "funding": { - "url": "https://bevry.me/fund" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/@bevry/update-contributors": { @@ -561,9 +564,8 @@ }, "node_modules/@bevry/valid-filename": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@bevry/valid-filename/-/valid-filename-2.1.0.tgz", - "integrity": "sha512-/8sDKmnrB6FTxkVMmNf0sCeP9jEi3HgcN1xcFxvCTyUY3WcV2R1UU/JGNz1lIYzO2wKE0OZf4qRRW9dCx/8/FQ==", "dev": true, + "license": "Artistic-2.0", "bin": { "valid-filename": "bin.cjs" }, @@ -575,8 +577,9 @@ } }, "node_modules/@bevry/wait": { - "version": "1.0.0", - "license": "MIT", + "version": "1.1.0", + "dev": true, + "license": "Artistic-2.0", "engines": { "node": ">=12" }, @@ -608,9 +611,8 @@ }, "node_modules/@eslint/eslintrc": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", - "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -631,9 +633,8 @@ }, "node_modules/@eslint/js": { "version": "8.54.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", - "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -736,9 +737,8 @@ }, "node_modules/acorn": { "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -748,18 +748,16 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -773,8 +771,7 @@ }, "node_modules/ambi": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ambi/-/ambi-3.2.0.tgz", - "integrity": "sha512-nj5sHLPFd7u2OLmHdFs4DHt3gK6edpNw35hTRIKyI/Vd2Th5e4io50rw1lhmCdUNO2Mm4/4FkHmv6shEANAWcw==", + "license": "MIT", "dependencies": { "editions": "^2.1.0", "typechecker": "^4.3.0" @@ -785,8 +782,7 @@ }, "node_modules/ambi/node_modules/editions": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/editions/-/editions-2.3.1.tgz", - "integrity": "sha512-ptGvkwTvGdGfC0hfhKg0MT+TRLRKGtUiWGBInxOm5pz7ssADezahjCUaYuZ8Dr+C05FW0AECIIPt4WBxVINEhA==", + "license": "MIT", "dependencies": { "errlop": "^2.0.0", "semver": "^6.3.0" @@ -800,8 +796,7 @@ }, "node_modules/ambi/node_modules/errlop": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-2.2.0.tgz", - "integrity": "sha512-e64Qj9+4aZzjzzFpZC7p5kmm/ccCrbLhAJplhsDXQFs87XTsXwOpH4s1Io2s90Tau/8r2j9f4l/thhDevRjzxw==", + "license": "MIT", "engines": { "node": ">=0.8" }, @@ -811,16 +806,14 @@ }, "node_modules/ambi/node_modules/semver": { "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/ambi/node_modules/typechecker": { "version": "4.11.0", - "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.11.0.tgz", - "integrity": "sha512-lz39Mc/d1UBcF/uQFL5P8L+oWdIn/stvkUgHf0tPRW4aEwGGErewNXo2Nb6We2WslWifn00rhcHbbRWRcTGhuw==", + "license": "MIT", "dependencies": { "editions": "^2.2.0" }, @@ -880,8 +873,7 @@ }, "node_modules/arrange-package-json": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/arrange-package-json/-/arrange-package-json-4.3.0.tgz", - "integrity": "sha512-6K3llwdOrurFzcg9xPySnw8EEnopbyqqreJrDMGNdrLGJ9ut9H5JKUR7SRmCgKXqo1vjGFft+aC57FfVGa/hVQ==", + "license": "Artistic-2.0", "dependencies": { "arrangekeys": "^6.2.0", "editions": "^6.13.0" @@ -895,8 +887,7 @@ }, "node_modules/arrangekeys": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/arrangekeys/-/arrangekeys-6.2.0.tgz", - "integrity": "sha512-jovQxeTP8ngYX/C830+/Pjq64v81P3QXFx2eSsPFDuygiGzSdDfs+CRXv4+NXC2+lM9OCx+PSfcGSdZUQ1p3hA==", + "license": "Artistic-2.0", "engines": { "node": ">=4" }, @@ -923,9 +914,8 @@ }, "node_modules/badges": { "version": "4.35.0", - "resolved": "https://registry.npmjs.org/badges/-/badges-4.35.0.tgz", - "integrity": "sha512-lyO25Wm/VdC+I+TxBAKkq444OMdWbszsH1WFcUthIYVVpTLHXKa1C0Vr4JCuLvsKjbBnQm6rEQMAsS34VL1ufA==", "dev": true, + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -1054,18 +1044,16 @@ }, "node_modules/callsites": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/caterpillar": { "version": "6.11.0", - "resolved": "https://registry.npmjs.org/caterpillar/-/caterpillar-6.11.0.tgz", - "integrity": "sha512-FQn5U9LyJiPuREifDEIANecN1ydrwqYOQhUMX0VAwVhaodD71pTfHs7Yg9nOiQuIjYRUgfQyARZts7YQkOXdWw==", "dev": true, + "license": "Artistic-2.0", "dependencies": { "@bevry/ansi": "^6.2.0", "editions": "^6.13.0", @@ -1261,9 +1249,8 @@ } }, "node_modules/eachr": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/eachr/-/eachr-6.3.0.tgz", - "integrity": "sha512-8IvhM85jVBHWObZ/GJ6MgzpBwD5Z/KsSbeQFMnauf71pB+CLRA7+qzEpueBGLD6j/PG4mBu8Ho+/J2aZjYFSOg==", + "version": "6.4.0", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0", "typechecker": "^8.2.0" @@ -1277,8 +1264,7 @@ }, "node_modules/editions": { "version": "6.13.0", - "resolved": "https://registry.npmjs.org/editions/-/editions-6.13.0.tgz", - "integrity": "sha512-wAQCrco6+HLunD8Zv2VTZxJqAv90kQbhSkD5hH80o1D2TvM0V5tbwHRFL1OnYg0BZRKOcWaGuBh8WCwjfz/eGw==", + "license": "Artistic-2.0", "dependencies": { "version-range": "^3.2.0" }, @@ -1289,14 +1275,26 @@ "url": "https://bevry.me/fund" } }, + "node_modules/editions/node_modules/version-range": { + "version": "3.2.0", + "license": "Artistic-2.0", + "dependencies": { + "version-compare": "^3.2.0" + }, + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "license": "MIT" }, "node_modules/errlop": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/errlop/-/errlop-7.2.0.tgz", - "integrity": "sha512-/dMPTcSrBHN6c6idVJbNiFJ8KZGDujcRrf2rDCXqo4sGUwbRpbo1KKTtL91wBA5OAhCZ9O1hmKQpDFyVo6owrg==", + "license": "Artistic-2.0", "engines": { "node": ">=4" }, @@ -1371,15 +1369,15 @@ } }, "node_modules/eslint-config-bevry": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-bevry/-/eslint-config-bevry-4.0.0.tgz", - "integrity": "sha512-329+HQ/bn9VnjpvWWGqjenyx/ZTxG38+vzjYNUl4BqGXjdHL2U9N0DM3I5YXsSp7Nr5bHkDHUPVycRaz5rFNnQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-bevry/-/eslint-config-bevry-5.0.0.tgz", + "integrity": "sha512-wJeal93YYzRsyAoIuZmJmiQapGMK5YtAHUvJhMTqUUsPxID4lRsikPspB6S1nudafohuMGp8NohkpYeOV8heGA==", "dev": true, "dependencies": { - "semver": "^7.5.4" + "version-clean": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">=6" }, "funding": { "url": "https://bevry.me/fund" @@ -1454,9 +1452,8 @@ }, "node_modules/espree": { "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", @@ -1509,9 +1506,8 @@ }, "node_modules/event-emitter-grouped": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/event-emitter-grouped/-/event-emitter-grouped-6.2.0.tgz", - "integrity": "sha512-qKUoNmGXBdlMI9PfWqr3QPuHqERWNekw4/4j2LqvybsKG4IK3mqzgKHYDOZCrdSeX8svcMI+ZJ6Mi2FAETa4kQ==", "dev": true, + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0", "taskgroup": "^9.3.0", @@ -1573,8 +1569,7 @@ }, "node_modules/extendr": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/extendr/-/extendr-7.2.0.tgz", - "integrity": "sha512-OERmPfUU5W6XFhtvYXKpfsvzphuKlgczjFuyLetNpp2yEq6eM5BcaRkdv4iITTTA72kINNQrynsNLrc7dqJIVg==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0", "typechecker": "^8.2.0" @@ -1600,8 +1595,7 @@ }, "node_modules/extract-opts": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/extract-opts/-/extract-opts-5.2.0.tgz", - "integrity": "sha512-aaJT0KtC/Qf0fDgRE+NAzgQrogNPfSNjesxA/mNdF8p9J0qmvQMTa3brZZTbfQzPanH43/lnSG6PtBUuMgy1gA==", + "license": "Artistic-2.0", "dependencies": { "eachr": "^6.3.0", "editions": "^6.13.0", @@ -1616,9 +1610,8 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-diff": { "version": "1.3.0", @@ -1626,7 +1619,7 @@ "license": "Apache-2.0" }, "node_modules/fast-glob": { - "version": "3.3.1", + "version": "3.3.2", "dev": true, "license": "MIT", "dependencies": { @@ -1653,9 +1646,8 @@ }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", @@ -1672,9 +1664,8 @@ }, "node_modules/fellow": { "version": "6.25.0", - "resolved": "https://registry.npmjs.org/fellow/-/fellow-6.25.0.tgz", - "integrity": "sha512-/eYuI5Cr9hi2Llw5VHIdiDQKe4cL4Qa1a9EE8NxuT/xa7KsfsnF7pBcYXIhmqSLxPbWS1ozF1vzYcN4VTf9OwA==", "dev": true, + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -1682,6 +1673,30 @@ "url": "https://bevry.me/fund" } }, + "node_modules/figures": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "5.0.0", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "dev": true, @@ -1695,8 +1710,7 @@ }, "node_modules/filedirname": { "version": "2.10.0", - "resolved": "https://registry.npmjs.org/filedirname/-/filedirname-2.10.0.tgz", - "integrity": "sha512-TKb/ta1cqYSEpq3mypdG3+yRKgMyBLidLXkc55yRwc3qwXuVlcRdT5Jw5Ne8kqFv/LHoCUxmQ3nerQZCpIIbNA==", + "license": "Artistic-2.0", "dependencies": { "get-current-line": "^6.9.0" }, @@ -1734,7 +1748,7 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", + "version": "3.2.0", "dev": true, "license": "MIT", "dependencies": { @@ -1743,7 +1757,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { @@ -1765,8 +1779,7 @@ }, "node_modules/get-cli-arg": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/get-cli-arg/-/get-cli-arg-8.1.0.tgz", - "integrity": "sha512-KBs2vR7bULdHR2xdfPumLJDdKuEDyB8hofOGf7HXNml/0tNqOn3oU//seyWcjCVG4YDC5du8c/Kqz47RcNhyuA==", + "license": "Artistic-2.0", "dependencies": { "normalify": "^2.27.0" }, @@ -1779,8 +1792,7 @@ }, "node_modules/get-current-line": { "version": "6.9.0", - "resolved": "https://registry.npmjs.org/get-current-line/-/get-current-line-6.9.0.tgz", - "integrity": "sha512-jFRFeABDPUMkidcVK3OOWKCAts9Gpku1+dWDLTU7mHbdp6sRB2IM9EnE3io8gJhxCHyTgANj3N5Lg9yHyAxypA==", + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -1788,6 +1800,16 @@ "url": "https://bevry.me/fund" } }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-intrinsic": { "version": "1.2.2", "license": "MIT", @@ -1844,9 +1866,8 @@ }, "node_modules/globals": { "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, + "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -1869,8 +1890,7 @@ }, "node_modules/graceful-fs": { "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", @@ -1961,19 +1981,17 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", "dev": true, + "license": "MIT", "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2008,8 +2026,7 @@ }, "node_modules/inquirer": { "version": "9.2.12", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.12.tgz", - "integrity": "sha512-mg3Fh9g2zfuVWJn6lhST0O7x4n03k7G8Tx5nvikJkbq8/CK47WDVm+UznF0G6s5Zi0KcyUisr6DU8T67N5U+1Q==", + "license": "MIT", "dependencies": { "@ljharb/through": "^2.3.11", "ansi-escapes": "^4.3.2", @@ -2041,40 +2058,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/inquirer/node_modules/escape-string-regexp": { - "version": "5.0.0", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/figures": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^5.0.0", - "is-unicode-supported": "^1.2.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/inquirer/node_modules/is-unicode-supported": { - "version": "1.3.0", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-docker": { "version": "3.0.0", "dev": true, @@ -2167,10 +2150,10 @@ } }, "node_modules/is-unicode-supported": { - "version": "0.1.0", + "version": "1.3.0", "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2223,9 +2206,8 @@ }, "node_modules/json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2306,24 +2288,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/logger-clearable": { - "version": "3.16.0", + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "0.1.0", "license": "MIT", "engines": { "node": ">=10" }, "funding": { - "url": "https://bevry.me/fund" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "license": "ISC", + "node_modules/logger-clearable": { + "version": "4.2.0", + "license": "Artistic-2.0", "dependencies": { - "yallist": "^4.0.0" + "editions": "^6.13.0" }, "engines": { - "node": ">=10" + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" } }, "node_modules/merge-stream": { @@ -2371,8 +2356,7 @@ }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2390,12 +2374,11 @@ } }, "node_modules/native-promise-pool": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/native-promise-pool/-/native-promise-pool-3.20.0.tgz", - "integrity": "sha512-Bgq6GMLw3Bv7BVn3njUHld5tqKLuzTq3NqI70DctoVkgZBTI+ddti/UO0opHkBwXPCqphGPKatZnmkzhDwfL8Q==", + "version": "3.23.0", "dev": true, + "license": "Artistic-2.0", "dependencies": { - "editions": "^6.8.0" + "editions": "^6.13.0" }, "engines": { "node": ">=10" @@ -2411,9 +2394,8 @@ }, "node_modules/node-fetch": { "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dev": true, + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -2431,8 +2413,7 @@ }, "node_modules/normalify": { "version": "2.27.0", - "resolved": "https://registry.npmjs.org/normalify/-/normalify-2.27.0.tgz", - "integrity": "sha512-4mK4oobeHuYpv6OQiZWd/ILUi1GFaTKPxiQ9tPvI/nWIoz6i7c6/qXPopmrw7opjGTCSDHt2HwzYWrIr+mWRTg==", + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -2540,6 +2521,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ora/node_modules/is-unicode-supported": { + "version": "0.1.0", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/os-tmpdir": { "version": "1.0.2", "license": "MIT", @@ -2577,9 +2568,8 @@ }, "node_modules/parent-module": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "dependencies": { "callsites": "^3.0.0" }, @@ -2708,9 +2698,8 @@ }, "node_modules/punycode": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -2748,9 +2737,8 @@ }, "node_modules/resolve-from": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -2777,9 +2765,8 @@ }, "node_modules/rfc-log-levels": { "version": "3.20.0", - "resolved": "https://registry.npmjs.org/rfc-log-levels/-/rfc-log-levels-3.20.0.tgz", - "integrity": "sha512-fRvsAhOFIp0Ez6ooDFMpMM9Ma0FymjF9gOPHjE4b32XvvLZjEyHQbLpf1cs3Hd1G7Lg2mUL4fRJD53JoPokcWA==", "dev": true, + "license": "Artistic-2.0", "engines": { "node": ">=10" }, @@ -2931,8 +2918,7 @@ }, "node_modules/safefs": { "version": "8.3.0", - "resolved": "https://registry.npmjs.org/safefs/-/safefs-8.3.0.tgz", - "integrity": "sha512-IS/Q+IZ4FLSHUHVEKgLA+8SD5LPB5LoN0gDbeMcqW4W+PUoXVV2/7HJ7iLfi7XXw7qQE/A6g64+k89VhcrEkWQ==", + "license": "Artistic-2.0", "dependencies": { "graceful-fs": "^4.2.11", "version-compare": "^3.2.0" @@ -2946,8 +2932,7 @@ }, "node_modules/safeps": { "version": "11.2.0", - "resolved": "https://registry.npmjs.org/safeps/-/safeps-11.2.0.tgz", - "integrity": "sha512-qa6JaSDyhuOqUexFqfqihz8feBTMgZTiSvC0UDSkkH3N4EzzlkVkLH+JMd4vOuiHv6D4iHDtBiWLv5C92d5i0Q==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0", "extract-opts": "^5.2.0", @@ -2966,19 +2951,6 @@ "version": "2.1.2", "license": "MIT" }, - "node_modules/semver": { - "version": "7.5.4", - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/set-function-length": { "version": "1.1.1", "license": "MIT", @@ -3017,9 +2989,8 @@ }, "node_modules/simplytyped": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/simplytyped/-/simplytyped-3.3.0.tgz", - "integrity": "sha512-mz4RaNdKTZiaKXgi6P1k/cdsxV3gz+y1Wh2NXHWD40dExktLh4Xx/h6MFakmQWODZHj/2rKe59acacpL74ZhQA==", "dev": true, + "license": "MIT", "peerDependencies": { "typescript": ">=2.8.0" } @@ -3045,9 +3016,8 @@ }, "node_modules/spdx-license-list": { "version": "6.8.0", - "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.8.0.tgz", - "integrity": "sha512-5UdM7r9yJ1EvsPQZWfa41AZjLQngl9iMMysm9XBW7Lqhq7aF8cllfqjS+rFCHB8FFMGSM0yFWue2LUV9mR0QzQ==", "dev": true, + "license": "CC0-1.0", "engines": { "node": ">=8" }, @@ -3056,18 +3026,26 @@ } }, "node_modules/spinner-title": { - "version": "3.16.0", - "license": "MIT", + "version": "4.1.0", + "license": "Artistic-2.0", "dependencies": { - "cli-spinners": "^2.6.0" + "cli-spinners": "1.3.1", + "editions": "^6.13.0" }, "engines": { - "node": ">=10" + "node": ">=4" }, "funding": { "url": "https://bevry.me/fund" } }, + "node_modules/spinner-title/node_modules/cli-spinners": { + "version": "1.3.1", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "license": "MIT", @@ -3110,9 +3088,8 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" }, @@ -3147,8 +3124,7 @@ }, "node_modules/taskgroup": { "version": "9.3.0", - "resolved": "https://registry.npmjs.org/taskgroup/-/taskgroup-9.3.0.tgz", - "integrity": "sha512-yYsPr+4YYfigAb0ZGbIsvKumdOW8+s+226Swn21OSvdipTatsLsVBp7Cq9qTgKGBloYRydRkS4VE/43xyU0a9g==", + "license": "Artistic-2.0", "dependencies": { "ambi": "3.2.0", "eachr": "^6.3.0", @@ -3211,9 +3187,8 @@ }, "node_modules/tr46": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tslib": { "version": "2.6.2", @@ -3232,9 +3207,8 @@ }, "node_modules/type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -3243,9 +3217,8 @@ } }, "node_modules/typechecker": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/typechecker/-/typechecker-8.2.0.tgz", - "integrity": "sha512-SnCTb8RGuu4n3fhbbQ7VJPtFc8F3WtQ9HD7rBg3cyBKKsL8bhAz6tB7ul/zX7hMj8IVFWRfrdbZpd+84lSA8Pw==", + "version": "8.4.0", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0" }, @@ -3258,9 +3231,8 @@ }, "node_modules/typescript": { "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, + "license": "Apache-2.0", "peer": true, "bin": { "tsc": "bin/tsc", @@ -3272,8 +3244,7 @@ }, "node_modules/unbounded": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/unbounded/-/unbounded-5.2.0.tgz", - "integrity": "sha512-/DKuVxnOBgTB85FUcSKAyjPBCsu0mVvG7JtRMQa4+EzyBYS0zYEzpcts5R9QrjL7kE9Jy1iu4XQdAYv/itf4qg==", + "license": "Artistic-2.0", "dependencies": { "editions": "^6.13.0" }, @@ -3294,9 +3265,8 @@ }, "node_modules/uri-js": { "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -3326,9 +3296,8 @@ }, "node_modules/valid-directory/node_modules/fdir": { "version": "6.1.1", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.1.1.tgz", - "integrity": "sha512-QfKBVg453Dyn3mr0Q0O+Tkr1r79lOTAKSi9f/Ot4+qVEwxWhav2Z+SudrG9vQjM2aYRMQQZ2/Q1zdA8ACM1pDg==", "dev": true, + "license": "MIT", "peerDependencies": { "picomatch": "3.x" }, @@ -3340,9 +3309,8 @@ }, "node_modules/valid-directory/node_modules/picomatch": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz", - "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==", "dev": true, + "license": "MIT", "optional": true, "peer": true, "engines": { @@ -3352,10 +3320,19 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/version-clean": { + "version": "1.0.0", + "license": "Artistic-2.0", + "engines": { + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" + } + }, "node_modules/version-compare": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/version-compare/-/version-compare-3.2.0.tgz", - "integrity": "sha512-cSIEcfQ2OuSqOC+SIjHXMoldXuXavr/M5GLtQYpQG6mn+tlKYK1DNJ/pllsGGnogM81ekhcHdLJmdEQmwA0hQA==", + "license": "Artistic-2.0", "engines": { "node": ">=4" }, @@ -3364,12 +3341,8 @@ } }, "node_modules/version-range": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/version-range/-/version-range-3.2.0.tgz", - "integrity": "sha512-aP/XwEG9q+mTjyGUR2FDrIfLMAylJ4k4/eSCxXBAeDUeHWWtzFeWE37YlTrPA5lEXwA2A7A0N+YDPEPAkuEcJg==", - "dependencies": { - "version-compare": "^3.2.0" - }, + "version": "4.2.0", + "license": "Artistic-2.0", "engines": { "node": ">=4" }, @@ -3386,15 +3359,13 @@ }, "node_modules/webidl-conversions": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/whatwg-url": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -3431,10 +3402,6 @@ "dev": true, "license": "ISC" }, - "node_modules/yallist": { - "version": "4.0.0", - "license": "ISC" - }, "node_modules/yocto-queue": { "version": "0.1.0", "dev": true, diff --git a/package.json b/package.json index d462f16..a4d3e59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "boundation", - "version": "1.85.0", + "version": "1.86.0", "description": "Automatic scaffolding and upgrading of your JavaScript ecosystem projects using Bevry's best practices", "homepage": "https://github.com/bevry/boundation", "license": "Artistic-2.0", @@ -108,10 +108,10 @@ "@bevry/fs-unlink": "^1.0.0", "@bevry/fs-write": "^1.0.0", "@bevry/github-orgs": "^2.3.0", - "@bevry/list": "^1.8.0", - "@bevry/nodejs-ecmascript-compatibility": "^5.1.0", - "@bevry/nodejs-versions": "^2.4.0", - "@bevry/testen": "^5.0.2", + "@bevry/list": "^2.0.0", + "@bevry/nodejs-ecmascript-compatibility": "^5.3.0", + "@bevry/nodejs-versions": "^3.0.0", + "@bevry/testen": "^7.0.0", "arrange-package-json": "^4.3.0", "arrangekeys": "^6.2.0", "errlop": "^7.2.0", @@ -120,15 +120,15 @@ "inquirer": "^9.2.12", "js-yaml": "^4.1.0", "safeps": "^11.2.0", - "typechecker": "^8.2.0", + "typechecker": "^8.4.0", "version-compare": "^3.2.0", - "version-range": "^3.2.0" + "version-range": "^4.2.0" }, "devDependencies": { "@bevry/update-contributors": "^1.23.0", "assert-helpers": "^11.4.0", "eslint": "^8.54.0", - "eslint-config-bevry": "^4.0.0", + "eslint-config-bevry": "^5.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.1", "kava": "^7.2.0", @@ -176,6 +176,8 @@ "trailingComma": "all" }, "boundation": { + "maintainedNodeVersions": true, + "expandNodeVersions": false, "compileNode": false } } \ No newline at end of file diff --git a/source/ci.js b/source/ci.js index b986085..e2ffa1c 100644 --- a/source/ci.js +++ b/source/ci.js @@ -98,7 +98,7 @@ function generateGitHubActionsJSON(state) { const npmPublishSteps = [ { name: 'publish to npm', - uses: 'bevry-actions/npm@v1.1.1', + uses: 'bevry-actions/npm@v1.1.2', with: { npmAuthToken: '${{ secrets.NPM_AUTH_TOKEN }}', npmBranchTag: answers.npm ? ':next' : null, @@ -220,7 +220,7 @@ function generateGitHubActionsJSON(state) { steps: [ { name: 'Enable auto-merge for Dependabot PRs', - run: 'gh pr merge --auto --merge "$PR_URL"', + run: 'gh pr merge --auto --squash "$PR_URL"', env: { PR_URL: '${{github.event.pull_request.html_url}}', GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}', diff --git a/source/data.js b/source/data.js index c06b606..9fba5b8 100644 --- a/source/data.js +++ b/source/data.js @@ -10,8 +10,6 @@ import { export const pwd = cwd() -export const typesDir = 'compiled-types' - // fill this with a map of dependency package names to versions that are busted // so that if they are necessary, a previous version is used instead export const bustedVersions = {} diff --git a/source/editions.js b/source/editions.js index 2b2992e..5fa105f 100644 --- a/source/editions.js +++ b/source/editions.js @@ -76,15 +76,12 @@ async function writeEntry({ autoloader = false, always = false, exportDefault = false, - typesDirectoryPath, sourceEdition, + typesEdition, nodeEditionRequire, nodeEditionImport, }) { let resolved - const typesPath = typesDirectoryPath - ? typesDirectoryPath + sourceEdition[entry].replace(/.[a-z]+$/, '.d.ts') - : sourceEdition[entry + 'Path'] if (nodeEditionRequire) { if (autoloader || always) { @@ -92,7 +89,7 @@ async function writeEntry({ await writeLoader({ entry: entryWithExtension, autoloader, - typesPath, + typesPath: typesEdition && typesEdition[entry + 'Path'], targetEntry: nodeEditionRequire[entry], targetPath: nodeEditionRequire[entry + 'Path'], }) @@ -108,7 +105,7 @@ async function writeEntry({ await writeLoader({ entry: entryWithExtension, autoloader, - typesPath, + typesPath: typesEdition && typesEdition[entry + 'Path'], targetEntry: nodeEditionImport[entry], targetPath: nodeEditionImport[entry + 'Path'], }) @@ -493,6 +490,53 @@ export async function generateEditions(state) { } } + // add types + if (answers.language === 'typescript') { + editions.set( + 'types', + new Edition({ + compiler: 'types', + directory: 'edition-types', + index: addExtension(answers.indexEntry, `d.ts`), + node: addExtension(answers.nodeEntry, `d.ts`), + browser: addExtension(answers.browserEntry, `d.ts`), + test: addExtension(answers.testEntry, `d.ts`), + bin: addExtension(answers.binEntry, `d.ts`), + tags: ['compiled', 'types', 'import'], + engines: false, + }), + ) + } else { + // define the possible locations + // do note that they must exist throughout boundation, which if it is a compiled dir, is sporadic + const sourceEdition = editions.get('source') + const typePaths = [ + // e.g. index.d.ts + pathUtil.join(answers.indexEntry + '.d.ts'), + // e.g. source/index.d.ts + sourceEdition && + pathUtil.join(sourceEdition.directory, answers.indexEntry + '.d.ts'), + ].filter((i) => i) + // fetch their existing status and convert back into the original location + const typePathsExisting = await Promise.all( + typePaths.map((i) => isAccessible(i).then((e) => e && i)), + ) + // find the first location that exists + const typePath = typePathsExisting.find((i) => i) + // and if exists, add our types edition + if (typePath) { + editions.set( + 'types', + new Edition({ + directory: '.', + index: typePath, + tags: ['types', answers.sourceModule ? 'import' : 'require'], + engines: false, + }), + ) + } + } + // update state state.editions = Array.from(editions.values()) } @@ -522,6 +566,18 @@ export function updateEditionFields(state) { if (edition.compiler === 'coffeescript') { edition.scripts[compileScriptName] = `coffee -bco ./${edition.directory} ./${answers.sourceDirectory}` + } else if (edition.compiler === 'types') { + edition.scripts[compileScriptName] = [ + 'tsc', + '--emitDeclarationOnly', + '--declaration', + '--declarationMap', + `--declarationDir ./${edition.directory}`, + `--project ${answers.tsconfig}`, + ...fixTsc(edition.directory, answers.sourceDirectory), + ] + .filter((part) => part) + .join(' ') } else if (edition.compiler === 'typescript') { edition.scripts[compileScriptName] = [ 'tsc', @@ -634,6 +690,9 @@ export function updateEditionFields(state) { description.push(`${nodeVersion}`) } } + if (has(edition.tags, 'types')) { + description.push('Types') + } if (has(edition.tags, 'require')) { description.push('with Require for modules') } else if (has(edition.tags, 'import')) { @@ -646,7 +705,7 @@ export function updateEditionFields(state) { // Helpers export function updateEditionEntries(state) { const { - activeEdition, + typesEdition, nodeEditionRequire, nodeEditionImport, browserEdition, @@ -659,9 +718,21 @@ export function updateEditionEntries(state) { delete packageData.cjs // https://nodejs.org/api/esm.html#esm_conditional_exports + // https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#package-json-exports-imports-and-self-referencing + // https://nodejs.org/api/packages.html#packages_exports + // https://nodejs.org/api/packages.html#package-entry-points + // https://nodejs.org/api/packages.html#subpath-exports + // https://nodejs.org/api/packages.html#conditional-exports packageData.exports = {} - // prepare + // types + // https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html + const typesIndexPath = cojoin('.', typesEdition && typesEdition.indexPath) + if (typesIndexPath) { + packageData.types = typesEdition.indexPath // don't prefix the ./ + } + + // node exports const autoloaderPath = cojoin( '.', state.useEditionAutoloader && packageData.main, @@ -674,37 +745,45 @@ export function updateEditionEntries(state) { '.', nodeEditionRequire && nodeEditionRequire.indexPath, ) + if (nodeImportPath || autoloaderPath || nodeRequirePath) { + const nodeExports = {} + set(nodeExports, 'types', typesIndexPath || null) + set(nodeExports, 'import', nodeImportPath || null) + set(nodeExports, 'default', autoloaderPath || null) // default before require, as require should be direct, whereas the autoloader is indirect, as intended + set(nodeExports, 'require', nodeRequirePath || null) + set(packageData.exports, 'node', nodeExports) + } + + // browser exports const browserPath = cojoin('.', browserEdition && browserEdition.indexPath) const browserImportPath = has(browserEdition && browserEdition.tags, 'import') && browserPath const browserRequirePath = has(browserEdition && browserEdition.tags, 'require') && browserPath - const activePath = cojoin('.', activeEdition && activeEdition.indexPath) - const activeImportPath = - has(activeEdition && activeEdition.tags, 'import') && activePath - const activeRequirePath = - has(activeEdition && activeEdition.tags, 'require') && activePath - - // node exports - const nodeExports = {} - set(nodeExports, 'import', nodeImportPath || null) - set(nodeExports, 'default', autoloaderPath || null) - set(nodeExports, 'require', nodeRequirePath || null) - set(packageData.exports, 'node', nodeExports) - - // browser exports - const browserExports = {} - set(browserExports, 'import', browserImportPath || null) - set(browserExports, 'require', browserRequirePath || null) - set(packageData.exports, 'browser', browserExports) + if (browserImportPath || browserRequirePath) { + const browserExports = {} + set(browserExports, 'types', typesIndexPath || null) + set(browserExports, 'import', browserImportPath || null) + set(browserExports, 'require', browserRequirePath || null) + set(packageData.exports, 'browser', browserExports) + } set(packageData, 'browser', unjoin('.', browserPath) || null) set(packageData, 'module', unjoin('.', browserImportPath) || null) - // default exports - const activeExports = {} - set(activeExports, 'import', activeImportPath || null) - set(activeExports, 'require', activeRequirePath || null) - set(packageData.exports, 'default', activeExports) + // // default exports + // const activePath = cojoin('.', activeEdition && activeEdition.indexPath) + // const activeImportPath = + // has(activeEdition && activeEdition.tags, 'import') && activePath + // const activeRequirePath = + // has(activeEdition && activeEdition.tags, 'require') && activePath + // if (activeImportPath || activeRequirePath) { + // const defaultExports = {} + // set(defaultExports, 'types', typesIndexPath || null) + // set(defaultExports, 'import', activeImportPath || null) + // set(defaultExports, 'require', activeRequirePath || null) + // set(packageData.exports, 'default', defaultExports) + // } + // ^ this never worked due to activeEdition not resolving due to missing getter, currently activeEdition is resolving to typescript source edition, which isn't what we want, so just ignore it for now. // delete the exports if we don't need it // this is required for for eslint-config-bevry/adapt.js @@ -715,6 +794,7 @@ export function updateEditionEntries(state) { export async function scaffoldEditions(state) { // fetch const { + typesEdition, sourceEdition, nodeEdition, nodeEditionRequire, @@ -839,9 +919,9 @@ export async function scaffoldEditions(state) { if (nodeEdition) { packageData.main = await writeEntry({ entry: 'index', - typesDirectoryPath: state.typesDirectoryPath, autoloader: state.useEditionAutoloader, exportDefault, + typesEdition, sourceEdition, nodeEditionRequire, nodeEditionImport, @@ -854,9 +934,9 @@ export async function scaffoldEditions(state) { await writeEntry({ entry: 'bin', always: true, - typesDirectoryPath: state.typesDirectoryPath, autoloader: state.useEditionAutoloader, exportDefault, + typesEdition, sourceEdition, nodeEditionRequire, nodeEditionImport, @@ -869,9 +949,9 @@ export async function scaffoldEditions(state) { if (answers.docpadPlugin === false) { state.test = await writeEntry({ entry: 'test', - typesDirectoryPath: state.typesDirectoryPath, autoloader: state.useEditionAutoloader, exportDefault, + typesEdition, sourceEdition, nodeEditionRequire, nodeEditionImport, diff --git a/source/questions.js b/source/questions.js index 7fe2a2d..2f5e0f7 100644 --- a/source/questions.js +++ b/source/questions.js @@ -26,7 +26,6 @@ import { import { getGitDefaultBranch, getGitEmail, - getGitOrganisation, getGitOriginUrl, getGitProject, getGitUsername, @@ -41,9 +40,8 @@ import { getPackageIndexEntry, getPackageKeywords, getPackageName, - getPackageNodeEngineVersion, + getPackageNodeEngine, getPackageNodeEntry, - getPackageOrganisation, getPackageProperty, getPackageRepoUrl, getPackageTestEntry, @@ -73,7 +71,7 @@ export async function getQuestions(state) { ) const browsersList = typeof browsers === 'string' ? browsers : 'defaults' const editioned = hasEditions(packageData) - const nodeEngineVersion = getPackageNodeEngineVersion(packageData) + const nodeEngine = getPackageNodeEngine(packageData) return [ { name: 'name', @@ -615,13 +613,22 @@ export async function getQuestions(state) { return bin }, }, + { + name: 'nodeVersionsRange', + message: + 'What range (if any) do you wish to restrict the Node.js versions to?', + filter: trim, + ignore({ vercelWebsite, targetModules }) { + return vercelWebsite || targetModules.join('') === 'import' + }, + }, { name: 'nodeVersions', message: 'Automated property to provide Node.js versions for the upcoming questions', type: 'checkbox', validate: isSpecified, - choices({ vercelWebsite, targetModules }) { + choices({ vercelWebsite, targetModules, nodeVersionsRange }) { // use released flag just in case something ever changes if (vercelWebsite) return filterSignificantNodeVersions({ released: true, vercel: true }) @@ -635,6 +642,7 @@ export async function getQuestions(state) { released: true, maintainedOrLTS: true, gte: '4', // minimum supported editions and assert-helpers version + range: nodeVersionsRange, }) }, async default(opts) { @@ -708,6 +716,16 @@ export async function getQuestions(state) { return Boolean(desiredNodeOnly) }, }, + { + name: 'nodeVersionsSupportedRange', + message: + 'What range (if any) do you wish to restrict the supported Node.js versions to?', + filter: trim, + default: nodeEngine, + skip({ desiredNodeOnly }) { + return desiredNodeOnly + }, + }, { name: 'nodeVersionsSupported', message: 'Which Node.js versions must your package support?', @@ -718,40 +736,32 @@ export async function getQuestions(state) { desiredNodeOnly, desiredNodeVersion, maintainedNodeVersions, + nodeVersionsSupportedRange, }) { if (desiredNodeOnly) { return [desiredNodeVersion] } else if (maintainedNodeVersions) { return filterNodeVersions(nodeVersions, { maintained: true, - gte: nodeEngineVersion, - }) - } else if ( - nodeEngineVersion && - isNodeVersionActiveOrCurrent(nodeEngineVersion) - ) { - return filterNodeVersions(nodeVersions, { - activeOrCurrent: true, - gte: nodeEngineVersion, - }) - } else if (nodeEngineVersion) { - return filterNodeVersions(nodeVersions, { - gte: nodeEngineVersion, + range: nodeVersionsSupportedRange, }) } else { return filterNodeVersions(nodeVersions, { - maintained: true, + range: nodeVersionsSupportedRange, }) } }, default(opts) { return this.choices(opts) }, + skip({ maintainedNodeVersions, nodeVersionsSupportedRange }) { + return Boolean(maintainedNodeVersions || nodeVersionsSupportedRange) + }, }, { name: 'nodeVersionSupportedMinimum', message: - 'Automated property for constraining the minimum Node.js version to be supported', + 'Automated property (do not override) for constraining the minimum Node.js version to be supported', type: 'list', validate: isNumber, choices({ nodeVersionsSupported }) { @@ -765,7 +775,7 @@ export async function getQuestions(state) { { name: 'nodeVersionSupportedMaximum', message: - 'Automated property for constraining the maximum Node.js version to be supported support', + 'Automated property (do not override) for constraining the maximum Node.js version to be supported support', type: 'list', validate: isNumber, choices({ nodeVersionsSupported }) { @@ -776,50 +786,60 @@ export async function getQuestions(state) { }, skip: true, }, + { + name: 'nodeVersionsTestedRange', + message: + 'What range (if any) do you wish to restrict the tested Node.js versions to?', + filter: trim, + skip({ desiredNodeOnly }) { + return desiredNodeOnly + }, + }, { name: 'nodeVersionsTested', message: 'Which Node.js versions must your package test against?', type: 'checkbox', validate: isSpecified, choices({ - nodeVersions, + language, desiredNodeOnly, desiredNodeVersion, + nodeVersions, + nodeVersionsSupported, + maintainedNodeVersions, expandNodeVersions, + nodeVersionsTestedRange, }) { - if (desiredNodeOnly) { + if (language === 'json' || desiredNodeOnly) { return [desiredNodeVersion] } else if (expandNodeVersions) { - return nodeVersions - } else if ( - !nodeEngineVersion || - isNodeVersionActiveOrCurrent(nodeEngineVersion) - ) { return filterNodeVersions(nodeVersions, { - maintained: true, - gte: nodeEngineVersion, + range: nodeVersionsTestedRange, + }) + } else if (maintainedNodeVersions) { + return filterNodeVersions(nodeVersionsSupported, { + range: nodeVersionsTestedRange, }) } else { return filterNodeVersions(nodeVersions, { - gte: nodeEngineVersion, + range: nodeVersionsTestedRange, }) } }, default(opts) { return this.choices(opts) }, - skip({ desiredNodeOnly }) { - return Boolean(desiredNodeOnly) + skip({ nodeVersionsTestedRange }) { + return Boolean(nodeVersionsTestedRange) }, }, { name: 'nodeVersionTestedMinimum', message: - 'Automated property for constraining the minimum Node.js version for testing', + 'Automated property (do not override) for constraining the minimum Node.js version for testing', type: 'list', validate: isNumber, - choices({ language, desiredNodeVersion, nodeVersionsTested }) { - if (language === 'json') return [desiredNodeVersion] + choices({ nodeVersionsTested }) { return nodeVersionsTested }, default(opts) { @@ -830,11 +850,10 @@ export async function getQuestions(state) { { name: 'nodeVersionTestedMaximum', message: - 'Automated property for constraining the maximum Node.js version for testing', + 'Automated property (do not override) for constraining the maximum Node.js version for testing', type: 'list', validate: isNumber, - choices({ language, desiredNodeVersion, nodeVersionsTested }) { - if (language === 'json') return [desiredNodeVersion] + choices({ nodeVersionsTested }) { return nodeVersionsTested }, default(opts) { @@ -842,6 +861,15 @@ export async function getQuestions(state) { }, skip: true, }, + { + name: 'nodeVersionsTargetedRange', + message: + 'What range (if any) do you wish to restrict the targeted Node.js versions to?', + filter: trim, + skip({ desiredNodeOnly }) { + return desiredNodeOnly + }, + }, { name: 'nodeVersionsTargeted', message: @@ -850,30 +878,43 @@ export async function getQuestions(state) { validate: isSpecified, choices({ language, + desiredNodeOnly, desiredNodeVersion, + maintainedNodeVersions, nodeVersionsSupported, nodeVersionsTested, + nodeVersionsTargetedRange, }) { - if (language === 'json') return [desiredNodeVersion] - return unique(nodeVersionsTested.concat(nodeVersionsSupported)).sort( - versionCompare, - ) + if (language === 'json' || desiredNodeOnly) { + return [desiredNodeVersion] + } else if (maintainedNodeVersions) { + return filterNodeVersions(nodeVersionsSupported, { + range: nodeVersionsTargetedRange, + }) + } else { + const supportedAndTestedVersions = unique([ + ...nodeVersionsSupported, + ...nodeVersionsTested, + ]).sort(versionCompare) + return filterNodeVersions(supportedAndTestedVersions, { + range: nodeVersionsTargetedRange, + }) + } }, default(opts) { return this.choices(opts) }, - skip({ desiredNodeOnly }) { - return Boolean(desiredNodeOnly) + skip({ nodeVersionsTargetedRange }) { + return Boolean(nodeVersionsTargetedRange) }, }, { - name: 'nodeVersionTargetMinimum', + name: 'nodeVersionTargetedMinimum', message: - 'Automated property for constraining the minimum Node.js version for targeting', + 'Automated property (do not override) for constraining the minimum Node.js version for targeting', type: 'list', validate: isNumber, - choices({ language, desiredNodeVersion, nodeVersionsTargeted }) { - if (language === 'json') return [desiredNodeVersion] + choices({ nodeVersionsTargeted }) { return nodeVersionsTargeted }, default(opts) { @@ -882,13 +923,12 @@ export async function getQuestions(state) { skip: true, }, { - name: 'nodeVersionTargetMaximum', + name: 'nodeVersionTargetedMaximum', message: - 'Automated property for constraining the maximum Node.js version for targeting', + 'Automated property (do not override) for constraining the maximum Node.js version for targeting', type: 'list', validate: isNumber, - choices({ language, desiredNodeVersion, nodeVersionsTargeted }) { - if (language === 'json') return [desiredNodeVersion] + choices({ nodeVersionsTargeted }) { return nodeVersionsTargeted }, default(opts) { @@ -901,24 +941,15 @@ export async function getQuestions(state) { type: 'checkbox', message: 'Which compile targets should be generated?', validate: isSpecified, - async choices({ - compilerNode, - nodeVersions, - nodeVersionTargetMinimum, - nodeVersionTargetMaximum, - }) { + async choices({ compilerNode, nodeVersionsTargeted }) { // ensure versions are in order of most preferred to least preferred // otherwise edition trimming will not work as expected - const nodeVersionsTargeted = filterNodeVersions(nodeVersions, { - gte: nodeVersionTargetMinimum, - lte: nodeVersionTargetMaximum, - }).reverse() return compilerNode === 'babel' - ? nodeVersionsTargeted + ? nodeVersionsTargeted.reverse() : compilerNode === 'typescript' ? intersect(allTypescriptTargets, [ ...(await fetchExclusiveCompatibleESVersionsForNodeVersions( - nodeVersionsTargeted, + nodeVersionsTargeted.reverse(), )), ]) // don't add ESNext as it is ephemeral : [] @@ -979,19 +1010,6 @@ export async function getAnswers(state) { answers.targets = answers.targets || [] answers.keywords = new Set((answers.keywords || '').split(/,\s*/)) - // constrain versions - answers.nodeVersionsSupported = filterNodeVersions( - answers.nodeVersionsSupported, - { - gte: answers.nodeVersionSupportedMinimum, - lte: answers.nodeVersionSupportedMaximum, - }, - ) - answers.nodeVersionsTested = filterNodeVersions(answers.nodeVersionsTested, { - gte: answers.nodeVersionTestedMinimum, - lte: answers.nodeVersionTestedMaximum, - }) - // ensure we don't have a situation where node 14 is about to be released, but we only support node 13 and up if (answers.desiredNodeVersion && answers.nodeVersionSupportedMaximum) { if ( @@ -1008,6 +1026,37 @@ export async function getAnswers(state) { } } - // Return + // sanity check versions (== instead of === for number/string compare) + /* eslint eqeqeq:0 */ + if ( + first(answers.nodeVersionsSupported) != + answers.nodeVersionSupportedMinimum || + last(answers.nodeVersionsSupported) != + answers.nodeVersionSupportedMaximum || + first(answers.nodeVersionsTested) != answers.nodeVersionTestedMinimum || + last(answers.nodeVersionsTested) != answers.nodeVersionTestedMaximum || + first(answers.nodeVersionsTargeted) != answers.nodeVersionTargetedMinimum || + last(answers.nodeVersionsTargeted) != answers.nodeVersionTargetedMaximum + ) { + console.error( + first(answers.nodeVersionsSupported), + answers.nodeVersionSupportedMinimum, + last(answers.nodeVersionsSupported), + answers.nodeVersionSupportedMaximum, + first(answers.nodeVersionsTested), + answers.nodeVersionTestedMinimum, + last(answers.nodeVersionsTested), + answers.nodeVersionTestedMaximum, + first(answers.nodeVersionsTargeted), + answers.nodeVersionTargetedMinimum, + last(answers.nodeVersionsTargeted), + answers.nodeVersionTargetedMaximum, + ) + throw new Error( + 'do not use nodeVersion*Minimum and nodeVersion*Maximum, use nodeVersions*Range instead', + ) + } + + // return return answers } diff --git a/source/runtime.js b/source/runtime.js index d95b0a4..66225a6 100644 --- a/source/runtime.js +++ b/source/runtime.js @@ -10,14 +10,9 @@ import write from '@bevry/fs-write' // local import { status } from './log.js' -import { - bustedVersions, - typesDir, - allLanguages, - allTypescriptTargets, -} from './data.js' +import { bustedVersions, allLanguages, allTypescriptTargets } from './data.js' import { parse, exec, spawn } from './fs.js' -import { fixTsc, getPreviousVersion, getDuplicateDeps } from './util.js' +import { getPreviousVersion, getDuplicateDeps } from './util.js' import { readPackage, writePackage } from './package.js' import { scaffoldEditions, @@ -138,17 +133,10 @@ async function install({ }) } -export async function upgradePackageDependencies(install) { - try { - return await spawn(['ncu', '-u']) - } catch (err) { - if (install) { - throw err - } else { - await spawn(['npm', 'i', '-g', 'npm-check-updates']) - upgradePackageDependencies(true) - } - } +export function upgradePackageDependencies(exclude = []) { + const args = ['npx', 'npm-check-updates', '-u'] + if (exclude.length) args.push('-x', exclude.join(',')) + return spawn(args) } export function peerDepInstallLocation(packageData, key) { @@ -338,34 +326,43 @@ export async function updateRuntime(state) { } // dependency compatibility for legacy node versions - const dependencyCompat = { - 'cli-spinners': 1, - 'lazy-require': 2, // 4 is node 10, 3 is node 8, 2 is node 0.10, extract-opts, safeps dep ... only docpad uses it - // safefs: 4, // 8 is node 4, 5 is node 8, 4 is 0.12, graceful-fs as only dep - // safeps: 7, // 11 is node 4, 9 is 8, 8 is 0.12, 7 is 0.8, extract-opts dep, safefs dep - // taskgroup: 5, // 6 is node 8, 5 is 0.8 - // cson: 5, // 6 is node 8, 5 is 0.14, has many deps - rimraf: 2, - semver: 4, // 5 is node 10, 4 is 4 -- should use version-range or version-compare instead - } - // editions v4 was last to support node <4 - // https://github.com/bevry/editions/blob/master/HISTORY.md#v500-2020-october-27 - const devDependencyCompat = { - // kava: 3, // 7 is node 4, 4 is 8, 3 is 0.12 - // '@bevry/ansi': 2, // 6 is node 4 - // errlop: 4, // 7 is node 4 - // assert-helpers needs 'process' module, which is node 4 and up - } - if (versionCompare(answers.nodeVersionSupportedMinimum, 10) === -1) { - for (const [key, value] of Object.entries(dependencyCompat)) { - versions[key] = value + // lazy-require: v4 is >=10, v3 is >=8, v2 is >=0.10 + // extract-opts, safeps dep ... only docpad uses it + // safefs: v8 is >=4, v5 is >=8, v4 is >=0.12 + // graceful-fs as only dep + // safeps: v11 is >=4, 9 is >=8, 8 is >=0.12, 7 is >=0.8 + // extract-opts dep, safefs dep + // taskgroup: v6 is >=8, 5 is >=0.8 + // cson: v6 is node >=8, 5 is >=0.14 + // has many deps + // semver: v5 is >=10, 4 >=4 + // should use version-range or version-compare instead + // rimraf: 2, + // kava: v7 is >=4, v4 is >=8, v3 is >=0.12 + // '@bevry/ansi': v6 is >=4 + // errlop: v7 is >=4 + // assert-helpers: needs 'process' module, which is node 4 and up + // editions: v4 was last to support node <4 + // https://github.com/bevry/editions/blob/master/HISTORY.md#v500-2020-october-27 + if (versionCompare(answers.nodeVersionSupportedMinimum, 8) === -1) { + const dependencyCompat = { + 'cli-spinners': 1, + 'lazy-require': 2, } - } - if (versionCompare(answers.nodeVersionTestedMinimum, 10) === -1) { - for (const [key, value] of Object.entries(devDependencyCompat)) { + for (const [key, value] of Object.entries(dependencyCompat)) { versions[key] = value } } + // if (versionCompare(answers.nodeVersionTestedMinimum, 8) === -1) { + // const devDependencyCompat = {} + // for (const [key, value] of Object.entries(devDependencyCompat)) { + // versions[key] = value + // } + // } + + // brand new typescript version workaround for incompat with typedoc version + // https://github.com/TypeStrong/typedoc/releases + versions.typescript = '~5.2' // add user overrides Object.assign( @@ -511,7 +508,7 @@ export async function updateRuntime(state) { semi: false, singleQuote: true, trailingComma: - versionCompare(answers.nodeVersionTargetMinimum, '8') < 0 + versionCompare(answers.nodeVersionTargetedMinimum, '8') < 0 ? 'es5' : 'all', } @@ -547,22 +544,6 @@ export async function updateRuntime(state) { packages['make-deno-edition'] = 'dev' } } - // types - state.scripts['our:compile:types'] = [ - 'tsc', - `--project ${answers.tsconfig}`, - '--emitDeclarationOnly', - '--declaration', - '--declarationMap', - `--declarationDir ./${typesDir}`, - ...fixTsc(typesDir, answers.sourceDirectory), - // doesn't work: '|| true', // fixes failures where types may be temporarily missing - ] - .filter((part) => part) - .join(' ') - state.typesDirectoryPath = packageData.types = `./${typesDir}/` - } else { - state.typesDirectoryPath = null } // partially typescript if (answers.languages.includes('typescript')) { @@ -573,33 +554,6 @@ export async function updateRuntime(state) { if (answers.keywords.has('node') && !packages['@types/node']) packages['@types/node'] = 'dev' } - // not typescript - else { - // Types - // define the possible locations - // do note that they must exist throughout boundation, which if it is a compiled dir, is sporadic - const typePaths = [ - // existing types directory - packageData.types, - // e.g. index.d.ts - pathUtil.join(answers.indexEntry + '.d.ts'), - // e.g. source/index.d.ts - sourceEdition && - pathUtil.join(sourceEdition.directory, answers.indexEntry + '.d.ts'), - ].filter((v) => v) - // fetch their existing status and convert back into the original location - const typePathsExisting = await Promise.all( - typePaths.map((v) => isAccessible(v).then((e) => e && v)), - ) - // find the first location that exists - const typePath = typePathsExisting.find((v) => v) - // and if exists, apply to types - if (typePath) { - packageData.types = typePath - } else { - delete packageData.types - } - } // documentation if (answers.docs) { @@ -609,8 +563,6 @@ export async function updateRuntime(state) { // typescript if (answers.languages.includes('typescript')) { tools.push('typedoc') - // https://github.com/TypeStrong/typedoc/releases - versions.typescript = '~5.2' } // coffeescript if (answers.languages.includes('coffescript')) { @@ -900,26 +852,30 @@ export async function updateRuntime(state) { // resolveJsonModule seems to cause too many issues, so is disabled unless needed const lib = new Set() const exclude = new Set() + let skipLibCheck = false let customCompilerOutDir = '' if (await isAccessible(answers.tsconfig)) { try { // parse const data = (await parse(answers.tsconfig)) || {} - // ensure necessary properties exist so we don't crash + // prepare necessary properties exist so we don't crash if (data.compilerOptions == null) data.compilerOptions = {} if (data.compilerOptions.lib == null) data.compilerOptions.lib = [] if (data.exclude == null) data.exclude = [] - // add any lib that has a dot back to lib + // store any lib that has a dot back to lib data.compilerOptions.lib .filter((i) => i.includes('.')) .forEach((i) => lib.add(i)) - // add back excludes + // store excludes data.exclude.forEach((i) => exclude.add(i)) - // is there a custom out dir? + // store skipLibCheck + skipLibCheck = data.compilerOptions.skipLibCheck + + // store custom out dir customCompilerOutDir = data.compilerOptions.outDir } catch (e) { console.error(`Failed to parse ${answers.tsconfig}:`, e) @@ -971,6 +927,7 @@ export async function updateRuntime(state) { moduleResolution: 'Node', strict: true, target: typescriptTarget, + skipLibCheck, }, answers.sourceModule ? { module: 'ESNext' } : {}, ), @@ -978,6 +935,8 @@ export async function updateRuntime(state) { } // re-adjust custom properties + if (answers.targets.includes('ES5')) + tsconfig.compilerOptions.downlevelIteration = true if (lib.size) tsconfig.compilerOptions.lib = Array.from(lib) if (exclude.size) tsconfig.exclude = Array.from(exclude) if (customCompilerOutDir) @@ -1040,7 +999,7 @@ export async function updateRuntime(state) { // upgrade deps status('upgrading the installed dependencies...') // npx -p npm-check-updates takes 14 seconds each time, so install globally instead - await upgradePackageDependencies() + await upgradePackageDependencies(Object.keys(versions)) // yarn still needs ncu to update package.json if (answers.packageManager === 'yarn') { await spawn(commands.yarn.install) // necessary to proceed diff --git a/source/state.js b/source/state.js index dea91e6..47f42c1 100644 --- a/source/state.js +++ b/source/state.js @@ -4,24 +4,49 @@ import { has } from '@bevry/list' // export export const state = { githubWorkflow: 'bevry', // will change if custom was detected - typesDirectoryPath: null, // types directory with trailing slash and ./ prefix answers: null, nodeVersionsOptional: [], packageData: {}, vercelConfig: {}, editions: [], + get useEditionAutoloader() { + return this.nodeEditionsRequire.length >= 2 + }, + // active is not loadable, active is only kept get activeEditions() { return this.editions.filter((edition) => edition.active !== false) }, + // get activeEdition() { + // return this.activeEditions[0] + // }, + get typesEditions() { + return this.activeEditions.filter((edition) => has(edition.tags, 'types')) + }, + get typesEdition() { + const typesEditions = this.typesEditions + if (typesEditions.length > 1) { + console.error(typesEditions) + throw new Error( + 'there is more than one edition catered towards types, not sure what to do here...', + ) + } + return typesEditions[0] + }, get babelEditions() { return this.activeEditions.filter((edition) => edition.babel) }, + // get babelEdition() { + // return this.babelEditions[0] + // }, get compiledEditions() { return this.activeEditions.filter( (edition) => edition.engines && (edition.engines.node || edition.engines.browsers), ) }, + // get compiledEdition() { + // return this.compiledEditions[this.compiledEditions.length - 1] + // }, get nodeEditions() { return this.activeEditions.filter( (edition) => edition.engines && edition.engines.node, @@ -47,9 +72,6 @@ export const state = { (edition) => edition.engines && edition.engines.browsers, ) }, - get useEditionAutoloader() { - return this.nodeEditionsRequire.length >= 2 - }, get browserEdition() { const browserEditions = this.browserEditions if (browserEditions.length > 1) { @@ -60,9 +82,6 @@ export const state = { } return browserEditions[0] }, - get compiledEdition() { - return this.compiledEditions[this.compiledEditions.length - 1] - }, get sourceEdition() { const sourceEdition = this.editions[0] if (sourceEdition && sourceEdition.active === false) { diff --git a/source/util.js b/source/util.js index 5997b53..6e8f8aa 100644 --- a/source/util.js +++ b/source/util.js @@ -198,7 +198,7 @@ export function addExtension(file, extension) { } /** Trim the string */ -export function trim(input) { +export function trim(input = '') { return input.trim() } diff --git a/source/versions.js b/source/versions.js index a544299..bc90aef 100644 --- a/source/versions.js +++ b/source/versions.js @@ -2,7 +2,7 @@ import { join } from 'node:path' // external -import testen, { Versions } from '@bevry/testen' +import { Versions } from '@bevry/testen' import { complement, intersect } from '@bevry/list' import { filterNodeVersions } from '@bevry/nodejs-versions' import versionCompare from 'version-compare' @@ -38,7 +38,7 @@ export async function updateEngines(state) { const versions = new Versions(answers.nodeVersionsTested) await versions.load() await versions.install() // @todo if this fails (so no internet), it continues, this should not be the case - const numbers = versions.map((version) => version.version) + const numbers = versions.array.map((version) => version.version) await versions.test(`${answers.packageManager} test`, serial) const passed = versions.json.passed || [] if (passed.length === 0) { @@ -118,7 +118,7 @@ export async function updateEngines(state) { // install and test the versions await versions.load() await versions.install() - const numbers = versions.map((version) => version.version) + const numbers = versions.array.map((version) => version.version) await versions.test(test, serial) const passed = versions.json.passed || [] const failed = versions.json.failed || []