diff --git a/.changeset/blue-shirts-reply.md b/.changeset/blue-shirts-reply.md new file mode 100644 index 0000000..1996789 --- /dev/null +++ b/.changeset/blue-shirts-reply.md @@ -0,0 +1,5 @@ +--- +"@rollup-extras/plugin-externals": patch +--- + +update pkg-dir diff --git a/plugin-angularjs-template-cache/package.json b/plugin-angularjs-template-cache/package.json index 7107830..daeed94 100644 --- a/plugin-angularjs-template-cache/package.json +++ b/plugin-angularjs-template-cache/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -39,7 +40,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -57,5 +59,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-binify/package.json b/plugin-binify/package.json index 7c37989..4f0e1fd 100644 --- a/plugin-binify/package.json +++ b/plugin-binify/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -38,7 +39,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -51,5 +53,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-clean/package.json b/plugin-clean/package.json index 3175caa..2f828fa 100644 --- a/plugin-clean/package.json +++ b/plugin-clean/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -38,7 +39,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -51,5 +53,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-copy/package.json b/plugin-copy/package.json index a78e2f8..a83533a 100644 --- a/plugin-copy/package.json +++ b/plugin-copy/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -38,7 +39,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -57,5 +59,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-exec/package.json b/plugin-exec/package.json index e1a0621..19187fa 100644 --- a/plugin-exec/package.json +++ b/plugin-exec/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -37,7 +38,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -50,5 +52,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-externals/package.json b/plugin-externals/package.json index 91a6165..fa1d972 100644 --- a/plugin-externals/package.json +++ b/plugin-externals/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -38,12 +39,13 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", "is-builtin-module": "^3.2.0", - "pkg-dir": "5.0.0", + "pkg-dir": "8.0.0", "@rollup-extras/utils": "^1.4.5" }, "peerDependencies": { @@ -53,5 +55,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-externals/src/index.ts b/plugin-externals/src/index.ts index 326d02a..8ab1315 100644 --- a/plugin-externals/src/index.ts +++ b/plugin-externals/src/index.ts @@ -5,7 +5,7 @@ import { getOptionsObject } from '@rollup-extras/utils/options'; import { LogLevel } from '@niceties/logger'; import logger from '@rollup-extras/utils/logger'; import { ExternalsPluginOptions } from './types'; -import packageDirectory from 'pkg-dir'; +import { packageDirectory } from 'pkg-dir'; const factories = { logger }; diff --git a/plugin-externals/tests/index.spec.ts b/plugin-externals/tests/index.spec.ts index ed1758c..4199b2f 100644 --- a/plugin-externals/tests/index.spec.ts +++ b/plugin-externals/tests/index.spec.ts @@ -1,6 +1,5 @@ import { createLogger, LogLevel } from '@niceties/logger'; -import packageDirectory from 'pkg-dir'; -// import path from 'path'; +import { packageDirectory } from 'pkg-dir'; import plugin from '../src'; let log: jest.Mock; @@ -11,9 +10,8 @@ jest.mock('@niceties/logger', () => ({ })); jest.mock('pkg-dir', () => ({ - ...jest.requireActual('pkg-dir'), - __esModule: true, - default: jest.fn(() => Promise.resolve('')) + packageDirectory: jest.fn(() => Promise.resolve('')), + __esModule: true })); describe('@rollup-extras/plugin-externals', () => { diff --git a/plugin-html/package.json b/plugin-html/package.json index 1e93f39..4edab61 100644 --- a/plugin-html/package.json +++ b/plugin-html/package.json @@ -9,16 +9,19 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./asset-factories": { + "types": "./dist/asset-factories.d.ts", + "import": "./dist/asset-factories.mjs", "require": "./dist/asset-factories.cjs", "default": "./dist/asset-factories.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE", @@ -43,7 +46,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.4", @@ -56,5 +60,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/plugin-serve/package.json b/plugin-serve/package.json index 4064286..8e65d93 100644 --- a/plugin-serve/package.json +++ b/plugin-serve/package.json @@ -9,12 +9,13 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "LICENSE" @@ -38,7 +39,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "koa": "^2.14.1", @@ -59,5 +61,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 648c357..76d41cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -131,8 +131,8 @@ importers: specifier: ^3.2.0 version: 3.2.0 pkg-dir: - specifier: 5.0.0 - version: 5.0.0 + specifier: 8.0.0 + version: 8.0.0 rollup: specifier: ^2.60.1 || ^3.0.0 || ^4.0.0 version: 3.21.0 @@ -2773,6 +2773,11 @@ packages: pkg-dir: 4.2.0 dev: true + /find-up-simple@1.0.0: + resolution: {integrity: sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==} + engines: {node: '>=18'} + dev: false + /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -2787,6 +2792,7 @@ packages: dependencies: locate-path: 6.0.0 path-exists: 4.0.0 + dev: true /find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} @@ -4038,6 +4044,7 @@ packages: engines: {node: '>=10'} dependencies: p-locate: 5.0.0 + dev: true /lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} @@ -4355,6 +4362,7 @@ packages: engines: {node: '>=10'} dependencies: yocto-queue: 0.1.0 + dev: true /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} @@ -4368,6 +4376,7 @@ packages: engines: {node: '>=10'} dependencies: p-limit: 3.1.0 + dev: true /p-map@2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} @@ -4414,6 +4423,7 @@ packages: /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + dev: true /path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} @@ -4472,6 +4482,14 @@ packages: engines: {node: '>=10'} dependencies: find-up: 5.0.0 + dev: true + + /pkg-dir@8.0.0: + resolution: {integrity: sha512-4peoBq4Wks0riS0z8741NVv+/8IiTvqnZAr8QGgtdifrtpdXbNw/FxRS1l6NFqm4EMzuS0EDqNNx4XGaz8cuyQ==} + engines: {node: '>=18'} + dependencies: + find-up-simple: 1.0.0 + dev: false /pkgbld-internal@1.1.11: resolution: {integrity: sha512-ftasFDr4RM0cY/oshWtnbyaB7DhYlXnml/BOgwOh20NHuqYE94xW3XEfnqLq21WGucZ/4AwcyR6EiE40WZDA7g==} @@ -5502,3 +5520,4 @@ packages: /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + dev: true diff --git a/utils/package.json b/utils/package.json index 9df0eb0..491a291 100644 --- a/utils/package.json +++ b/utils/package.json @@ -9,28 +9,37 @@ "module": "./dist/index.mjs", "exports": { ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", "require": "./dist/index.cjs", "default": "./dist/index.mjs" }, "./mutli-config-plugin-base": { + "types": "./dist/mutli-config-plugin-base.d.ts", + "import": "./dist/mutli-config-plugin-base.mjs", "require": "./dist/mutli-config-plugin-base.cjs", "default": "./dist/mutli-config-plugin-base.mjs" }, "./options": { + "types": "./dist/options.d.ts", + "import": "./dist/options.mjs", "require": "./dist/options.cjs", "default": "./dist/options.mjs" }, "./logger": { + "types": "./dist/logger.d.ts", + "import": "./dist/logger.mjs", "require": "./dist/logger.cjs", "default": "./dist/logger.mjs" }, "./statistics": { + "types": "./dist/statistics.d.ts", + "import": "./dist/statistics.mjs", "require": "./dist/statistics.cjs", "default": "./dist/statistics.mjs" }, "./package.json": "./package.json" }, - "typings": "./dist/index.d.ts", "files": [ "dist", "mutli-config-plugin-base", @@ -59,7 +68,8 @@ "scripts": { "build": "pkgbld-internal", "test": "jest --collectCoverage", - "lint": "eslint ./src" + "lint": "eslint ./src", + "prepack": "pkgbld-internal prune" }, "dependencies": { "@niceties/logger": "^1.1.5" @@ -71,5 +81,6 @@ "rollup": { "optional": true } - } -} \ No newline at end of file + }, + "types": "./dist/index.d.ts" +}