Skip to content
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

dts 生成を tsup に移行 & publint で package.json をチェックする #617

Open
wants to merge 11 commits into
base: chore/upgrade-react18-1
Choose a base branch
from
Open
Next Next commit
chore: dts generate
  • Loading branch information
naporin0624 committed Aug 8, 2024
commit 0437bd23c32185fd2df3f7158022fd50c059dde8
2 changes: 1 addition & 1 deletion packages/esbuild-plugin-styled-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"devDependencies": {
"@babel/parser": "^7.23.9",
"esbuild": "^0.15.1",
"esbuild": "^0.23.0",
"typescript": "^4.9.5"
},
"repository": {
Expand Down
26 changes: 14 additions & 12 deletions packages/foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@
"name": "@charcoal-ui/foundation",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"types": "./dist/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
},
"devDependencies": {
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"tsup": "^6.5.0",
"tsup": "^8.2.4",
"typescript": "^4.9.5",
"vitest": "^2.0.1"
},
Expand Down
8 changes: 3 additions & 5 deletions packages/foundation/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
tsconfig: "./tsconfig.build.json",
sourcemap: true,
dts: true,
clean: true
})
26 changes: 14 additions & 12 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
"name": "@charcoal-ui/icons",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"types": "./dist/index.d.ts",
"sideEffects": true,
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
},
"devDependencies": {
"@storybook/react": "^8.0.5",
"@types/dompurify": "^2.3.3",
"@types/react": "^18.3.3",
"@types/warning": "^3.0.0",
Expand All @@ -31,7 +33,7 @@
"react": "^18.3.1",
"rimraf": "^3.0.2",
"styled-components": "^6.1.12",
"tsup": "^6.5.0",
"tsup": "^8.2.4",
"typescript": "^4.9.5",
"vitest": "^2.0.1"
},
Expand Down
8 changes: 3 additions & 5 deletions packages/icons/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
tsconfig: "./tsconfig.build.json",
clean: true,
dts: true,
sourcemap: true,
})
26 changes: 14 additions & 12 deletions packages/react-sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
"name": "@charcoal-ui/react-sandbox",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"types": "./dist/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
Expand All @@ -32,13 +35,12 @@
"@types/warning": "^3.0.0",
"@vitejs/plugin-react": "^4.3.1",
"jsdom": "^24.1.0",
"npm-run-all": "^4.1.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.2.1",
"rimraf": "^3.0.2",
"styled-components": "^6.1.12",
"tsup": "^6.5.0",
"tsup": "^8.2.4",
"typescript": "^4.9.5",
"use-resize-observer": "^9.1.0",
"vitest": "^2.0.2"
Expand Down
8 changes: 3 additions & 5 deletions packages/react-sandbox/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ import { styledComponentsPlugin } from '@charcoal-ui/esbuild-plugin-styled-compo
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
sourcemap: true,
esbuildPlugins: [styledComponentsPlugin],
clean: true,
tsconfig: "./tsconfig.build.json",
dts: true,
})
29 changes: 14 additions & 15 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@
"name": "@charcoal-ui/react",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"./dist/index.css": {
"import": "./dist/index.css",
"require": "./dist/index.css"
}
},
"types": "./dist/index.d.ts",
"sideEffects": [
"*.css"
],
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
},
"devDependencies": {
"@charcoal-ui/esbuild-plugin-styled-components": "^4.0.0-beta.13",
"@react-types/switch": "^3.1.2",
"@storybook/addon-actions": "^8.0.5",
"@storybook/react": "^8.0.5",
"@testing-library/jest-dom": "^5.16.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^13.5.0",
Expand All @@ -45,12 +45,11 @@
"@vitejs/plugin-react": "^4.3.1",
"autoprefixer": "^10.4.19",
"jsdom": "^24.1.0",
"npm-run-all": "^4.1.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.2.1",
"rimraf": "^3.0.2",
"tsup": "^6.5.0",
"tsup": "^8.2.4",
"typescript": "^4.9.5",
"vitest": "^2.0.1"
},
Expand Down
10 changes: 3 additions & 7 deletions packages/react/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { defineConfig } from 'tsup'
import { styledComponentsPlugin } from '@charcoal-ui/esbuild-plugin-styled-components'

export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
tsconfig: "./tsconfig.build.json",
sourcemap: true,
esbuildPlugins: [styledComponentsPlugin],
clean: true,
dts: true,
})
24 changes: 13 additions & 11 deletions packages/styled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
"name": "@charcoal-ui/styled",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"sideEffects": false,
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
Expand All @@ -27,12 +30,11 @@
"@vitejs/plugin-react": "^4.3.1",
"jest-styled-components": "^7.1.1",
"jsdom": "^24.1.0",
"npm-run-all": "^4.1.5",
"react": "^18.3.1",
"react-test-renderer": "^18.3.1",
"rimraf": "^3.0.2",
"styled-components": "^6.1.12",
"tsup": "^6.5.0",
"tsup": "^8.2.4",
"typescript": "^4.9.5",
"vitest": "^2.0.2"
},
Expand Down
8 changes: 3 additions & 5 deletions packages/styled/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
sourcemap: true,
tsconfig: "./tsconfig.build.json",
clean: true,
dts: true,
})
23 changes: 13 additions & 10 deletions packages/tailwind-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
"name": "@charcoal-ui/tailwind-config",
"version": "4.0.0-beta.13",
"license": "Apache-2.0",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"type": "commonjs",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs.js",
"import": "./dist/index.esm.js",
"default": "./dist/index.esm.js"
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"types": "./dist/index.d.ts",
"sideEffects": false,
"scripts": {
"build": "run-p --print-label 'build:*'",
"build:bundle": "FORCE_COLOR=1 tsup",
"build:dts": "tsc --project tsconfig.build.json --pretty --emitDeclarationOnly",
"build": "FORCE_COLOR=1 tsup",
"typecheck": "tsc --project tsconfig.build.json --pretty --noEmit",
"clean": "rimraf dist .tsbuildinfo",
"test": "vitest run --passWithNoTests"
Expand Down
8 changes: 3 additions & 5 deletions packages/tailwind-config/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
format: ['esm', 'cjs'],
outExtension({ format }) {
return {
js: `.${format}.js`,
}
},
target: 'esnext',
tsconfig: "./tsconfig.build.json",
sourcemap: true,
dts: true,
clean: true,
})
Loading
Loading