Skip to content

Commit 061844b

Browse files
committed
feat: dual-package
closes #25
1 parent a93a9c3 commit 061844b

8 files changed

Lines changed: 671 additions & 456 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313
- uses: pnpm/action-setup@v4
14-
with:
15-
version: 9
1614
- uses: actions/setup-node@v4
1715
with:
1816
node-version: 22
@@ -33,8 +31,6 @@ jobs:
3331
steps:
3432
- uses: actions/checkout@v4
3533
- uses: pnpm/action-setup@v4
36-
with:
37-
version: 9
3834
- uses: actions/setup-node@v4
3935
with:
4036
node-version: ${{ matrix.node }}

package.json

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
{
22
"name": "smol-toml",
3-
"version": "1.2.2",
3+
"license": "BSD-3-Clause",
4+
"version": "1.3.0",
5+
"description": "A small, fast, and correct TOML parser/serializer",
6+
"author": "Cynthia <cyyynthia@borkenware.com>",
7+
"repository": "github:squirrelchat/smol-toml",
8+
"bugs": "https://github.com/squirrelchat/smol-toml/issues",
9+
"funding": "https://github.com/sponsors/cyyynthia",
410
"keywords": [
511
"toml",
612
"parser",
713
"serializer"
814
],
9-
"description": "A small, fast, and correct TOML parser/serializer",
10-
"repository": {
11-
"type": "git",
12-
"url": "git+ssh://git@github.com/squirrelchat/smol-toml.git"
13-
},
14-
"author": "Cynthia <cyyynthia@borkenware.com>",
15-
"license": "BSD-3-Clause",
15+
"type": "module",
16+
"packageManager": "pnpm@9.4.0",
1617
"engines": {
1718
"node": ">= 18"
1819
},
1920
"scripts": {
20-
"build": "tsc",
2121
"test": "vitest",
2222
"test-ui": "vitest --ui",
23-
"bench": "vitest bench"
23+
"bench": "vitest bench",
24+
"build": "pnpm run build:mjs && pnpm run build:cjs && node test/package/package-test.mjs",
25+
"build:mjs": "tsc",
26+
"build:cjs": "esbuild dist/index.js --bundle --platform=node --target=node18 --format=cjs --outfile=dist/index.cjs"
2427
},
2528
"devDependencies": {
2629
"@iarna/toml": "3.0.0",
2730
"@ltd/j-toml": "^1.38.0",
2831
"@tsconfig/node-lts": "^20.1.3",
2932
"@tsconfig/strictest": "^2.0.5",
30-
"@types/node": "^20.12.11",
31-
"@vitest/ui": "^1.6.0",
33+
"@types/node": "^20.14.10",
34+
"@vitest/ui": "^2.0.3",
35+
"esbuild": "^0.23.0",
3236
"fast-toml": "^0.5.4",
33-
"typescript": "^5.4.5",
34-
"vitest": "^1.6.0"
37+
"typescript": "^5.5.3",
38+
"vitest": "^2.0.3"
3539
},
36-
"main": "./dist/index.js",
40+
"main": "./dist/index.cjs",
41+
"module": "./dist/index.js",
3742
"types": "./dist/index.d.ts",
43+
"exports": {
44+
"types": "./dist/index.d.ts",
45+
"import": "./dist/index.js",
46+
"require": "./dist/index.cjs"
47+
},
3848
"files": [
3949
"README.md",
4050
"LICENSE",

0 commit comments

Comments
 (0)