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
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.js"
Comment on lines 10 to +11
Copy link
Contributor Author

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"
      }
    }
  }
}
         

},
"./package.json": "./package.json"
},
Expand All @@ -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"
Copy link
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 npm pack but deletes the file after checking it.

},
"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"
Expand Down
Loading