Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/good-glasses-wait.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/loud-hairs-relate.md

This file was deleted.

15 changes: 15 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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/[email protected]

## 0.7.1

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# [email protected] --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]

```
$ attw [email protected] --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]


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
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# [email protected] --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]

```
$ attw [email protected] --definitely-typed /home/runner/work/arethetypeswrong.github.io/arethetypeswrong.github.io/packages/core/test/fixtures/@[email protected]


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
12 changes: 12 additions & 0 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down