From d51839a9f31e5c9a8af11114e349906c6a839e53 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Fri, 10 Nov 2023 22:09:41 +0100 Subject: [PATCH] fix script --- index.d.mts | 1 + package.json | 46 +++++++++++++++++++++++----------------------- tsconfig.json | 5 +++-- 3 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 index.d.mts diff --git a/index.d.mts b/index.d.mts new file mode 100644 index 0000000..fcb9204 --- /dev/null +++ b/index.d.mts @@ -0,0 +1 @@ +export * from './index.js' diff --git a/package.json b/package.json index b63da90..a232539 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,13 @@ "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "browser": "./dist/umd/i18nextResourcesForTS.js", - "types": "./index.d.ts", + "types": "./index.d.mts", "exports": { "./package.json": "./package.json", ".": { "types": { "require": "./dist/cjs/index.d.ts", - "import": "./dist/esm/index.d.ts" + "import": "./dist/esm/index.d.mts" }, "module": "./dist/esm/index.js", "import": "./dist/esm/index.js", @@ -36,7 +36,7 @@ "default": "./dist/cjs/index.js" }, "./esm": { - "types": "./dist/esm/index.d.ts", + "types": "./dist/esm/index.d.mts", "default": "./dist/esm/index.js" }, "./src": { @@ -48,9 +48,9 @@ }, "scripts": { "lint:javascript": "eslint .", - "lint:typescript": "eslint -c .ts.eslintrc *.d.ts test/types/**/*.test-d.ts", + "lint:typescript": "eslint -c .ts.eslintrc *.d.ts *.d.mts test/types/**/*.test-d.ts", "lint": "npm run lint:javascript && npm run lint:typescript", - "build": "rm -rf dist && rollup -c && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json && cp index.d.ts dist/cjs/index.d.ts && cp index.d.ts dist/esm/index.d.ts", + "build": "rm -rf dist && rollup -c && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json && cp index.d.ts dist/cjs/index.d.ts && cp index.d.ts dist/esm/index.d.ts && cp index.d.mts dist/esm/index.d.mts", "test:typescript": "tsd", "test": "npm run lint && mocha --colors --reporter spec --recursive test/*.js", "test:all": "npm run test && npm run test:typescript", @@ -59,33 +59,33 @@ }, "license": "MIT", "dependencies": { - "@babel/runtime": "^7.22.15" + "@babel/runtime": "^7.23.2" }, "devDependencies": { - "@babel/core": "^7.22.15", - "@babel/plugin-transform-runtime": "^7.22.15", - "@babel/preset-env": "^7.22.15", - "@rollup/plugin-babel": "^6.0.3", - "@rollup/plugin-commonjs": "^25.0.4", - "@rollup/plugin-node-resolve": "^15.2.1", - "@rollup/plugin-terser": "0.4.3", - "@types/mocha": "^10.0.1", - "@typescript-eslint/eslint-plugin": "^5.59.9", - "@typescript-eslint/parser": "^5.59.9", + "@babel/core": "^7.23.3", + "@babel/plugin-transform-runtime": "^7.23.3", + "@babel/preset-env": "^7.23.3", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "0.4.4", + "@types/mocha": "^10.0.4", + "@typescript-eslint/eslint-plugin": "^6.10.0", + "@typescript-eslint/parser": "^6.10.0", "babel-plugin-add-module-exports": "^1.0.4", - "eslint": "^8.48.0", + "eslint": "^8.53.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-n": "^16.0.2", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-n": "^16.3.1", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-require-path-exists": "^1.1.9", "eslint-plugin-standard": "^5.0.0", - "i18next": "^23.4.6", - "i18next-chained-backend": "^4.4.0", + "i18next": "^23.7.1", + "i18next-chained-backend": "^4.6.0", "mocha": "^10.2.0", - "rollup": "^3.28.1", + "rollup": "^4.3.0", "should": "^13.2.3", - "sinon": "^15.2.0", + "sinon": "^17.0.1", "tsd": "^0.29.0", "typescript": "^5.2.2" }, diff --git a/tsconfig.json b/tsconfig.json index 0b29b93..0fd36f5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "strict": true }, "include": [ - "/test/types/*.test-d.ts", - "/*.d.ts" + "test/types/*.test-d.ts", + "*.d.ts", + "*.d.mts" ] }