From 895a3dab36e48b60e27127aef4887650d6faa164 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 26 Aug 2023 01:50:14 +0000 Subject: [PATCH] Version Packages --- .changeset/good-glasses-wait.md | 11 ------- .changeset/loud-hairs-relate.md | 9 ----- packages/cli/CHANGELOG.md | 15 +++++++++ packages/cli/package.json | 4 +-- ...oretestfixtures@types__big.js@6.2.0.tgz.md | 33 +++++++++++++++++++ ...retestfixtures@types__react@18.2.21.tgz.md | 32 ++++++++++++++++++ packages/core/CHANGELOG.md | 12 +++++++ packages/core/package.json | 2 +- 8 files changed, 95 insertions(+), 23 deletions(-) delete mode 100644 .changeset/good-glasses-wait.md delete mode 100644 .changeset/loud-hairs-relate.md create mode 100644 packages/cli/test/snapshots/big.js@6.2.1.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__big.js@6.2.0.tgz.md create mode 100644 packages/cli/test/snapshots/react@18.2.0.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__react@18.2.21.tgz.md diff --git a/.changeset/good-glasses-wait.md b/.changeset/good-glasses-wait.md deleted file mode 100644 index 2582e1c..0000000 --- a/.changeset/good-glasses-wait.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@arethetypeswrong/core": minor ---- - -Add support for DefinitelyTyped analysis. - -- `createPackageFromNpm` now takes an options parameter that can control DefinitelyTyped inclusion. -- The `Package` type is now a class, with new properties and methods: - - `typesPackage` contains the package name and version for the included DefinitelyTyped package, if any. - - `mergedWithTypes(typesPackage: Package)` returns a new `Package` instance with all files from both packages and the `typesPackage` instance property metadata filled in. -- `createPackageFromTarballData` is no longer asynchronous. diff --git a/.changeset/loud-hairs-relate.md b/.changeset/loud-hairs-relate.md deleted file mode 100644 index b3c04fc..0000000 --- a/.changeset/loud-hairs-relate.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@arethetypeswrong/cli": minor ---- - -Add support for DefinitelyTyped analysis. - -- `@types` packages will be fetched by default for implementation packages that do not contain any TypeScript files. -- `--definitely-typed` can be used to set the version of the `@types` package fetched. By default, the version is inferred from the implementation package version. -- `--no-definitely-typed` can be used to prevent `@types` package inclusion. diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 55fa9fa..8171433 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,20 @@ # @arethetypeswrong/cli +## 0.8.0 + +### Minor Changes + +- 894d0f3: Add support for DefinitelyTyped analysis. + + - `@types` packages will be fetched by default for implementation packages that do not contain any TypeScript files. + - `--definitely-typed` can be used to set the version of the `@types` package fetched. By default, the version is inferred from the implementation package version. + - `--no-definitely-typed` can be used to prevent `@types` package inclusion. + +### Patch Changes + +- Updated dependencies [894d0f3] + - @arethetypeswrong/core@0.8.0 + ## 0.7.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index f3627a0..275e0f1 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@arethetypeswrong/cli", - "version": "0.7.1", + "version": "0.8.0", "description": "A CLI tool for arethetypeswrong.github.io", "author": "Andrew Branch & ej-shafran", "contributors": [ @@ -45,7 +45,7 @@ "typescript": "^5.0.0-dev.20230207" }, "dependencies": { - "@arethetypeswrong/core": "0.7.0", + "@arethetypeswrong/core": "0.8.0", "chalk": "^4.1.2", "cli-table3": "^0.6.3", "commander": "^10.0.1", diff --git a/packages/cli/test/snapshots/big.js@6.2.1.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__big.js@6.2.0.tgz.md b/packages/cli/test/snapshots/big.js@6.2.1.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__big.js@6.2.0.tgz.md new file mode 100644 index 0000000..6b40946 --- /dev/null +++ b/packages/cli/test/snapshots/big.js@6.2.1.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__big.js@6.2.0.tgz.md @@ -0,0 +1,33 @@ +# big.js@6.2.1.tgz --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@types__big.js@6.2.0.tgz + +``` +$ attw big.js@6.2.1.tgz --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@types__big.js@6.2.0.tgz + + +big.js v6.2.1 +@types/big.js v6.2.0 + +🎭 Import resolved to a CommonJS type declaration file, but an ESM JavaScript file. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md + +❌ Import resolved to JavaScript files, but no type declarations were found. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/UntypedResolution.md + +⚠️ A require call resolved to an ESM JavaScript file, which is an error in Node and some bundlers. CommonJS consumers will need to use a dynamic import. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSResolvesToESM.md + + +┌───────────────────┬────────────────────────┬──────────────────────────────┬─────────────────┬───────────────────────┐ +│ │ "big.js" │ "big.js/big.mjs" │ "big.js/big.js" │ "big.js/package.json" │ +├───────────────────┼────────────────────────┼──────────────────────────────┼─────────────────┼───────────────────────┤ +│ node10 │ 🟢 │ ❌ No types │ ❌ No types │ 🟢 (JSON) │ +├───────────────────┼────────────────────────┼──────────────────────────────┼─────────────────┼───────────────────────┤ +│ node16 (from CJS) │ 🟢 (CJS) │ ❌ No types │ ❌ No types │ 🟢 (JSON) │ +│ │ │ ⚠️ ESM (dynamic import only) │ │ │ +├───────────────────┼────────────────────────┼──────────────────────────────┼─────────────────┼───────────────────────┤ +│ node16 (from ESM) │ 🎭 Masquerading as CJS │ ❌ No types │ ❌ No types │ 🟢 (JSON) │ +├───────────────────┼────────────────────────┼──────────────────────────────┼─────────────────┼───────────────────────┤ +│ bundler │ 🟢 │ ❌ No types │ ❌ No types │ 🟢 (JSON) │ +└───────────────────┴────────────────────────┴──────────────────────────────┴─────────────────┴───────────────────────┘ + + +``` + +Exit code: 1 \ No newline at end of file diff --git a/packages/cli/test/snapshots/react@18.2.0.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__react@18.2.21.tgz.md b/packages/cli/test/snapshots/react@18.2.0.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__react@18.2.21.tgz.md new file mode 100644 index 0000000..430ee26 --- /dev/null +++ b/packages/cli/test/snapshots/react@18.2.0.tgz --definitely-typed homerunnerworkarethetypeswrong.github.ioarethetypeswrong.github.iopackagescoretestfixtures@types__react@18.2.21.tgz.md @@ -0,0 +1,32 @@ +# react@18.2.0.tgz --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@types__react@18.2.21.tgz + +``` +$ attw react@18.2.0.tgz --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@types__react@18.2.21.tgz + + +react v18.2.0 +@types/react v18.2.21 + + No problems found 🌟 + + +┌─────────────────────────┬───────────┬───────────────────┬───────────────────┬───────────┐ +│ │ node10 │ node16 (from CJS) │ node16 (from ESM) │ bundler │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react/package.json" │ 🟢 (JSON) │ 🟢 (JSON) │ 🟢 (JSON) │ 🟢 (JSON) │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react/jsx-runtime" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react/jsx-dev-runtime" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react/canary" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ +├─────────────────────────┼───────────┼───────────────────┼───────────────────┼───────────┤ +│ "react/experimental" │ 🟢 │ 🟢 (CJS) │ 🟢 (CJS) │ 🟢 │ +└─────────────────────────┴───────────┴───────────────────┴───────────────────┴───────────┘ + + +``` + +Exit code: 0 \ No newline at end of file diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index f51763a..81bc20e 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,17 @@ # @arethetypeswrong/core +## 0.8.0 + +### Minor Changes + +- 894d0f3: Add support for DefinitelyTyped analysis. + + - `createPackageFromNpm` now takes an options parameter that can control DefinitelyTyped inclusion. + - The `Package` type is now a class, with new properties and methods: + - `typesPackage` contains the package name and version for the included DefinitelyTyped package, if any. + - `mergedWithTypes(typesPackage: Package)` returns a new `Package` instance with all files from both packages and the `typesPackage` instance property metadata filled in. + - `createPackageFromTarballData` is no longer asynchronous. + ## 0.7.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 44d4144..9203b5f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@arethetypeswrong/core", - "version": "0.7.0", + "version": "0.8.0", "description": "The API behind arethetypeswrong.github.io", "author": "Andrew Branch", "license": "MIT",