Skip to content

Commit

Permalink
fix: move type field to dist/esm/package.json (#205)
Browse files Browse the repository at this point in the history
* fix: move type field to dist/esm/package.json

* add changeset

* Update smart-students-talk.md

---------

Co-authored-by: 0xRaiden <67233402+Raiden1411@users.noreply.github.com>
  • Loading branch information
frangio and Raiden1411 committed Oct 29, 2023
1 parent 32cf12d commit 6b99d60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-students-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"abitype": patch
---

Fixes an error with TypeScript 5.2.2 in CommonJS projects..
2 changes: 1 addition & 1 deletion .scripts/formatPackageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for (const packagePath of packagePaths) {
`${JSON.stringify(packageJson, undefined, 2)}\n`,
)

const { devDependencies: _dD, scripts: _s, ...rest } = packageJson
const { devDependencies: _dD, scripts: _s, type: _t, ...rest } = packageJson
await Bun.write(packagePath, `${JSON.stringify(rest, undefined, 2)}\n`)
}

Expand Down
2 changes: 1 addition & 1 deletion packages/abitype/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm+types",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --moduleResolution node10 --outDir ./dist/cjs --removeComments --verbatimModuleSyntax false && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm+types": "tsc --project tsconfig.build.json --module es2020 --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types",
"build:esm+types": "tsc --project tsconfig.build.json --module es2020 --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types && echo > ./dist/esm/package.json '{\"type\":\"module\",\"sideEffects\":false}'",
"clean": "rm -rf dist tsconfig.tsbuildinfo abis zod",
"test:build": "publint --strict",
"typecheck": "tsc --noEmit"
Expand Down

1 comment on commit 6b99d60

@vercel
Copy link

@vercel vercel bot commented on 6b99d60 Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

abitype – ./

abitype-wagmi-dev.vercel.app
abitype.vercel.app
abitype.dev
abitype-git-main-wagmi-dev.vercel.app

Please sign in to comment.