diff --git a/.eslintrc.js b/.eslintrc.js index 31bacb0..5bfe1e4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,8 +1,8 @@ module.exports = { root: true, parserOptions: { - ecmaVersion: 2019, - project: ['./tsconfig.json', './tsconfig.eslint.json'], + ecmaVersion: 2022, + project: ['./tsconfig.json'], }, env: { browser: false, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a256c85..9514847 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,12 +34,8 @@ jobs: strategy: fail-fast: false matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x, 20.x] os: [ubuntu-latest] - include: - - node-version: 14.x - os: ubuntu-latest - npm-version: '7' runs-on: ${{ matrix.os }} diff --git a/package.json b/package.json index aeb55db..100694a 100644 --- a/package.json +++ b/package.json @@ -29,16 +29,17 @@ }, "license": "MIT", "author": "Patrick Seal", + "type": "commonjs", "main": "lib/index.js", "files": [ "lib" ], "scripts": { "prebuild": "npm run clean", - "build": "tsc && tsc --project tsconfig.examples.json", + "build": "tsc && tsc --project tsconfig.source.json", "clean": "rimraf lib/ build/", "coverage-report-lcov": "nyc report --reporter=lcov", - "lint": "eslint --ignore-path .gitignore . --ext .js,.ts --format=pretty && tsc --noEmit && tsc --noEmit --project tsconfig.examples.json", + "lint": "eslint --ignore-path .gitignore . --ext .js,.ts --format=pretty && tsc --noEmit", "prepare": "npm run build", "release": "commit-and-tag-version --sign", "spellcheck": "cspell '{examples,src,test}/**/*' *.md", @@ -86,7 +87,7 @@ "typescript": "^4.9.4" }, "engines": { - "node": ">=14" + "node": ">=16" }, "commit-and-tag-version": { "scripts": { diff --git a/tsconfig.base.json b/tsconfig.base.json index ec75903..f02cc44 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,14 +2,15 @@ "compilerOptions": { "module": "commonjs", "moduleResolution": "node", - "target": "es2019", - "lib": ["es2019"], + "target": "es2022", + "lib": ["es2022"], "allowJs": true, // temporary relaxing "alwaysStrict": true, "declaration": true, "declarationMap": true, "esModuleInterop": true, "noImplicitAny": true, + "noImplicitOverride": true, "noImplicitReturns": true, "noImplicitThis": true, "noUncheckedIndexedAccess": true, diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 8081f5c..0000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "include": [ - "test/**/*.ts", - "test/**/*.js", - "examples/**/*.ts", - "examples/**/*.js", - ".eslintrc.js" - ] -} diff --git a/tsconfig.examples.json b/tsconfig.examples.json deleted file mode 100644 index 5e546ad..0000000 --- a/tsconfig.examples.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.base.json", - "compilerOptions": { - "outDir": "./build/examples" - }, - "include": ["examples/**/*.ts", "examples/**/*.js"] -} diff --git a/tsconfig.json b/tsconfig.json index d7198b5..d86491a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "outDir": "./lib" + "outDir": "./build" }, - "include": ["src/**/*"] + "include": ["src/**/*", "test/**/*", "examples/**/*", ".eslintrc.js"] } diff --git a/tsconfig.source.json b/tsconfig.source.json new file mode 100644 index 0000000..d7198b5 --- /dev/null +++ b/tsconfig.source.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "outDir": "./lib" + }, + "include": ["src/**/*"] +}