diff --git a/packages/backend/.swcrc b/packages/backend/.swcrc index 39e112ff7..272d9f698 100644 --- a/packages/backend/.swcrc +++ b/packages/backend/.swcrc @@ -1,15 +1,15 @@ { - "$schema": "https://json.schemastore.org/swcrc", - "jsc": { - "parser": { - "syntax": "typescript", - "dynamicImport": true, - "decorators": true - }, - "transform": { - "legacyDecorator": true, - "decoratorMetadata": true - }, + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "dynamicImport": true, + "decorators": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, "experimental": { "keepImportAssertions": true }, @@ -20,6 +20,6 @@ ] }, "target": "es2022" - }, - "minify": false + }, + "minify": false } diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json index 432074f25..385330d77 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend/native-utils/package.json @@ -36,7 +36,7 @@ "artifacts": "napi artifacts", "build": "pnpm run build:napi && pnpm run build:migration", "build:napi": "napi build --features napi --platform --release ./built/", - "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp -v ./target/release/migration ./built/migration", + "build:migration": "cargo build --locked --release --manifest-path ./migration/Cargo.toml && cp ./target/release/migration ./built/migration", "build:debug": "napi build --platform ./built/ && cargo build --manifest-path ./migration/Cargo.toml", "prepublishOnly": "napi prepublish -t npm", "test": "pnpm run cargo:test && pnpm run build:napi && ava", diff --git a/packages/calckey-js/.swcrc b/packages/calckey-js/.swcrc new file mode 100644 index 000000000..508e597b5 --- /dev/null +++ b/packages/calckey-js/.swcrc @@ -0,0 +1,20 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "dynamicImport": true, + "decorators": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "target": "es2022" + }, + "minify": false, + "module": { + "type": "commonjs", + "strict": true + } +} diff --git a/packages/calckey-js/package.json b/packages/calckey-js/package.json index 78d28ff08..fdb253f45 100644 --- a/packages/calckey-js/package.json +++ b/packages/calckey-js/package.json @@ -5,9 +5,9 @@ "main": "./built/index.js", "types": "./built/index.d.ts", "scripts": { - "build": "pnpm swc src -d built -D && pnpm tsd", + "build": "pnpm swc src -d built -D", "render": "pnpm run build && pnpm run api && pnpm run api-prod && cp temp/calckey-js.api.json etc/ && pnpm run api-doc", - "tsd": "tsd", + "tsd": "tsc && tsd", "api": "pnpm api-extractor run --local --verbose", "api-prod": "pnpm api-extractor run --verbose", "api-doc": "pnpm api-documenter markdown -i ./etc/", diff --git a/scripts/clean-all.js b/scripts/clean-all.js index 8c1032e33..c5fc65849 100644 --- a/scripts/clean-all.js +++ b/scripts/clean-all.js @@ -38,6 +38,14 @@ const { join } = require("node:path"); recursive: true, force: true, }); + fs.rmSync(join(__dirname, "/../packages/calckey-js/built"), { + recursive: true, + force: true, + }); + fs.rmSync(join(__dirname, "/../packages/calckey-js/node_modules"), { + recursive: true, + force: true, + }); fs.rmSync(join(__dirname, "/../built"), { recursive: true, force: true }); fs.rmSync(join(__dirname, "/../node_modules"), { diff --git a/scripts/clean.js b/scripts/clean.js index 76a7873b5..39cbc77b9 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -1,4 +1,5 @@ const fs = require("node:fs"); +const execa = require("execa"); const { join } = require("node:path"); (async () => { @@ -18,5 +19,9 @@ const { join } = require("node:path"); recursive: true, force: true, }); + fs.rmSync(join(__dirname, "/../packages/calckey-js/built"), { + recursive: true, + force: true, + }); fs.rmSync(join(__dirname, "/../built"), { recursive: true, force: true }); })();