dtsroll 1.7.9 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/{index-CwhQAGPV.mjs → index-BsSgZDr9.mjs} +4 -8
- package/dist/index.mjs +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -157,11 +157,11 @@ This is especially useful for:
|
|
|
157
157
|
|
|
158
158
|
### Vite plugin
|
|
159
159
|
|
|
160
|
-
If you use `
|
|
160
|
+
If you use [`unplugin-dts`](https://github.com/qmhc/unplugin-dts), _dtsroll_ will automatically bundle the emitted types immediately after generation:
|
|
161
161
|
|
|
162
162
|
```ts
|
|
163
163
|
import { defineConfig } from 'vitest/config'
|
|
164
|
-
import dts from '
|
|
164
|
+
import dts from 'unplugin-dts/vite'
|
|
165
165
|
import { dtsroll } from 'dtsroll/vite'
|
|
166
166
|
|
|
167
167
|
export default defineConfig({
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { cli } from 'cleye';
|
|
3
|
-
import { b as bgYellow, a as black, d as dtsroll, l as logOutput } from './index-
|
|
3
|
+
import { b as bgYellow, a as black, d as dtsroll, l as logOutput } from './index-BsSgZDr9.mjs';
|
|
4
4
|
import { patchErrorWithTrace } from 'rollup-plugin-import-trace';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'node:fs/promises';
|
|
@@ -14,7 +14,7 @@ import 'resolve-pkg-maps';
|
|
|
14
14
|
import 'byte-size';
|
|
15
15
|
|
|
16
16
|
var name = "dtsroll";
|
|
17
|
-
var version = "1.
|
|
17
|
+
var version = "1.8.0";
|
|
18
18
|
var description = "Bundle dts files";
|
|
19
19
|
|
|
20
20
|
const argv = cli({
|
|
@@ -4453,7 +4453,10 @@ const plugin = (options = {}) => {
|
|
|
4453
4453
|
const resolvedSource = source.startsWith(".") ? path.resolve(path.dirname(importer), source) : source;
|
|
4454
4454
|
resolvedCompilerOptions = getCompilerOptions(resolvedSource, ctx.resolvedOptions.compilerOptions, ctx.resolvedOptions.tsconfig, ctx.resolvedOptions.sourcemap).compilerOptions;
|
|
4455
4455
|
}
|
|
4456
|
-
const { resolvedModule } = ts.resolveModuleName(source, importer,
|
|
4456
|
+
const { resolvedModule } = ts.resolveModuleName(source, importer, {
|
|
4457
|
+
moduleResolution: ts.ModuleResolutionKind.Node10,
|
|
4458
|
+
...resolvedCompilerOptions
|
|
4459
|
+
}, ts.sys);
|
|
4457
4460
|
if (!resolvedModule) {
|
|
4458
4461
|
return;
|
|
4459
4462
|
}
|
|
@@ -4652,13 +4655,6 @@ const build = async (input, outputDirectory, externals, mode, conditions, source
|
|
|
4652
4655
|
plugin({
|
|
4653
4656
|
respectExternal: true,
|
|
4654
4657
|
sourcemap
|
|
4655
|
-
/**
|
|
4656
|
-
* Setting a tsconfig or compilerOptions shouldn't be necessary since
|
|
4657
|
-
* we're dealing with pre-compiled d.ts files
|
|
4658
|
-
*
|
|
4659
|
-
* But may be something we need to support if we want to support
|
|
4660
|
-
* aliases in the future
|
|
4661
|
-
*/
|
|
4662
4658
|
})
|
|
4663
4659
|
]
|
|
4664
4660
|
};
|
package/dist/index.mjs
CHANGED
package/dist/vite.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import 'rollup';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Vite plugin for bundling TypeScript declaration files.
|
|
7
|
-
* Runs after
|
|
7
|
+
* Runs after unplugin-dts in the writeBundle hook.
|
|
8
8
|
*
|
|
9
9
|
* @param options - Configuration options (same as dtsroll function)
|
|
10
10
|
* @returns Vite plugin instance
|
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtsroll",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Bundle dts files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundle",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
|
+
"type": "module",
|
|
21
22
|
"bin": "./dist/cli.mjs",
|
|
22
23
|
"exports": {
|
|
23
24
|
".": {
|
|
@@ -31,7 +32,13 @@
|
|
|
31
32
|
},
|
|
32
33
|
"imports": {
|
|
33
34
|
"#dtsroll": "./src/index.ts",
|
|
34
|
-
"#dtsroll/vite": "./src/vite.ts"
|
|
35
|
+
"#dtsroll/vite": "./src/vite.ts",
|
|
36
|
+
"typescript": {
|
|
37
|
+
"typescript4": "typescript4",
|
|
38
|
+
"typescript5": "typescript5",
|
|
39
|
+
"typescript6": "typescript6",
|
|
40
|
+
"default": "typescript"
|
|
41
|
+
}
|
|
35
42
|
},
|
|
36
43
|
"engines": {
|
|
37
44
|
"node": ">=18"
|
|
@@ -47,7 +54,7 @@
|
|
|
47
54
|
"rollup-plugin-import-trace": "^1.0.1"
|
|
48
55
|
},
|
|
49
56
|
"peerDependencies": {
|
|
50
|
-
"typescript": "^4.5 || ^5.0",
|
|
57
|
+
"typescript": "^4.5 || ^5.0 || ^6.0",
|
|
51
58
|
"vite": "5 || 6 || 7"
|
|
52
59
|
},
|
|
53
60
|
"peerDependenciesMeta": {
|