Skip to content

Commit

Permalink
build: upgrade tsup to generate separate type declarations for cjs/esm (
Browse files Browse the repository at this point in the history
  • Loading branch information
promer94 authored Jun 27, 2023
1 parent 7154e1b commit 2e8dcb4
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 245 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm attw
- name: Maybe Release
if: matrix.os == 'ubuntu-latest' && matrix.node == 18 && github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
Expand Down
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./wasm": {
"types": "./dist/index.d.ts",
"import": "./dist/index.wasm.js",
"require": "./dist/index.wasm.cjs"
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.wasm.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.wasm.cjs"
}
}
},
"scripts": {
Expand All @@ -40,6 +44,7 @@
"build": "NODE_ENV=production pnpm run build:default && pnpm run build:wasm",
"build:default": "tsup",
"build:wasm": "WASM=1 tsup",
"attw": "attw --pack",
"test": "NODE_ENV=test vitest run",
"test:ui": "NODE_ENV=test vitest --ui --coverage.enabled",
"test-type": "tsc -p tsconfig.json --noEmit && tsc -p playground/tsconfig.json --noEmit",
Expand Down Expand Up @@ -73,6 +78,7 @@
},
"homepage": "https://github.com/vercel/satori#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.4.2",
"@resvg/resvg-js": "^2.1.0",
"@types/node": "^16",
"@types/opentype.js": "^1.3.3",
Expand All @@ -91,7 +97,7 @@
"lint-staged": "13.1.0",
"prettier": "^2.7.1",
"react": "^17.0.2",
"tsup": "^5.12.9",
"tsup": "^7.1.0",
"turbo": "^1.6.3",
"twrnc": "^3.4.0",
"typescript": "^5",
Expand Down
2 changes: 1 addition & 1 deletion playground/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ function LiveEditor({ id }: { id: string }) {
enabled: false,
},
smoothScrolling: true,
cursorSmoothCaretAnimation: true,
cursorSmoothCaretAnimation: 'on',
contextmenu: false,
automaticLayout: true,
}}
Expand Down
Loading

1 comment on commit 2e8dcb4

@vercel
Copy link

@vercel vercel bot commented on 2e8dcb4 Jun 27, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.