Skip to content

Commit

Permalink
Support cjs (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroki0525 authored Dec 7, 2023
1 parent 923fd9e commit 8382004
Show file tree
Hide file tree
Showing 12 changed files with 347 additions and 349 deletions.
8 changes: 8 additions & 0 deletions .changeset/rotten-hornets-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@dandori/core": patch
"@dandori/libs": patch
"@dandori/cli": patch
"@dandori/ui": patch
---

add support cjs
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18.2
18.19.0
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"type": "git",
"url": "https://github.com/hiroki0525/dandori.git"
},
"type": "module",
"scripts": {
"build": "turbo build",
"prepare": "husky install",
Expand All @@ -24,24 +23,24 @@
"author": "Hiroki Miyaji",
"license": "MIT",
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@types/node": "18.18.13",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0",
"eslint": "8.54.0",
"eslint-config-prettier": "9.0.0",
"@types/node": "^18.19.3",
"@typescript-eslint/eslint-plugin": "6.13.2",
"@typescript-eslint/parser": "6.13.2",
"eslint": "8.55.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-unused-imports": "3.0.0",
"eslint-plugin-vitest": "^0.3.10",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"lint-staged": "^15.2.0",
"prettier": "3.1.0",
"tsup": "^8.0.1",
"tsx": "^4.6.0",
"turbo": "^1.10.16",
"typescript": "5.3.2",
"tsx": "^4.6.2",
"turbo": "^1.11.0",
"typescript": "5.3.3",
"vitest": "^0.34.6"
},
"packageManager": "[email protected]",
Expand Down
15 changes: 14 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"module": "dist/index.js",
"exports": {
".": {
"types": {
"require": "./dist/index.d.cts",
"default": "./dist/index.d.ts"
},
"default": {
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
}
},
"scripts": {
"build": "tsup --config ../../tsup.config.ts",
"test": "vitest run",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/core/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import DandoriCoreCli from "./index";

const cli = new DandoriCoreCli();
await cli.run();
void cli.run();
2 changes: 1 addition & 1 deletion packages/cli/src/miro/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import DandoriMiroCli from "./index";

const cli = new DandoriMiroCli();
await cli.run();
void cli.run();
2 changes: 1 addition & 1 deletion packages/cli/src/notion/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import DandoriNotionCli from "./index";

const cli = new DandoriNotionCli();
await cli.run();
void cli.run();
15 changes: 14 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"module": "dist/index.js",
"exports": {
".": {
"types": {
"require": "./dist/index.d.cts",
"default": "./dist/index.d.ts"
},
"default": {
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
}
},
"scripts": {
"build": "tsup --config ../../tsup.config.ts",
"dev": "tsx ./src/index.ts",
Expand Down
15 changes: 14 additions & 1 deletion packages/libs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"module": "dist/index.js",
"exports": {
".": {
"types": {
"require": "./dist/index.d.cts",
"default": "./dist/index.d.ts"
},
"default": {
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
}
},
"scripts": {
"build": "tsup --config ../../tsup.config.ts",
"dev": "tsx ./src/index.ts",
Expand Down
17 changes: 15 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"module": "dist/index.js",
"exports": {
".": {
"types": {
"require": "./dist/index.d.cts",
"default": "./dist/index.d.ts"
},
"default": {
"require": "./dist/index.cjs",
"default": "./dist/index.js"
}
}
},
"scripts": {
"build": "tsup --config ../../tsup.config.ts",
"init": "tsx init.ts",
Expand All @@ -29,7 +42,7 @@
"license": "MIT",
"dependencies": {
"@mirohq/miro-api": "^2.1.0",
"@notionhq/client": "^2.2.13",
"@notionhq/client": "^2.2.14",
"flat-to-nested": "^1.1.1",
"tree-model": "^1.0.7"
},
Expand Down
Loading

0 comments on commit 8382004

Please sign in to comment.