diff --git a/.gitignore b/.gitignore index d84ced3cc..ed1c9101d 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ coverage.lcov !packages/commonjs/test/**/node_modules !packages/typescript/test/fixtures/**/node_modules !packages/typescript/test/fixtures/**/dist + +!packages/*/test-typings/node_modules diff --git a/packages/alias/package.json b/packages/alias/package.json index 1d46b5b5e..a25af62b3 100755 --- a/packages/alias/package.json +++ b/packages/alias/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/alias/test-typings/cjs-node16/index.ts b/packages/alias/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/alias/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/alias/test-typings/cjs-node16/package.json b/packages/alias/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/alias/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/alias/test-typings/cjs-node16/tsconfig.json b/packages/alias/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/alias/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/alias/test-typings/esm-node16/index.ts b/packages/alias/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/alias/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/alias/test-typings/esm-node16/package.json b/packages/alias/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/alias/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/alias/test-typings/esm-node16/tsconfig.json b/packages/alias/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/alias/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/alias/test-typings/node10-commonjs/index.ts b/packages/alias/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/alias/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/alias/test-typings/node10-commonjs/tsconfig.json b/packages/alias/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/alias/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/alias/test-typings/node10-esnext/index.ts b/packages/alias/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/alias/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/alias/test-typings/node10-esnext/tsconfig.json b/packages/alias/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/alias/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/alias/test-typings/node_modules/current-package b/packages/alias/test-typings/node_modules/current-package new file mode 120000 index 000000000..75275f2f5 --- /dev/null +++ b/packages/alias/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/alias \ No newline at end of file diff --git a/packages/alias/test-typings/tsconfig.json b/packages/alias/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/alias/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/auto-install/package.json b/packages/auto-install/package.json index d81b75874..0c7d016ef 100755 --- a/packages/auto-install/package.json +++ b/packages/auto-install/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/auto-install/test-typings/cjs-node16/index.ts b/packages/auto-install/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/auto-install/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/auto-install/test-typings/cjs-node16/package.json b/packages/auto-install/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/auto-install/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/auto-install/test-typings/cjs-node16/tsconfig.json b/packages/auto-install/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/auto-install/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/auto-install/test-typings/esm-node16/index.ts b/packages/auto-install/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/auto-install/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/auto-install/test-typings/esm-node16/package.json b/packages/auto-install/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/auto-install/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/auto-install/test-typings/esm-node16/tsconfig.json b/packages/auto-install/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/auto-install/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/auto-install/test-typings/node10-commonjs/index.ts b/packages/auto-install/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/auto-install/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/auto-install/test-typings/node10-commonjs/tsconfig.json b/packages/auto-install/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/auto-install/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/auto-install/test-typings/node10-esnext/index.ts b/packages/auto-install/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/auto-install/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/auto-install/test-typings/node10-esnext/tsconfig.json b/packages/auto-install/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/auto-install/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/auto-install/test-typings/node_modules/current-package b/packages/auto-install/test-typings/node_modules/current-package new file mode 120000 index 000000000..5711317da --- /dev/null +++ b/packages/auto-install/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/auto-install \ No newline at end of file diff --git a/packages/auto-install/test-typings/tsconfig.json b/packages/auto-install/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/auto-install/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/babel/package.json b/packages/babel/package.json index 5bbd6d72a..257a5febd 100644 --- a/packages/babel/package.json +++ b/packages/babel/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/babel/test-typings/cjs-node16/index.ts b/packages/babel/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/babel/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/babel/test-typings/cjs-node16/package.json b/packages/babel/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/babel/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/babel/test-typings/cjs-node16/tsconfig.json b/packages/babel/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/babel/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/babel/test-typings/esm-node16/index.ts b/packages/babel/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/babel/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/babel/test-typings/esm-node16/package.json b/packages/babel/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/babel/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/babel/test-typings/esm-node16/tsconfig.json b/packages/babel/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/babel/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/babel/test-typings/node10-commonjs/index.ts b/packages/babel/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/babel/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/babel/test-typings/node10-commonjs/tsconfig.json b/packages/babel/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/babel/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/babel/test-typings/node10-esnext/index.ts b/packages/babel/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/babel/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/babel/test-typings/node10-esnext/tsconfig.json b/packages/babel/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/babel/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/babel/test-typings/node_modules/current-package b/packages/babel/test-typings/node_modules/current-package new file mode 120000 index 000000000..e92e50851 --- /dev/null +++ b/packages/babel/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/babel \ No newline at end of file diff --git a/packages/babel/test-typings/tsconfig.json b/packages/babel/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/babel/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/beep/test-typings/cjs-node16/index.ts b/packages/beep/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/beep/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/beep/test-typings/cjs-node16/package.json b/packages/beep/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/beep/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/beep/test-typings/cjs-node16/tsconfig.json b/packages/beep/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/beep/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/beep/test-typings/esm-node16/index.ts b/packages/beep/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/beep/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/beep/test-typings/esm-node16/package.json b/packages/beep/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/beep/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/beep/test-typings/esm-node16/tsconfig.json b/packages/beep/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/beep/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/beep/test-typings/node10-commonjs/index.ts b/packages/beep/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/beep/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/beep/test-typings/node10-commonjs/tsconfig.json b/packages/beep/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/beep/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/beep/test-typings/node10-esnext/index.ts b/packages/beep/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/beep/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/beep/test-typings/node10-esnext/tsconfig.json b/packages/beep/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/beep/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/beep/test-typings/node_modules/current-package b/packages/beep/test-typings/node_modules/current-package new file mode 120000 index 000000000..788165e81 --- /dev/null +++ b/packages/beep/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/beep \ No newline at end of file diff --git a/packages/beep/test-typings/tsconfig.json b/packages/beep/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/beep/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/buble/package.json b/packages/buble/package.json index 1a8fc45c8..2891a5334 100644 --- a/packages/buble/package.json +++ b/packages/buble/package.json @@ -40,8 +40,9 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", - "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", + "test:ts": "tsc --noEmit" }, "files": [ "dist", diff --git a/packages/buble/test-typings/cjs-node16/index.ts b/packages/buble/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/buble/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/buble/test-typings/cjs-node16/package.json b/packages/buble/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/buble/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/buble/test-typings/cjs-node16/tsconfig.json b/packages/buble/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/buble/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/buble/test-typings/esm-node16/index.ts b/packages/buble/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/buble/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/buble/test-typings/esm-node16/package.json b/packages/buble/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/buble/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/buble/test-typings/esm-node16/tsconfig.json b/packages/buble/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/buble/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/buble/test-typings/node10-commonjs/index.ts b/packages/buble/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/buble/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/buble/test-typings/node10-commonjs/tsconfig.json b/packages/buble/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/buble/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/buble/test-typings/node10-esnext/index.ts b/packages/buble/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/buble/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/buble/test-typings/node10-esnext/tsconfig.json b/packages/buble/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/buble/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/buble/test-typings/node_modules/current-package b/packages/buble/test-typings/node_modules/current-package new file mode 120000 index 000000000..0ee58a84d --- /dev/null +++ b/packages/buble/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/buble \ No newline at end of file diff --git a/packages/buble/test-typings/tsconfig.json b/packages/buble/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/buble/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json index fc4dad728..abc133e92 100644 --- a/packages/commonjs/package.json +++ b/packages/commonjs/package.json @@ -41,7 +41,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/commonjs/test-typings/cjs-node16/index.ts b/packages/commonjs/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/commonjs/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/commonjs/test-typings/cjs-node16/package.json b/packages/commonjs/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/commonjs/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/commonjs/test-typings/cjs-node16/tsconfig.json b/packages/commonjs/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/commonjs/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/commonjs/test-typings/esm-node16/index.ts b/packages/commonjs/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/commonjs/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/commonjs/test-typings/esm-node16/package.json b/packages/commonjs/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/commonjs/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/commonjs/test-typings/esm-node16/tsconfig.json b/packages/commonjs/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/commonjs/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/commonjs/test-typings/node10-commonjs/index.ts b/packages/commonjs/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/commonjs/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/commonjs/test-typings/node10-commonjs/tsconfig.json b/packages/commonjs/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/commonjs/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/commonjs/test-typings/node10-esnext/index.ts b/packages/commonjs/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/commonjs/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/commonjs/test-typings/node10-esnext/tsconfig.json b/packages/commonjs/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/commonjs/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/commonjs/test-typings/node_modules/current-package b/packages/commonjs/test-typings/node_modules/current-package new file mode 120000 index 000000000..77c8847c0 --- /dev/null +++ b/packages/commonjs/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/commonjs \ No newline at end of file diff --git a/packages/commonjs/test-typings/tsconfig.json b/packages/commonjs/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/commonjs/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/data-uri/package.json b/packages/data-uri/package.json index f7450680c..be935e30b 100644 --- a/packages/data-uri/package.json +++ b/packages/data-uri/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build --sourcemap", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/data-uri/test-typings/cjs-node16/index.ts b/packages/data-uri/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/data-uri/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/data-uri/test-typings/cjs-node16/package.json b/packages/data-uri/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/data-uri/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/data-uri/test-typings/cjs-node16/tsconfig.json b/packages/data-uri/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/data-uri/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/data-uri/test-typings/esm-node16/index.ts b/packages/data-uri/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/data-uri/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/data-uri/test-typings/esm-node16/package.json b/packages/data-uri/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/data-uri/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/data-uri/test-typings/esm-node16/tsconfig.json b/packages/data-uri/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/data-uri/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/data-uri/test-typings/node10-commonjs/index.ts b/packages/data-uri/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/data-uri/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/data-uri/test-typings/node10-commonjs/tsconfig.json b/packages/data-uri/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/data-uri/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/data-uri/test-typings/node10-esnext/index.ts b/packages/data-uri/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/data-uri/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/data-uri/test-typings/node10-esnext/tsconfig.json b/packages/data-uri/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/data-uri/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/data-uri/test-typings/node_modules/current-package b/packages/data-uri/test-typings/node_modules/current-package new file mode 120000 index 000000000..d821ac437 --- /dev/null +++ b/packages/data-uri/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/data-uri \ No newline at end of file diff --git a/packages/data-uri/test-typings/tsconfig.json b/packages/data-uri/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/data-uri/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/dsv/package.json b/packages/dsv/package.json index c2a7f0463..c0b8ebbe7 100755 --- a/packages/dsv/package.json +++ b/packages/dsv/package.json @@ -37,7 +37,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/dsv/test-typings/cjs-node16/index.ts b/packages/dsv/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dsv/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dsv/test-typings/cjs-node16/package.json b/packages/dsv/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/dsv/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/dsv/test-typings/cjs-node16/tsconfig.json b/packages/dsv/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/dsv/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dsv/test-typings/esm-node16/index.ts b/packages/dsv/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dsv/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dsv/test-typings/esm-node16/package.json b/packages/dsv/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/dsv/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/dsv/test-typings/esm-node16/tsconfig.json b/packages/dsv/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/dsv/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dsv/test-typings/node10-commonjs/index.ts b/packages/dsv/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dsv/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dsv/test-typings/node10-commonjs/tsconfig.json b/packages/dsv/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/dsv/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dsv/test-typings/node10-esnext/index.ts b/packages/dsv/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dsv/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dsv/test-typings/node10-esnext/tsconfig.json b/packages/dsv/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/dsv/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dsv/test-typings/node_modules/current-package b/packages/dsv/test-typings/node_modules/current-package new file mode 120000 index 000000000..2f93fca35 --- /dev/null +++ b/packages/dsv/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/dsv \ No newline at end of file diff --git a/packages/dsv/test-typings/tsconfig.json b/packages/dsv/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/dsv/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/dynamic-import-vars/package.json b/packages/dynamic-import-vars/package.json index e9e5eae44..ce88fe913 100644 --- a/packages/dynamic-import-vars/package.json +++ b/packages/dynamic-import-vars/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build --sourcemap", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/dynamic-import-vars/test-typings/cjs-node16/index.ts b/packages/dynamic-import-vars/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dynamic-import-vars/test-typings/cjs-node16/package.json b/packages/dynamic-import-vars/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/dynamic-import-vars/test-typings/cjs-node16/tsconfig.json b/packages/dynamic-import-vars/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dynamic-import-vars/test-typings/esm-node16/index.ts b/packages/dynamic-import-vars/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dynamic-import-vars/test-typings/esm-node16/package.json b/packages/dynamic-import-vars/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/dynamic-import-vars/test-typings/esm-node16/tsconfig.json b/packages/dynamic-import-vars/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dynamic-import-vars/test-typings/node10-commonjs/index.ts b/packages/dynamic-import-vars/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dynamic-import-vars/test-typings/node10-commonjs/tsconfig.json b/packages/dynamic-import-vars/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dynamic-import-vars/test-typings/node10-esnext/index.ts b/packages/dynamic-import-vars/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/dynamic-import-vars/test-typings/node10-esnext/tsconfig.json b/packages/dynamic-import-vars/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/dynamic-import-vars/test-typings/node_modules/current-package b/packages/dynamic-import-vars/test-typings/node_modules/current-package new file mode 120000 index 000000000..00a3c627e --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/dynamic-import-vars \ No newline at end of file diff --git a/packages/dynamic-import-vars/test-typings/tsconfig.json b/packages/dynamic-import-vars/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/dynamic-import-vars/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/eslint/package.json b/packages/eslint/package.json index 300d3b6ea..8be85ff40 100755 --- a/packages/eslint/package.json +++ b/packages/eslint/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/eslint/test-typings/cjs-node16/index.ts b/packages/eslint/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/eslint/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/eslint/test-typings/cjs-node16/package.json b/packages/eslint/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/eslint/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/eslint/test-typings/cjs-node16/tsconfig.json b/packages/eslint/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/eslint/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/eslint/test-typings/esm-node16/index.ts b/packages/eslint/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/eslint/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/eslint/test-typings/esm-node16/package.json b/packages/eslint/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/eslint/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/eslint/test-typings/esm-node16/tsconfig.json b/packages/eslint/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/eslint/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/eslint/test-typings/node10-commonjs/index.ts b/packages/eslint/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/eslint/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/eslint/test-typings/node10-commonjs/tsconfig.json b/packages/eslint/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/eslint/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/eslint/test-typings/node10-esnext/index.ts b/packages/eslint/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/eslint/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/eslint/test-typings/node10-esnext/tsconfig.json b/packages/eslint/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/eslint/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/eslint/test-typings/node_modules/current-package b/packages/eslint/test-typings/node_modules/current-package new file mode 120000 index 000000000..892cce9ea --- /dev/null +++ b/packages/eslint/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/eslint \ No newline at end of file diff --git a/packages/eslint/test-typings/tsconfig.json b/packages/eslint/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/eslint/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/esm-shim/package.json b/packages/esm-shim/package.json index 80d3eb841..c5842c43f 100644 --- a/packages/esm-shim/package.json +++ b/packages/esm-shim/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/esm-shim/test-typings/cjs-node16/index.ts b/packages/esm-shim/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/esm-shim/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/esm-shim/test-typings/cjs-node16/package.json b/packages/esm-shim/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/esm-shim/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/esm-shim/test-typings/cjs-node16/tsconfig.json b/packages/esm-shim/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/esm-shim/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/esm-shim/test-typings/esm-node16/index.ts b/packages/esm-shim/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/esm-shim/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/esm-shim/test-typings/esm-node16/package.json b/packages/esm-shim/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/esm-shim/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/esm-shim/test-typings/esm-node16/tsconfig.json b/packages/esm-shim/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/esm-shim/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/esm-shim/test-typings/node10-commonjs/index.ts b/packages/esm-shim/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/esm-shim/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/esm-shim/test-typings/node10-commonjs/tsconfig.json b/packages/esm-shim/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/esm-shim/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/esm-shim/test-typings/node10-esnext/index.ts b/packages/esm-shim/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/esm-shim/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/esm-shim/test-typings/node10-esnext/tsconfig.json b/packages/esm-shim/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/esm-shim/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/esm-shim/test-typings/node_modules/current-package b/packages/esm-shim/test-typings/node_modules/current-package new file mode 120000 index 000000000..09537df01 --- /dev/null +++ b/packages/esm-shim/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/esm-shim \ No newline at end of file diff --git a/packages/esm-shim/test-typings/tsconfig.json b/packages/esm-shim/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/esm-shim/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/graphql/package.json b/packages/graphql/package.json index 776df27b3..97b438d4c 100644 --- a/packages/graphql/package.json +++ b/packages/graphql/package.json @@ -41,7 +41,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/graphql/test-typings/cjs-node16/index.ts b/packages/graphql/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/graphql/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/graphql/test-typings/cjs-node16/package.json b/packages/graphql/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/graphql/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/graphql/test-typings/cjs-node16/tsconfig.json b/packages/graphql/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/graphql/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/graphql/test-typings/esm-node16/index.ts b/packages/graphql/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/graphql/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/graphql/test-typings/esm-node16/package.json b/packages/graphql/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/graphql/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/graphql/test-typings/esm-node16/tsconfig.json b/packages/graphql/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/graphql/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/graphql/test-typings/node10-commonjs/index.ts b/packages/graphql/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/graphql/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/graphql/test-typings/node10-commonjs/tsconfig.json b/packages/graphql/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/graphql/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/graphql/test-typings/node10-esnext/index.ts b/packages/graphql/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/graphql/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/graphql/test-typings/node10-esnext/tsconfig.json b/packages/graphql/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/graphql/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/graphql/test-typings/node_modules/current-package b/packages/graphql/test-typings/node_modules/current-package new file mode 120000 index 000000000..5ecfe91ae --- /dev/null +++ b/packages/graphql/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/graphql \ No newline at end of file diff --git a/packages/graphql/test-typings/tsconfig.json b/packages/graphql/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/graphql/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/html/package.json b/packages/html/package.json index ebb6a89e2..2a08a96d1 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/html/test-typings/cjs-node16/index.ts b/packages/html/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/html/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/html/test-typings/cjs-node16/package.json b/packages/html/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/html/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/html/test-typings/cjs-node16/tsconfig.json b/packages/html/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/html/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/html/test-typings/esm-node16/index.ts b/packages/html/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/html/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/html/test-typings/esm-node16/package.json b/packages/html/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/html/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/html/test-typings/esm-node16/tsconfig.json b/packages/html/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/html/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/html/test-typings/node10-commonjs/index.ts b/packages/html/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/html/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/html/test-typings/node10-commonjs/tsconfig.json b/packages/html/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/html/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/html/test-typings/node10-esnext/index.ts b/packages/html/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/html/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/html/test-typings/node10-esnext/tsconfig.json b/packages/html/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/html/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/html/test-typings/node_modules/current-package b/packages/html/test-typings/node_modules/current-package new file mode 120000 index 000000000..c2b787f4f --- /dev/null +++ b/packages/html/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/html \ No newline at end of file diff --git a/packages/html/test-typings/tsconfig.json b/packages/html/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/html/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/image/package.json b/packages/image/package.json index f0190f49f..ca421477f 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/image/test-typings/cjs-node16/index.ts b/packages/image/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/image/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/image/test-typings/cjs-node16/package.json b/packages/image/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/image/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/image/test-typings/cjs-node16/tsconfig.json b/packages/image/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/image/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/image/test-typings/esm-node16/index.ts b/packages/image/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/image/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/image/test-typings/esm-node16/package.json b/packages/image/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/image/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/image/test-typings/esm-node16/tsconfig.json b/packages/image/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/image/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/image/test-typings/node10-commonjs/index.ts b/packages/image/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/image/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/image/test-typings/node10-commonjs/tsconfig.json b/packages/image/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/image/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/image/test-typings/node10-esnext/index.ts b/packages/image/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/image/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/image/test-typings/node10-esnext/tsconfig.json b/packages/image/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/image/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/image/test-typings/node_modules/current-package b/packages/image/test-typings/node_modules/current-package new file mode 120000 index 000000000..5d638fe62 --- /dev/null +++ b/packages/image/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/image \ No newline at end of file diff --git a/packages/image/test-typings/tsconfig.json b/packages/image/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/image/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/inject/package.json b/packages/inject/package.json index 5324a8cda..ccc3dd95b 100644 --- a/packages/inject/package.json +++ b/packages/inject/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/inject/test-typings/cjs-node16/index.ts b/packages/inject/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/inject/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/inject/test-typings/cjs-node16/package.json b/packages/inject/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/inject/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/inject/test-typings/cjs-node16/tsconfig.json b/packages/inject/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/inject/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/inject/test-typings/esm-node16/index.ts b/packages/inject/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/inject/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/inject/test-typings/esm-node16/package.json b/packages/inject/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/inject/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/inject/test-typings/esm-node16/tsconfig.json b/packages/inject/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/inject/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/inject/test-typings/node10-commonjs/index.ts b/packages/inject/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/inject/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/inject/test-typings/node10-commonjs/tsconfig.json b/packages/inject/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/inject/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/inject/test-typings/node10-esnext/index.ts b/packages/inject/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/inject/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/inject/test-typings/node10-esnext/tsconfig.json b/packages/inject/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/inject/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/inject/test-typings/node_modules/current-package b/packages/inject/test-typings/node_modules/current-package new file mode 120000 index 000000000..72a7f6f9e --- /dev/null +++ b/packages/inject/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/inject \ No newline at end of file diff --git a/packages/inject/test-typings/tsconfig.json b/packages/inject/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/inject/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/json/package.json b/packages/json/package.json index 78d2b9b9c..3db56da5e 100755 --- a/packages/json/package.json +++ b/packages/json/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/json/test-typings/cjs-node16/index.ts b/packages/json/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/json/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/json/test-typings/cjs-node16/package.json b/packages/json/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/json/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/json/test-typings/cjs-node16/tsconfig.json b/packages/json/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/json/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/json/test-typings/esm-node16/index.ts b/packages/json/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/json/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/json/test-typings/esm-node16/package.json b/packages/json/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/json/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/json/test-typings/esm-node16/tsconfig.json b/packages/json/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/json/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/json/test-typings/node10-commonjs/index.ts b/packages/json/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/json/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/json/test-typings/node10-commonjs/tsconfig.json b/packages/json/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/json/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/json/test-typings/node10-esnext/index.ts b/packages/json/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/json/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/json/test-typings/node10-esnext/tsconfig.json b/packages/json/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/json/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/json/test-typings/node_modules/current-package b/packages/json/test-typings/node_modules/current-package new file mode 120000 index 000000000..37500528f --- /dev/null +++ b/packages/json/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/json \ No newline at end of file diff --git a/packages/json/test-typings/tsconfig.json b/packages/json/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/json/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/legacy/package.json b/packages/legacy/package.json index a0294a7a8..f6e86c29c 100644 --- a/packages/legacy/package.json +++ b/packages/legacy/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/legacy/test-typings/cjs-node16/index.ts b/packages/legacy/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/legacy/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/legacy/test-typings/cjs-node16/package.json b/packages/legacy/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/legacy/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/legacy/test-typings/cjs-node16/tsconfig.json b/packages/legacy/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/legacy/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/legacy/test-typings/esm-node16/index.ts b/packages/legacy/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/legacy/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/legacy/test-typings/esm-node16/package.json b/packages/legacy/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/legacy/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/legacy/test-typings/esm-node16/tsconfig.json b/packages/legacy/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/legacy/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/legacy/test-typings/node10-commonjs/index.ts b/packages/legacy/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/legacy/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/legacy/test-typings/node10-commonjs/tsconfig.json b/packages/legacy/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/legacy/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/legacy/test-typings/node10-esnext/index.ts b/packages/legacy/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/legacy/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/legacy/test-typings/node10-esnext/tsconfig.json b/packages/legacy/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/legacy/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/legacy/test-typings/node_modules/current-package b/packages/legacy/test-typings/node_modules/current-package new file mode 120000 index 000000000..98220cc58 --- /dev/null +++ b/packages/legacy/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/legacy \ No newline at end of file diff --git a/packages/legacy/test-typings/tsconfig.json b/packages/legacy/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/legacy/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/multi-entry/package.json b/packages/multi-entry/package.json index 732b0c212..aa7d7e56e 100755 --- a/packages/multi-entry/package.json +++ b/packages/multi-entry/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/multi-entry/test-typings/cjs-node16/index.ts b/packages/multi-entry/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/multi-entry/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/multi-entry/test-typings/cjs-node16/package.json b/packages/multi-entry/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/multi-entry/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/multi-entry/test-typings/cjs-node16/tsconfig.json b/packages/multi-entry/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/multi-entry/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/multi-entry/test-typings/esm-node16/index.ts b/packages/multi-entry/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/multi-entry/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/multi-entry/test-typings/esm-node16/package.json b/packages/multi-entry/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/multi-entry/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/multi-entry/test-typings/esm-node16/tsconfig.json b/packages/multi-entry/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/multi-entry/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/multi-entry/test-typings/node10-commonjs/index.ts b/packages/multi-entry/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/multi-entry/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/multi-entry/test-typings/node10-commonjs/tsconfig.json b/packages/multi-entry/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/multi-entry/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/multi-entry/test-typings/node10-esnext/index.ts b/packages/multi-entry/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/multi-entry/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/multi-entry/test-typings/node10-esnext/tsconfig.json b/packages/multi-entry/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/multi-entry/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/multi-entry/test-typings/node_modules/current-package b/packages/multi-entry/test-typings/node_modules/current-package new file mode 120000 index 000000000..8b13448de --- /dev/null +++ b/packages/multi-entry/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/multi-entry \ No newline at end of file diff --git a/packages/multi-entry/test-typings/tsconfig.json b/packages/multi-entry/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/multi-entry/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/node-resolve/package.json b/packages/node-resolve/package.json index a533f0062..2aa385e08 100644 --- a/packages/node-resolve/package.json +++ b/packages/node-resolve/package.json @@ -41,7 +41,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "pnpm test:ts && ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/node-resolve/test-typings/cjs-node16/index.ts b/packages/node-resolve/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/node-resolve/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/node-resolve/test-typings/cjs-node16/package.json b/packages/node-resolve/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/node-resolve/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/node-resolve/test-typings/cjs-node16/tsconfig.json b/packages/node-resolve/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/node-resolve/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/node-resolve/test-typings/esm-node16/index.ts b/packages/node-resolve/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/node-resolve/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/node-resolve/test-typings/esm-node16/package.json b/packages/node-resolve/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/node-resolve/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/node-resolve/test-typings/esm-node16/tsconfig.json b/packages/node-resolve/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/node-resolve/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/node-resolve/test-typings/node10-commonjs/index.ts b/packages/node-resolve/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/node-resolve/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/node-resolve/test-typings/node10-commonjs/tsconfig.json b/packages/node-resolve/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/node-resolve/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/node-resolve/test-typings/node10-esnext/index.ts b/packages/node-resolve/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/node-resolve/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/node-resolve/test-typings/node10-esnext/tsconfig.json b/packages/node-resolve/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/node-resolve/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/node-resolve/test-typings/node_modules/current-package b/packages/node-resolve/test-typings/node_modules/current-package new file mode 120000 index 000000000..263c70d87 --- /dev/null +++ b/packages/node-resolve/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/node-resolve \ No newline at end of file diff --git a/packages/node-resolve/test-typings/tsconfig.json b/packages/node-resolve/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/node-resolve/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/pluginutils/package.json b/packages/pluginutils/package.json index adb1481b5..5207a0b15 100644 --- a/packages/pluginutils/package.json +++ b/packages/pluginutils/package.json @@ -43,6 +43,7 @@ "pretest": "pnpm build --sourcemap", "release": "pnpm --workspace-root package:release $(pwd)", "test": "ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/replace/package.json b/packages/replace/package.json index 08ff85cd4..d9578db29 100644 --- a/packages/replace/package.json +++ b/packages/replace/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/replace/test-typings/cjs-node16/index.ts b/packages/replace/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/replace/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/replace/test-typings/cjs-node16/package.json b/packages/replace/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/replace/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/replace/test-typings/cjs-node16/tsconfig.json b/packages/replace/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/replace/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/replace/test-typings/esm-node16/index.ts b/packages/replace/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/replace/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/replace/test-typings/esm-node16/package.json b/packages/replace/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/replace/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/replace/test-typings/esm-node16/tsconfig.json b/packages/replace/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/replace/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/replace/test-typings/node10-commonjs/index.ts b/packages/replace/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/replace/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/replace/test-typings/node10-commonjs/tsconfig.json b/packages/replace/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/replace/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/replace/test-typings/node10-esnext/index.ts b/packages/replace/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/replace/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/replace/test-typings/node10-esnext/tsconfig.json b/packages/replace/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/replace/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/replace/test-typings/node_modules/current-package b/packages/replace/test-typings/node_modules/current-package new file mode 120000 index 000000000..e414a5977 --- /dev/null +++ b/packages/replace/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/replace \ No newline at end of file diff --git a/packages/replace/test-typings/tsconfig.json b/packages/replace/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/replace/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/run/package.json b/packages/run/package.json index 31b04bb2b..cf42c958b 100644 --- a/packages/run/package.json +++ b/packages/run/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/run/test-typings/cjs-node16/index.ts b/packages/run/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/run/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/run/test-typings/cjs-node16/package.json b/packages/run/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/run/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/run/test-typings/cjs-node16/tsconfig.json b/packages/run/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/run/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/run/test-typings/esm-node16/index.ts b/packages/run/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/run/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/run/test-typings/esm-node16/package.json b/packages/run/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/run/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/run/test-typings/esm-node16/tsconfig.json b/packages/run/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/run/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/run/test-typings/node10-commonjs/index.ts b/packages/run/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/run/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/run/test-typings/node10-commonjs/tsconfig.json b/packages/run/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/run/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/run/test-typings/node10-esnext/index.ts b/packages/run/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/run/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/run/test-typings/node10-esnext/tsconfig.json b/packages/run/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/run/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/run/test-typings/node_modules/current-package b/packages/run/test-typings/node_modules/current-package new file mode 120000 index 000000000..435bb4ffe --- /dev/null +++ b/packages/run/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/run \ No newline at end of file diff --git a/packages/run/test-typings/tsconfig.json b/packages/run/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/run/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/strip/package.json b/packages/strip/package.json index 080e81a91..2c335b49a 100644 --- a/packages/strip/package.json +++ b/packages/strip/package.json @@ -39,7 +39,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/strip/test-typings/cjs-node16/index.ts b/packages/strip/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/strip/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/strip/test-typings/cjs-node16/package.json b/packages/strip/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/strip/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/strip/test-typings/cjs-node16/tsconfig.json b/packages/strip/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/strip/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/strip/test-typings/esm-node16/index.ts b/packages/strip/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/strip/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/strip/test-typings/esm-node16/package.json b/packages/strip/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/strip/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/strip/test-typings/esm-node16/tsconfig.json b/packages/strip/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/strip/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/strip/test-typings/node10-commonjs/index.ts b/packages/strip/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/strip/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/strip/test-typings/node10-commonjs/tsconfig.json b/packages/strip/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/strip/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/strip/test-typings/node10-esnext/index.ts b/packages/strip/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/strip/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/strip/test-typings/node10-esnext/tsconfig.json b/packages/strip/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/strip/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/strip/test-typings/node_modules/current-package b/packages/strip/test-typings/node_modules/current-package new file mode 120000 index 000000000..0cfa94b9e --- /dev/null +++ b/packages/strip/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/strip \ No newline at end of file diff --git a/packages/strip/test-typings/tsconfig.json b/packages/strip/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/strip/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/sucrase/package.json b/packages/sucrase/package.json index 6f17356b4..1ff1186fd 100644 --- a/packages/sucrase/package.json +++ b/packages/sucrase/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/sucrase/test-typings/cjs-node16/index.ts b/packages/sucrase/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/sucrase/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/sucrase/test-typings/cjs-node16/package.json b/packages/sucrase/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/sucrase/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/sucrase/test-typings/cjs-node16/tsconfig.json b/packages/sucrase/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/sucrase/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/sucrase/test-typings/esm-node16/index.ts b/packages/sucrase/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/sucrase/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/sucrase/test-typings/esm-node16/package.json b/packages/sucrase/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/sucrase/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/sucrase/test-typings/esm-node16/tsconfig.json b/packages/sucrase/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/sucrase/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/sucrase/test-typings/node10-commonjs/index.ts b/packages/sucrase/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/sucrase/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/sucrase/test-typings/node10-commonjs/tsconfig.json b/packages/sucrase/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/sucrase/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/sucrase/test-typings/node10-esnext/index.ts b/packages/sucrase/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/sucrase/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/sucrase/test-typings/node10-esnext/tsconfig.json b/packages/sucrase/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/sucrase/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/sucrase/test-typings/node_modules/current-package b/packages/sucrase/test-typings/node_modules/current-package new file mode 120000 index 000000000..d766e758e --- /dev/null +++ b/packages/sucrase/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/sucrase \ No newline at end of file diff --git a/packages/sucrase/test-typings/tsconfig.json b/packages/sucrase/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/sucrase/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/swc/package.json b/packages/swc/package.json index f0015a7a4..9ce6c7cc1 100644 --- a/packages/swc/package.json +++ b/packages/swc/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/swc/test-typings/cjs-node16/index.ts b/packages/swc/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/swc/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/swc/test-typings/cjs-node16/package.json b/packages/swc/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/swc/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/swc/test-typings/cjs-node16/tsconfig.json b/packages/swc/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/swc/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/swc/test-typings/esm-node16/index.ts b/packages/swc/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/swc/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/swc/test-typings/esm-node16/package.json b/packages/swc/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/swc/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/swc/test-typings/esm-node16/tsconfig.json b/packages/swc/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/swc/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/swc/test-typings/node10-commonjs/index.ts b/packages/swc/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/swc/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/swc/test-typings/node10-commonjs/tsconfig.json b/packages/swc/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/swc/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/swc/test-typings/node10-esnext/index.ts b/packages/swc/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/swc/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/swc/test-typings/node10-esnext/tsconfig.json b/packages/swc/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/swc/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/swc/test-typings/node_modules/current-package b/packages/swc/test-typings/node_modules/current-package new file mode 120000 index 000000000..5031f43de --- /dev/null +++ b/packages/swc/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/swc \ No newline at end of file diff --git a/packages/swc/test-typings/tsconfig.json b/packages/swc/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/swc/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/terser/package.json b/packages/terser/package.json index d3598091f..73d68dea3 100644 --- a/packages/terser/package.json +++ b/packages/terser/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc types/index.d.ts test/types.ts --noEmit" }, "files": [ diff --git a/packages/terser/test-typings/cjs-node16/index.ts b/packages/terser/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/terser/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/terser/test-typings/cjs-node16/package.json b/packages/terser/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/terser/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/terser/test-typings/cjs-node16/tsconfig.json b/packages/terser/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/terser/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/terser/test-typings/esm-node16/index.ts b/packages/terser/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/terser/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/terser/test-typings/esm-node16/package.json b/packages/terser/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/terser/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/terser/test-typings/esm-node16/tsconfig.json b/packages/terser/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/terser/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/terser/test-typings/node10-commonjs/index.ts b/packages/terser/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/terser/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/terser/test-typings/node10-commonjs/tsconfig.json b/packages/terser/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/terser/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/terser/test-typings/node10-esnext/index.ts b/packages/terser/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/terser/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/terser/test-typings/node10-esnext/tsconfig.json b/packages/terser/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/terser/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/terser/test-typings/node_modules/current-package b/packages/terser/test-typings/node_modules/current-package new file mode 120000 index 000000000..d575fbb6a --- /dev/null +++ b/packages/terser/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/terser \ No newline at end of file diff --git a/packages/terser/test-typings/tsconfig.json b/packages/terser/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/terser/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/typescript/package.json b/packages/typescript/package.json index e887f1530..6fd8b0232 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/typescript/test-typings/cjs-node16/index.ts b/packages/typescript/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/typescript/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/typescript/test-typings/cjs-node16/package.json b/packages/typescript/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/typescript/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/typescript/test-typings/cjs-node16/tsconfig.json b/packages/typescript/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/typescript/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/typescript/test-typings/esm-node16/index.ts b/packages/typescript/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/typescript/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/typescript/test-typings/esm-node16/package.json b/packages/typescript/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/typescript/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/typescript/test-typings/esm-node16/tsconfig.json b/packages/typescript/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/typescript/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/typescript/test-typings/node10-commonjs/index.ts b/packages/typescript/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/typescript/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/typescript/test-typings/node10-commonjs/tsconfig.json b/packages/typescript/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/typescript/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/typescript/test-typings/node10-esnext/index.ts b/packages/typescript/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/typescript/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/typescript/test-typings/node10-esnext/tsconfig.json b/packages/typescript/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/typescript/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/typescript/test-typings/node_modules/current-package b/packages/typescript/test-typings/node_modules/current-package new file mode 120000 index 000000000..2533bf3a8 --- /dev/null +++ b/packages/typescript/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/typescript \ No newline at end of file diff --git a/packages/typescript/test-typings/tsconfig.json b/packages/typescript/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/typescript/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/url/package.json b/packages/url/package.json index 12e91ecfd..31cfcac43 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/url/test-typings/cjs-node16/index.ts b/packages/url/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/url/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/url/test-typings/cjs-node16/package.json b/packages/url/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/url/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/url/test-typings/cjs-node16/tsconfig.json b/packages/url/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/url/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/url/test-typings/esm-node16/index.ts b/packages/url/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/url/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/url/test-typings/esm-node16/package.json b/packages/url/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/url/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/url/test-typings/esm-node16/tsconfig.json b/packages/url/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/url/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/url/test-typings/node10-commonjs/index.ts b/packages/url/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/url/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/url/test-typings/node10-commonjs/tsconfig.json b/packages/url/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/url/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/url/test-typings/node10-esnext/index.ts b/packages/url/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/url/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/url/test-typings/node10-esnext/tsconfig.json b/packages/url/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/url/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/url/test-typings/node_modules/current-package b/packages/url/test-typings/node_modules/current-package new file mode 120000 index 000000000..9f9d0277b --- /dev/null +++ b/packages/url/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/url \ No newline at end of file diff --git a/packages/url/test-typings/tsconfig.json b/packages/url/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/url/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/virtual/package.json b/packages/virtual/package.json index b02f8f4ff..b5eb718a8 100755 --- a/packages/virtual/package.json +++ b/packages/virtual/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/virtual/test-typings/cjs-node16/index.ts b/packages/virtual/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/virtual/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/virtual/test-typings/cjs-node16/package.json b/packages/virtual/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/virtual/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/virtual/test-typings/cjs-node16/tsconfig.json b/packages/virtual/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/virtual/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/virtual/test-typings/esm-node16/index.ts b/packages/virtual/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/virtual/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/virtual/test-typings/esm-node16/package.json b/packages/virtual/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/virtual/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/virtual/test-typings/esm-node16/tsconfig.json b/packages/virtual/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/virtual/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/virtual/test-typings/node10-commonjs/index.ts b/packages/virtual/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/virtual/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/virtual/test-typings/node10-commonjs/tsconfig.json b/packages/virtual/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/virtual/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/virtual/test-typings/node10-esnext/index.ts b/packages/virtual/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..8e8f1f748 --- /dev/null +++ b/packages/virtual/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage({}); diff --git a/packages/virtual/test-typings/node10-esnext/tsconfig.json b/packages/virtual/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/virtual/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/virtual/test-typings/node_modules/current-package b/packages/virtual/test-typings/node_modules/current-package new file mode 120000 index 000000000..c297c55b2 --- /dev/null +++ b/packages/virtual/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/virtual \ No newline at end of file diff --git a/packages/virtual/test-typings/tsconfig.json b/packages/virtual/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/virtual/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/wasm/package.json b/packages/wasm/package.json index cb0aeeae5..f69f0b221 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava", + "test": "pnpm test:ts && pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean", "test:ts": "tsc --noEmit" }, "files": [ diff --git a/packages/wasm/test-typings/cjs-node16/index.ts b/packages/wasm/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/wasm/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/wasm/test-typings/cjs-node16/package.json b/packages/wasm/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/wasm/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/wasm/test-typings/cjs-node16/tsconfig.json b/packages/wasm/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/wasm/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/wasm/test-typings/esm-node16/index.ts b/packages/wasm/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/wasm/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/wasm/test-typings/esm-node16/package.json b/packages/wasm/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/wasm/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/wasm/test-typings/esm-node16/tsconfig.json b/packages/wasm/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/wasm/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/wasm/test-typings/node10-commonjs/index.ts b/packages/wasm/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/wasm/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/wasm/test-typings/node10-commonjs/tsconfig.json b/packages/wasm/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/wasm/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/wasm/test-typings/node10-esnext/index.ts b/packages/wasm/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/wasm/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/wasm/test-typings/node10-esnext/tsconfig.json b/packages/wasm/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/wasm/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/wasm/test-typings/node_modules/current-package b/packages/wasm/test-typings/node_modules/current-package new file mode 120000 index 000000000..6f88a67c3 --- /dev/null +++ b/packages/wasm/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/wasm \ No newline at end of file diff --git a/packages/wasm/test-typings/tsconfig.json b/packages/wasm/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/wasm/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/packages/yaml/package.json b/packages/yaml/package.json index 8b1dca0f9..77de8f14d 100755 --- a/packages/yaml/package.json +++ b/packages/yaml/package.json @@ -40,7 +40,8 @@ "prerelease": "pnpm build", "pretest": "pnpm build", "release": "pnpm --workspace-root package:release $(pwd)", - "test": "ava" + "test": "pnpm test:dts && ava", + "test:dts": "tsc --build ./test-typings && tsc --build ./test-typings --clean" }, "files": [ "dist", diff --git a/packages/yaml/test-typings/cjs-node16/index.ts b/packages/yaml/test-typings/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/yaml/test-typings/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/yaml/test-typings/cjs-node16/package.json b/packages/yaml/test-typings/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/packages/yaml/test-typings/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/packages/yaml/test-typings/cjs-node16/tsconfig.json b/packages/yaml/test-typings/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/packages/yaml/test-typings/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/yaml/test-typings/esm-node16/index.ts b/packages/yaml/test-typings/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/yaml/test-typings/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/yaml/test-typings/esm-node16/package.json b/packages/yaml/test-typings/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/packages/yaml/test-typings/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/packages/yaml/test-typings/esm-node16/tsconfig.json b/packages/yaml/test-typings/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/packages/yaml/test-typings/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/yaml/test-typings/node10-commonjs/index.ts b/packages/yaml/test-typings/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/yaml/test-typings/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/yaml/test-typings/node10-commonjs/tsconfig.json b/packages/yaml/test-typings/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/packages/yaml/test-typings/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/yaml/test-typings/node10-esnext/index.ts b/packages/yaml/test-typings/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/packages/yaml/test-typings/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/packages/yaml/test-typings/node10-esnext/tsconfig.json b/packages/yaml/test-typings/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/packages/yaml/test-typings/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/packages/yaml/test-typings/node_modules/current-package b/packages/yaml/test-typings/node_modules/current-package new file mode 120000 index 000000000..711a69242 --- /dev/null +++ b/packages/yaml/test-typings/node_modules/current-package @@ -0,0 +1 @@ +/home/stephan/Dev/zz_forks/rollup-plugins/packages/yaml \ No newline at end of file diff --git a/packages/yaml/test-typings/tsconfig.json b/packages/yaml/test-typings/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/packages/yaml/test-typings/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +} diff --git a/shared/test-typings-template/cjs-node16/index.ts b/shared/test-typings-template/cjs-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/shared/test-typings-template/cjs-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/shared/test-typings-template/cjs-node16/package.json b/shared/test-typings-template/cjs-node16/package.json new file mode 100644 index 000000000..5bbefffba --- /dev/null +++ b/shared/test-typings-template/cjs-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +} diff --git a/shared/test-typings-template/cjs-node16/tsconfig.json b/shared/test-typings-template/cjs-node16/tsconfig.json new file mode 100644 index 000000000..be7957356 --- /dev/null +++ b/shared/test-typings-template/cjs-node16/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node16", + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/shared/test-typings-template/esm-node16/index.ts b/shared/test-typings-template/esm-node16/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/shared/test-typings-template/esm-node16/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/shared/test-typings-template/esm-node16/package.json b/shared/test-typings-template/esm-node16/package.json new file mode 100644 index 000000000..3dbc1ca59 --- /dev/null +++ b/shared/test-typings-template/esm-node16/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/shared/test-typings-template/esm-node16/tsconfig.json b/shared/test-typings-template/esm-node16/tsconfig.json new file mode 100644 index 000000000..66f48fc06 --- /dev/null +++ b/shared/test-typings-template/esm-node16/tsconfig.json @@ -0,0 +1,10 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "module": "Node16", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/shared/test-typings-template/node10-commonjs/index.ts b/shared/test-typings-template/node10-commonjs/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/shared/test-typings-template/node10-commonjs/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/shared/test-typings-template/node10-commonjs/tsconfig.json b/shared/test-typings-template/node10-commonjs/tsconfig.json new file mode 100644 index 000000000..6499170a7 --- /dev/null +++ b/shared/test-typings-template/node10-commonjs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "CommonJS", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/shared/test-typings-template/node10-esnext/index.ts b/shared/test-typings-template/node10-esnext/index.ts new file mode 100644 index 000000000..91eeaa945 --- /dev/null +++ b/shared/test-typings-template/node10-esnext/index.ts @@ -0,0 +1,3 @@ +import currentPackage from 'current-package'; + +currentPackage(); diff --git a/shared/test-typings-template/node10-esnext/tsconfig.json b/shared/test-typings-template/node10-esnext/tsconfig.json new file mode 100644 index 000000000..61daac90a --- /dev/null +++ b/shared/test-typings-template/node10-esnext/tsconfig.json @@ -0,0 +1,11 @@ +{ + "include": ["./index.ts"], + "compilerOptions": { + "moduleResolution": "Node", + "module": "ESNext", + "composite": true, + "tsBuildInfoFile": "output/.tsbuildinfo", + "skipLibCheck": true, + "noEmit": true + } +} diff --git a/shared/test-typings-template/tsconfig.json b/shared/test-typings-template/tsconfig.json new file mode 100644 index 000000000..72e215ae2 --- /dev/null +++ b/shared/test-typings-template/tsconfig.json @@ -0,0 +1,9 @@ +{ + "files": [], + "references": [ + { "path": "./esm-node16" }, + { "path": "./cjs-node16" }, + { "path": "./node10-esnext" }, + { "path": "./node10-commonjs" } + ] +}