detype 0.6.1 → 0.6.2

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.
Files changed (3) hide show
  1. package/dist/cli.js +16 -16
  2. package/dist/index.js +1 -1
  3. package/package.json +15 -15
package/dist/cli.js CHANGED
@@ -40,7 +40,7 @@ async function transform(code, fileName, options = {}) {
40
40
  const originalFileName = fileName;
41
41
  code = code.replaceAll("\r\n", "\n");
42
42
  if (fileName.endsWith(".vue")) {
43
- const parsedVue = (0, import_compiler_sfc.parse)(code, { filename: fileName });
43
+ const parsedVue = (0, import_compiler_sfc.parse)(code);
44
44
  if (((_a = parsedVue.descriptor.script) == null ? void 0 : _a.lang) !== "ts" && ((_b = parsedVue.descriptor.scriptSetup) == null ? void 0 : _b.lang) !== "ts") {
45
45
  return originalCode;
46
46
  }
@@ -230,7 +230,7 @@ var import_fast_glob = __toESM(require("fast-glob"));
230
230
  // package.json
231
231
  var package_default = {
232
232
  name: "detype",
233
- version: "0.6.1",
233
+ version: "0.6.2",
234
234
  description: "Removes TypeScript type annotations but keeps the formatting",
235
235
  main: "dist/index.js",
236
236
  bin: "detype.js",
@@ -246,7 +246,7 @@ var package_default = {
246
246
  "test:unit": "vitest run",
247
247
  "test:typecheck": "tsc -p tsconfig.json --noEmit",
248
248
  "test:lint": "eslint src --max-warnings 0",
249
- "test:prettier": "prettier --check --ignore-path .gitignore --ignore-unknown . '!pnpm-lock.yaml'",
249
+ "test:prettier": "prettier --check test-files --ignore-unknown . '!pnpm-lock.yaml'",
250
250
  format: "prettier . --write --ignore-path .gitignore --ignore-unknown . '!pnpm-lock.yaml'"
251
251
  },
252
252
  files: [
@@ -254,27 +254,27 @@ var package_default = {
254
254
  "index.d.ts"
255
255
  ],
256
256
  dependencies: {
257
- "@babel/core": "^7.19.6",
257
+ "@babel/core": "^7.20.5",
258
258
  "@babel/preset-typescript": "^7.18.6",
259
- "@vuedx/compiler-sfc": "^0.7.1",
260
- "@vuedx/template-ast-types": "^0.7.3",
259
+ "@vuedx/compiler-sfc": "0.7.1",
260
+ "@vuedx/template-ast-types": "0.7.1",
261
261
  "fast-glob": "^3.2.12",
262
- prettier: "^2.7.1",
263
- "string.prototype.replaceall": "^1.0.6"
262
+ prettier: "^2.8.0",
263
+ "string.prototype.replaceall": "^1.0.7"
264
264
  },
265
265
  devDependencies: {
266
- "@babel/traverse": "^7.19.6",
266
+ "@babel/traverse": "^7.20.5",
267
267
  "@cyco130/eslint-config": "^2.1.2",
268
- "@types/babel__core": "^7.1.19",
269
- "@types/babel__traverse": "^7.18.2",
270
- "@types/node": "18.11.4",
268
+ "@types/babel__core": "^7.1.20",
269
+ "@types/babel__traverse": "^7.18.3",
270
+ "@types/node": "18.11.11",
271
271
  "@types/prettier": "^2.7.1",
272
- eslint: "^8.26.0",
272
+ eslint: "^8.29.0",
273
273
  "npm-run-all": "^4.1.5",
274
274
  rimraf: "^3.0.2",
275
- tsup: "^6.3.0",
276
- typescript: "^4.8.4",
277
- vitest: "^0.24.3"
275
+ tsup: "^6.5.0",
276
+ typescript: "^4.9.3",
277
+ vitest: "0.25.5"
278
278
  },
279
279
  repository: {
280
280
  type: "git",
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ async function transform(code, fileName, options = {}) {
48
48
  const originalFileName = fileName;
49
49
  code = code.replaceAll("\r\n", "\n");
50
50
  if (fileName.endsWith(".vue")) {
51
- const parsedVue = (0, import_compiler_sfc.parse)(code, { filename: fileName });
51
+ const parsedVue = (0, import_compiler_sfc.parse)(code);
52
52
  if (((_a = parsedVue.descriptor.script) == null ? void 0 : _a.lang) !== "ts" && ((_b = parsedVue.descriptor.scriptSetup) == null ? void 0 : _b.lang) !== "ts") {
53
53
  return originalCode;
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detype",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Removes TypeScript type annotations but keeps the formatting",
5
5
  "main": "dist/index.js",
6
6
  "bin": "detype.js",
@@ -12,27 +12,27 @@
12
12
  "index.d.ts"
13
13
  ],
14
14
  "dependencies": {
15
- "@babel/core": "^7.19.6",
15
+ "@babel/core": "^7.20.5",
16
16
  "@babel/preset-typescript": "^7.18.6",
17
- "@vuedx/compiler-sfc": "^0.7.1",
18
- "@vuedx/template-ast-types": "^0.7.3",
17
+ "@vuedx/compiler-sfc": "0.7.1",
18
+ "@vuedx/template-ast-types": "0.7.1",
19
19
  "fast-glob": "^3.2.12",
20
- "prettier": "^2.7.1",
21
- "string.prototype.replaceall": "^1.0.6"
20
+ "prettier": "^2.8.0",
21
+ "string.prototype.replaceall": "^1.0.7"
22
22
  },
23
23
  "devDependencies": {
24
- "@babel/traverse": "^7.19.6",
24
+ "@babel/traverse": "^7.20.5",
25
25
  "@cyco130/eslint-config": "^2.1.2",
26
- "@types/babel__core": "^7.1.19",
27
- "@types/babel__traverse": "^7.18.2",
28
- "@types/node": "18.11.4",
26
+ "@types/babel__core": "^7.1.20",
27
+ "@types/babel__traverse": "^7.18.3",
28
+ "@types/node": "18.11.11",
29
29
  "@types/prettier": "^2.7.1",
30
- "eslint": "^8.26.0",
30
+ "eslint": "^8.29.0",
31
31
  "npm-run-all": "^4.1.5",
32
32
  "rimraf": "^3.0.2",
33
- "tsup": "^6.3.0",
34
- "typescript": "^4.8.4",
35
- "vitest": "^0.24.3"
33
+ "tsup": "^6.5.0",
34
+ "typescript": "^4.9.3",
35
+ "vitest": "0.25.5"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -58,7 +58,7 @@
58
58
  "test:unit": "vitest run",
59
59
  "test:typecheck": "tsc -p tsconfig.json --noEmit",
60
60
  "test:lint": "eslint src --max-warnings 0",
61
- "test:prettier": "prettier --check --ignore-path .gitignore --ignore-unknown . '!pnpm-lock.yaml'",
61
+ "test:prettier": "prettier --check test-files --ignore-unknown . '!pnpm-lock.yaml'",
62
62
  "format": "prettier . --write --ignore-path .gitignore --ignore-unknown . '!pnpm-lock.yaml'"
63
63
  }
64
64
  }