diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index bc95ab1..6b2f6da 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [18.x, 20.x] steps: - uses: actions/checkout@v2 @@ -25,5 +25,4 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: npm run build --if-present - run: npm test diff --git a/package.json b/package.json index 3d711c0..925cacc 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "prebuild": "npm run clean", "build": "tsc && tsc -p tsconfig.cjs.json && ts-node scripts/generate_cjs_pkgjson.ts", "prettier": "prettier --no-semi --tab-width 2 --write \"**/*.ts\"", - "test": "node --test --require ts-node/register \"test/index.ts\"" + "test": "node --test --loader ts-node/esm \"test/index.ts\"" }, "repository": { "type": "git", diff --git a/test/index.ts b/test/index.ts index f873277..1f6a25c 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,6 +1,6 @@ import test from "node:test" import { strict as assert } from "assert" -import { ke2dairanization } from "../src" +import { ke2dairanization } from "../src/index.ts" test("test words", async (t) => { await t.test("松平 健", async () => { diff --git a/tsconfig.json b/tsconfig.json index 9ac09a5..a642555 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -35,7 +35,7 @@ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */