Skip to content

Commit

Permalink
fix ci error with core type missing
Browse files Browse the repository at this point in the history
  • Loading branch information
AkifumiSato committed Aug 27, 2023
1 parent ba04279 commit 2d32b66
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
version: 8
run_install: false
- name: Install packages
run: pnpm install
run: pnpm i --ignore-scripts
- name: Check project
run: pnpm check
16 changes: 10 additions & 6 deletions packages/location-state-core/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
{
"name": "@location-state/core",
"version": "0.0.0-alpha",
"files": [
"dist",
"src",
"package.json"
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs",
"types": "./src/index.ts"
},
"./unsafe-navigation": {
"require": "./dist/unsafe-navigation.js",
"import": "./dist/unsafe-navigation.js",
"types": "./dist/unsafe-navigation.d.ts"
"import": "./dist/unsafe-navigation.mjs",
"types": "./src/unsafe-navigation.ts"
}
},
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts src/unsafe-navigation.ts --dts",
"build": "tsup src/index.ts src/unsafe-navigation.ts",
"typecheck": "tsc --noEmit",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx"
Expand Down
10 changes: 10 additions & 0 deletions packages/location-state-core/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "tsup";

export default defineConfig({
target: "es2020",
format: ["cjs", "esm"],
clean: true,
// CI上ではdts生成より先にbuildが進んでしまうため、以下のissue解消後有効化
// https://github.com/egoist/tsup/issues/921
dts: false,
});
12 changes: 8 additions & 4 deletions packages/location-state-next/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"name": "@location-state/next",
"version": "0.0.0-alpha",
"files": [
"dist",
"src",
"package.json"
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"import": "./dist/index.mjs",
"types": "./src/index.ts"
}
},
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup src/index.ts --dts",
"build": "tsup src/index.ts",
"typecheck": "tsc --noEmit",
"lint": "eslint . --ext .ts,.tsx"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/location-state-next/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "tsup";

export default defineConfig({
target: "es2020",
format: ["cjs", "esm"],
clean: true,
// CI上ではdts生成より先にbuildが進んでしまうため、以下のissue解消後有効化
// https://github.com/egoist/tsup/issues/921
dts: false,
});
9 changes: 9 additions & 0 deletions packages/test-utils/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "tsup";

export default defineConfig({
target: "es2020",
clean: true,
// CI上ではdts生成より先にbuildが進んでしまうため、以下のissue解消後有効化
// https://github.com/egoist/tsup/issues/921
dts: false,
});

0 comments on commit 2d32b66

Please sign in to comment.