-
Notifications
You must be signed in to change notification settings - Fork 10
Fix dual emit declaration files #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,7 @@ | |
| "exports": { | ||
| ".": { | ||
| "import": "./dist/index.mjs", | ||
| "require": "./dist/index.js", | ||
| "types": "./dist/index.d.ts" | ||
| "require": "./dist/index.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
|
|
@@ -18,15 +17,17 @@ | |
| "dev": "vitest", | ||
| "build": "tsup src/index.ts --format cjs,esm --dts", | ||
| "lint": "tsc", | ||
| "release": "turbo build lint test && changeset publish" | ||
| "attw": "attw --pack", | ||
| "release": "turbo build lint test attw && changeset publish" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You'll need to add attw to turbo.json to get this working I think. What outputs does attw --pack have?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just an exit code (and stdout whether it succeeds or fails, but only interesting in CI if you need to look at why it failed). It runs |
||
| }, | ||
| "keywords": [], | ||
| "author": "Matt Pocock", | ||
| "license": "MIT", | ||
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "^0.4.2", | ||
| "@changesets/cli": "^2.26.0", | ||
| "@types/node": "^18.14.5", | ||
| "tsup": "^6.6.3", | ||
| "tsup": "^7.1.0", | ||
| "turbo": "^1.8.3", | ||
| "typescript": "^4.9.5", | ||
| "vitest": "^0.29.2" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weβre letting extension substitution do the work here, but if you want to be explicit about specifying types, this has the same outcome:
{ "exports": { ".": { "import": { "types": "./dist/index.d.mts", "default": "./dist/index.mjs" }, "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" } } } }