detype 1.1.2 → 2.0.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
@@ -146,6 +146,10 @@ export async function removeMagicCommentsFromFile(
146
146
 
147
147
  ## Change log
148
148
 
149
+ ### 2.0
150
+
151
+ - BREAKING CHANGE: Drop support for Node < 20
152
+
149
153
  ### 1.0
150
154
 
151
155
  - BREAKING CHANGE: `removeMagicComments` is now async due to Prettier's API change
@@ -13,8 +13,6 @@ import {
13
13
  isComponentNode as isVueComponentNode
14
14
  } from "@vuedx/template-ast-types";
15
15
  import babelTs from "@babel/preset-typescript";
16
- import { shim } from "string.prototype.replaceall";
17
- shim();
18
16
  function getDefinePropsObject(content) {
19
17
  const matched = /\sprops:\s*\{/m.exec(content);
20
18
  if (matched) {
@@ -225,7 +223,7 @@ async function removeMagicComments(code, fileName, prettierOptions) {
225
223
  }
226
224
 
227
225
  // src/transformFile.ts
228
- import fs from "node:fs";
226
+ import fs from "fs";
229
227
  import { resolveConfig } from "prettier";
230
228
  var { readFile, writeFile } = fs.promises;
231
229
  async function transformFile(inputFileName, outputFileName, options = {}) {
package/dist/cli.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  removeMagicCommentsFromFile,
3
3
  transformFile
4
- } from "./chunk-ESFGC2T7.js";
4
+ } from "./chunk-VYED23Y7.js";
5
5
 
6
6
  // src/cli-lib.ts
7
- import fs from "node:fs";
8
- import path from "node:path";
7
+ import fs from "fs";
8
+ import path from "path";
9
9
  import fastGlob from "fast-glob";
10
10
 
11
11
  // package.json
12
12
  var package_default = {
13
13
  name: "detype",
14
- version: "1.1.2",
14
+ version: "2.0.0",
15
15
  description: "Removes TypeScript type annotations but keeps the formatting",
16
16
  type: "module",
17
17
  exports: {
@@ -44,27 +44,26 @@ var package_default = {
44
44
  "index.d.ts"
45
45
  ],
46
46
  dependencies: {
47
- "@babel/core": "^7.26.10",
48
- "@babel/preset-typescript": "^7.26.0",
49
- "@babel/traverse": "^7.26.10",
50
- "@vue/compiler-dom": "^3.5.13",
51
- "@vue/compiler-sfc": "^3.5.13",
47
+ "@babel/core": "^7.28.5",
48
+ "@babel/preset-typescript": "^7.28.5",
49
+ "@babel/traverse": "^7.28.5",
50
+ "@vue/compiler-dom": "^3.5.26",
51
+ "@vue/compiler-sfc": "^3.5.26",
52
52
  "@vuedx/compiler-sfc": "0.7.1",
53
53
  "@vuedx/template-ast-types": "0.7.1",
54
54
  "fast-glob": "^3.3.3",
55
- prettier: "^3.5.3",
56
- "string.prototype.replaceall": "^1.0.10"
55
+ prettier: "^3.7.4"
57
56
  },
58
57
  devDependencies: {
59
- "@cyco130/eslint-config": "^5.1.0",
58
+ "@cyco130/eslint-config": "^6.1.1",
60
59
  "@types/babel__core": "^7.20.5",
61
- "@types/babel__traverse": "^7.20.6",
62
- "@types/node": "22.13.10",
63
- eslint: "^9.22.0",
64
- rimraf: "^6.0.1",
65
- tsup: "^8.4.0",
66
- typescript: "^5.8.2",
67
- vitest: "3.0.8"
60
+ "@types/babel__traverse": "^7.28.0",
61
+ "@types/node": "25.0.3",
62
+ eslint: "^9.39.2",
63
+ rimraf: "^6.1.2",
64
+ tsup: "^8.5.1",
65
+ typescript: "^5.9.3",
66
+ vitest: "4.0.16"
68
67
  },
69
68
  repository: {
70
69
  type: "git",
@@ -83,7 +82,11 @@ var package_default = {
83
82
  },
84
83
  homepage: "https://github.com/cyco130/detype#readme",
85
84
  pnpm: {
86
- overrides: {}
85
+ overrides: {},
86
+ onlyBuiltDependencies: [
87
+ "esbuild",
88
+ "unrs-resolver"
89
+ ]
87
90
  }
88
91
  };
89
92
 
package/dist/index.cjs CHANGED
@@ -44,8 +44,6 @@ var import_compiler_sfc = require("@vuedx/compiler-sfc");
44
44
  var import_compiler_sfc2 = require("@vue/compiler-sfc");
45
45
  var import_template_ast_types = require("@vuedx/template-ast-types");
46
46
  var import_preset_typescript = __toESM(require("@babel/preset-typescript"), 1);
47
- var import_string_prototype = require("string.prototype.replaceall");
48
- (0, import_string_prototype.shim)();
49
47
  function getDefinePropsObject(content) {
50
48
  const matched = /\sprops:\s*\{/m.exec(content);
51
49
  if (matched) {
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  removeMagicCommentsFromFile,
4
4
  transform,
5
5
  transformFile
6
- } from "./chunk-ESFGC2T7.js";
6
+ } from "./chunk-VYED23Y7.js";
7
7
  export {
8
8
  removeMagicComments,
9
9
  removeMagicCommentsFromFile,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detype",
3
- "version": "1.1.2",
3
+ "version": "2.0.0",
4
4
  "description": "Removes TypeScript type annotations but keeps the formatting",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,27 +21,26 @@
21
21
  "index.d.ts"
22
22
  ],
23
23
  "dependencies": {
24
- "@babel/core": "^7.26.10",
25
- "@babel/preset-typescript": "^7.26.0",
26
- "@babel/traverse": "^7.26.10",
27
- "@vue/compiler-dom": "^3.5.13",
28
- "@vue/compiler-sfc": "^3.5.13",
24
+ "@babel/core": "^7.28.5",
25
+ "@babel/preset-typescript": "^7.28.5",
26
+ "@babel/traverse": "^7.28.5",
27
+ "@vue/compiler-dom": "^3.5.26",
28
+ "@vue/compiler-sfc": "^3.5.26",
29
29
  "@vuedx/compiler-sfc": "0.7.1",
30
30
  "@vuedx/template-ast-types": "0.7.1",
31
31
  "fast-glob": "^3.3.3",
32
- "prettier": "^3.5.3",
33
- "string.prototype.replaceall": "^1.0.10"
32
+ "prettier": "^3.7.4"
34
33
  },
35
34
  "devDependencies": {
36
- "@cyco130/eslint-config": "^5.1.0",
35
+ "@cyco130/eslint-config": "^6.1.1",
37
36
  "@types/babel__core": "^7.20.5",
38
- "@types/babel__traverse": "^7.20.6",
39
- "@types/node": "22.13.10",
40
- "eslint": "^9.22.0",
41
- "rimraf": "^6.0.1",
42
- "tsup": "^8.4.0",
43
- "typescript": "^5.8.2",
44
- "vitest": "3.0.8"
37
+ "@types/babel__traverse": "^7.28.0",
38
+ "@types/node": "25.0.3",
39
+ "eslint": "^9.39.2",
40
+ "rimraf": "^6.1.2",
41
+ "tsup": "^8.5.1",
42
+ "typescript": "^5.9.3",
43
+ "vitest": "4.0.16"
45
44
  },
46
45
  "repository": {
47
46
  "type": "git",