You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`createPackageFromNpm` now takes an options parameter that can control DefinitelyTyped inclusion.
8
+
- The `Package` type is now a class, with new properties and methods:
9
+
-`typesPackage` contains the package name and version for the included DefinitelyTyped package, if any.
10
+
-`mergedWithTypes(typesPackage: Package)` returns a new `Package` instance with all files from both packages and the `typesPackage` instance property metadata filled in.
11
+
-`createPackageFromTarballData` is no longer asynchronous.
-`@types` packages will be fetched by default for implementation packages that do not contain any TypeScript files.
8
+
-`--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.
9
+
-`--no-definitely-typed` can be used to prevent `@types` package inclusion.
Copy file name to clipboardExpand all lines: packages/cli/README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ attw --pack .
75
75
76
76
#### From NPM
77
77
78
-
Specify the name (and, optionally, version range) of a package from the NPM registry instead of a local tarball filename.
78
+
Specify the name (and, optionally, version or SemVer range) of a package from the NPM registry instead of a local tarball filename.
79
79
80
80
In the CLI: `--from-npm`, `-p`
81
81
@@ -85,6 +85,17 @@ attw --from-npm <package-name>
85
85
86
86
In the config file, `fromNpm` can be a boolean value.
87
87
88
+
#### DefinitelyTyped
89
+
90
+
When a package does not contain types, specifies the version or SemVer range of the DefinitelyTyped `@types` package to use. Defaults to inferring the best version match from the implementation package version.
91
+
92
+
In the CLI: `--definitely-typed`, `--no-definitely-typed`
👺 Import resolved to an ESM type declaration file, but a CommonJS JavaScript file. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseESM.md
8
10
9
11
⚠️ 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
⚠️ 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
8
10
9
11
💀 Import failed to resolve to type declarations or JavaScript files. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/NoResolution.md
🎭 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
8
10
9
11
🥴 Import found in a type declaration file failed to resolve. Either this indicates that runtime resolution errors will occur, or (more likely) the types misrepresent the contents of the JavaScript files. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/InternalResolutionError.md
🎭 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
0 commit comments