diff --git a/.npmignore b/.npmignore index 80ae7e8..9d35754 100644 --- a/.npmignore +++ b/.npmignore @@ -3,3 +3,8 @@ tests rollup.config.js tsconfig.json tsconfig-test.json + +# generated markdown previews +README.html +CHANGELOG.html +LICENSE.html diff --git a/dist/pocketbase.es.d.ts b/dist/pocketbase.es.d.mts similarity index 100% rename from dist/pocketbase.es.d.ts rename to dist/pocketbase.es.d.mts diff --git a/package.json b/package.json index 261f1b9..93f85d4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.8.2", + "version": "0.8.3", "name": "pocketbase", "description": "PocketBase JavaScript SDK", "author": "Gani Georgiev", @@ -16,7 +16,7 @@ "main": "./dist/pocketbase.es.mjs", "module": "./dist/pocketbase.es.mjs", "react-native": "./dist/pocketbase.es.js", - "types": "./dist/pocketbase.es.d.ts", + "types": "./dist/pocketbase.es.d.mts", "keywords": [ "pocketbase", "pocketbase-js", diff --git a/rollup.config.js b/rollup.config.js index f65b88d..d94059e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -5,7 +5,21 @@ const isProduction = !process.env.ROLLUP_WATCH; function basePlugins() { return [ - ts(), + ts({ + hook: { + outputPath: (path, kind) => { + if (kind === 'declaration') { + // replace .es.d.ts with .es.d.mts (see #92) + // + // this usually is already done in rollup-plugin-ts v3 + // and could be removed after upgrading + return path.replace('.es.d.ts', '.es.d.mts'); + } + + return path; + } + } + }), // minify if we're building for production // (aka. npm run build instead of npm run dev)