commit 4952cac0fd7e5d1c3d8683277e6b153045ec8f88
parent 588a31aefaa6f5aa9e2e1390dd0d581fdbc6e5d3
Author: triesap <tyson@radroots.org>
Date: Fri, 1 Aug 2025 19:06:09 +0000
chore: update working tree snapshot
Diffstat:
6 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/bindings/ts/package.json b/bindings/ts/package.json
@@ -3,18 +3,32 @@
"version": "1.0.0",
"private": true,
"license": "AGPLv3",
- "type": "module",
- "module": "index.ts",
- "main": "index.ts",
- "types": "index.ts",
+ "main": "dist/cjs/index.js",
+ "module": "dist/esm/index.js",
+ "types": "dist/cjs/index.d.ts",
+ "exports": {
+ "require": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/cjs/index.js"
+ },
+ "import": {
+ "types": "./dist/cjs/index.d.ts",
+ "default": "./dist/esm/index.js"
+ }
+ },
+ "files": [
+ "dist"
+ ],
"sideEffects": false,
"scripts": {
- "gen:index": "echo \"// Generated @radroots/radroots-common-bindings\" > index.ts && for f in *.ts; do fn=$(basename \"$f\" .ts); [ \"$fn\" != \"index\" ] && echo \"export * from './$fn';\" >> index.ts; done",
- "gen:schema": "ts-to-zod types.ts schema.ts",
+ "gen:index": "echo \"// Generated @radroots/radroots-common-bindings\" > src/index.ts && for f in src/*.ts; do fn=$(basename \"$f\" .ts); [ \"$fn\" != \"index\" ] && echo \"export * from './$fn';\" >> src/index.ts; done",
+ "gen:schema": "ts-to-zod src/types.ts src/schema.ts",
"gen": "npm run gen:schema && npm run gen:index",
"prebuild": "npm run clean",
"clean": "rimraf dist && rimraf tsconfig.tsbuildinfo",
- "build": "tsc"
+ "build:cjs": "tsc -p tsconfig.json",
+ "build:esm": "tsc -p tsconfig.esm.json",
+ "build": "npm run build:cjs && npm run build:esm"
},
"devDependencies": {
"rimraf": "^6.0.1",
diff --git a/bindings/ts/src/index.ts b/bindings/ts/src/index.ts
@@ -0,0 +1,3 @@
+// Generated @radroots/radroots-common-bindings
+export * from './schema';
+export * from './types';
diff --git a/bindings/ts/schema.ts b/bindings/ts/src/schema.ts
diff --git a/bindings/ts/types.ts b/bindings/ts/src/types.ts
diff --git a/bindings/ts/tsconfig.esm.json b/bindings/ts/tsconfig.esm.json
@@ -0,0 +1,9 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "nodenext",
+ "outDir": "dist/esm",
+ "declaration": false,
+ "declarationMap": false
+ }
+}
diff --git a/bindings/ts/tsconfig.json b/bindings/ts/tsconfig.json
@@ -1,25 +1,17 @@
{
- "compilerOptions": {
- "strict": true,
- "target": "es2021",
- "lib": [
- "es2021",
- "dom"
- ],
- "module": "CommonJS",
- "outDir": "./dist",
- "rootDir": ".",
- "declaration": true,
- "emitDeclarationOnly": true,
- "esModuleInterop": true,
- "skipLibCheck": true
- },
- "include": [
- "index.ts",
- "schema.ts",
- "types.ts"
- ],
- "exclude": [
- "node_modules"
- ],
-}
-\ No newline at end of file
+ "compilerOptions": {
+ "target": "ES2020",
+ "module": "nodenext",
+ "moduleResolution": "nodenext",
+ "rootDir": "src",
+ "outDir": "dist/cjs",
+ "declaration": true,
+ "declarationMap": true,
+ "sourceMap": true,
+ "strict": true,
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "skipLibCheck": true
+ },
+ "include": ["src"]
+}