dtsroll 1.7.8 → 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 CHANGED
@@ -157,11 +157,11 @@ This is especially useful for:
157
157
 
158
158
  ### Vite plugin
159
159
 
160
- If you use `vite-plugin-dts`, _dtsroll_ will automatically bundle the emitted types immediately after generation:
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 'vite-plugin-dts'
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-CwhQAGPV.mjs';
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.7.8";
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, resolvedCompilerOptions, ts.sys);
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
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import 'node:path';
3
- export { d as dtsroll } from './index-CwhQAGPV.mjs';
3
+ export { d as dtsroll } from './index-BsSgZDr9.mjs';
4
4
  import 'node:fs/promises';
5
5
  import 'rollup';
6
6
  import 'typescript';
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 vite-plugin-dts in the writeBundle hook.
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
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { d as dtsroll, l as logOutput } from './index-CwhQAGPV.mjs';
2
+ import { d as dtsroll, l as logOutput } from './index-BsSgZDr9.mjs';
3
3
  import 'node:path';
4
4
  import 'node:fs/promises';
5
5
  import 'rollup';
@@ -20,7 +20,7 @@ const dtsrollPlugin = (options) => {
20
20
  name: "dtsroll",
21
21
  apply: "build",
22
22
  enforce: "post",
23
- config: ({ root, logLevel }) => {
23
+ configResolved: ({ root, logLevel }) => {
24
24
  cwd = root;
25
25
  noLog = logLevel === "silent";
26
26
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtsroll",
3
- "version": "1.7.8",
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": {