'deque',
'dequeue',
'dequeued',
+ 'dts',
'ecma',
'elu',
'enqueue',
## [Unreleased]
+### Added
+
+- Bundle typescript types declaration into one file.
+
## [2.6.37] - 2023-08-28
### Fixed
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-command": "^1.1.3",
"rollup-plugin-delete": "^2.0.0",
+ "rollup-plugin-dts": "^6.0.0",
"rome": "^12.1.3",
"sinon": "^15.2.0",
"source-map-support": "^0.5.21",
rollup-plugin-delete:
specifier: ^2.0.0
version: 2.0.0
+ rollup-plugin-dts:
+ specifier: ^6.0.0
+ version: 6.0.0(rollup@3.28.1)(typescript@5.2.2)
rome:
specifier: ^12.1.3
version: 12.1.3
/@babel/helper-validator-identifier@7.22.5:
resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==}
engines: {node: '>=6.9.0'}
+ requiresBuild: true
dev: true
/@babel/highlight@7.22.13:
resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==}
engines: {node: '>=6.9.0'}
+ requiresBuild: true
dependencies:
'@babel/helper-validator-identifier': 7.22.5
chalk: 2.4.2
/ansi-styles@3.2.1:
resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
engines: {node: '>=4'}
+ requiresBuild: true
dependencies:
color-convert: 1.9.3
dev: true
/chalk@2.4.2:
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
engines: {node: '>=4'}
+ requiresBuild: true
dependencies:
ansi-styles: 3.2.1
escape-string-regexp: 1.0.5
/color-convert@1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
+ requiresBuild: true
dependencies:
color-name: 1.1.3
dev: true
/color-name@1.1.3:
resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}
+ requiresBuild: true
dev: true
/color-name@1.1.4:
/escape-string-regexp@1.0.5:
resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
engines: {node: '>=0.8.0'}
+ requiresBuild: true
dev: true
/escape-string-regexp@2.0.0:
/has-flag@3.0.0:
resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
engines: {node: '>=4'}
+ requiresBuild: true
dev: true
/has-flag@4.0.0:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true
+ /magic-string@0.30.3:
+ resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==}
+ engines: {node: '>=12'}
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.4.15
+ dev: true
+
/make-dir@4.0.0:
resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
engines: {node: '>=10'}
del: 5.1.0
dev: true
+ /rollup-plugin-dts@6.0.0(rollup@3.28.1)(typescript@5.2.2):
+ resolution: {integrity: sha512-A996xSZDAqnx/KfFttzC8mDEuyMjsRpiLCrlGc8effhK8KhE3AG0g1woQiITgFc5HSE8HWU7ccR9CiQ3vXgUlQ==}
+ engines: {node: '>=v18.17.1'}
+ peerDependencies:
+ rollup: ^3.25.0
+ typescript: ^4.5 || ^5.0
+ dependencies:
+ magic-string: 0.30.3
+ rollup: 3.28.1
+ typescript: 5.2.2
+ optionalDependencies:
+ '@babel/code-frame': 7.22.13
+ dev: true
+
/rollup@3.28.1:
resolution: {integrity: sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
/supports-color@5.5.0:
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
+ requiresBuild: true
dependencies:
has-flag: 3.0.0
dev: true
import * as os from 'node:os'
+import { dts } from 'rollup-plugin-dts'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
import analyze from 'rollup-plugin-analyzer'
const maxWorkers = Math.floor(availableParallelism() / 2)
-export default {
- input: 'src/index.ts',
- strictDeprecations: true,
- output: [
- {
- format: 'cjs',
- ...(isDevelopmentBuild && {
- dir: 'lib',
- sourcemap: true,
- preserveModules: true,
- preserveModulesRoot: 'src'
+export default [
+ {
+ input: 'src/index.ts',
+ strictDeprecations: true,
+ output: [
+ {
+ format: 'cjs',
+ ...(isDevelopmentBuild && {
+ dir: 'lib',
+ sourcemap: true,
+ preserveModules: true,
+ preserveModulesRoot: 'src'
+ }),
+ ...(!isDevelopmentBuild && {
+ file: 'lib/index.js',
+ plugins: [terser({ maxWorkers })]
+ })
+ },
+ {
+ format: 'esm',
+ ...(isDevelopmentBuild && {
+ dir: 'lib',
+ sourcemap: true,
+ entryFileNames: '[name].mjs',
+ preserveModules: true,
+ preserveModulesRoot: 'src'
+ }),
+ ...(!isDevelopmentBuild && {
+ file: 'lib/index.mjs',
+ plugins: [terser({ maxWorkers })]
+ })
+ }
+ ],
+ external: [
+ 'node:async_hooks',
+ 'node:cluster',
+ 'node:crypto',
+ 'node:events',
+ 'node:fs',
+ 'node:os',
+ 'node:perf_hooks',
+ 'node:worker_threads'
+ ],
+ plugins: [
+ typescript({
+ tsconfig: isDevelopmentBuild
+ ? 'tsconfig.development.json'
+ : 'tsconfig.production.json'
}),
- ...(!isDevelopmentBuild && {
- file: 'lib/index.js',
- plugins: [terser({ maxWorkers })]
- })
- },
- {
- format: 'esm',
- ...(isDevelopmentBuild && {
- dir: 'lib',
- sourcemap: true,
- entryFileNames: '[name].mjs',
- preserveModules: true,
- preserveModulesRoot: 'src'
+ del({
+ targets: ['lib/*']
}),
- ...(!isDevelopmentBuild && {
- file: 'lib/index.mjs',
- plugins: [terser({ maxWorkers })]
+ isAnalyzeBuild && analyze(),
+ isDocumentationBuild && command('pnpm typedoc')
+ ]
+ },
+ {
+ input: './lib/dts/index.d.ts',
+ output: [{ format: 'esm', file: 'lib/index.d.ts' }],
+ external: [
+ 'node:async_hooks',
+ 'node:cluster',
+ 'node:events',
+ 'node:perf_hooks',
+ 'node:worker_threads'
+ ],
+ plugins: [
+ dts(),
+ del({
+ targets: ['lib/dts'],
+ hook: 'buildEnd'
})
- }
- ],
- external: [
- 'node:async_hooks',
- 'node:cluster',
- 'node:crypto',
- 'node:events',
- 'node:fs',
- 'node:os',
- 'node:perf_hooks',
- 'node:worker_threads'
- ],
- plugins: [
- typescript({
- tsconfig: isDevelopmentBuild
- ? 'tsconfig.development.json'
- : 'tsconfig.production.json'
- }),
- del({
- targets: ['lib/*']
- }),
- isAnalyzeBuild && analyze(),
- isDocumentationBuild && command('pnpm typedoc')
- ]
-}
+ ]
+ }
+]
"outDir": "lib",
"moduleResolution": "Node",
"declaration": true,
+ "declarationDir": "lib/dts",
"strict": true,
"verbatimModuleSyntax": true,
"forceConsistentCasingInFileNames": true