@danielx/civet 0.7.21 → 0.7.23

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.
@@ -47,6 +47,7 @@ var import_os = __toESM(require("os"));
47
47
  var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
48
48
 
49
49
  // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
50
+ var hasProp = {}.constructor.hasOwn;
50
51
  var DiagnosticCategory = {};
51
52
  DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
52
53
  DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
@@ -468,9 +469,16 @@ var rawPlugin = (options = {}, meta) => {
468
469
  import_path.default.basename(id.replace(/\.[jt]sx$/, "")),
469
470
  import_path.default.basename(id)
470
471
  ));
472
+ const blank = /* @__PURE__ */ Object.create(null);
473
+ for (const key in jsonSourceMap) {
474
+ if (!hasProp(jsonSourceMap, key))
475
+ continue;
476
+ const value = jsonSourceMap[key];
477
+ blank[key] = value;
478
+ }
471
479
  let transformed = {
472
480
  code: compiled.code,
473
- map: jsonSourceMap
481
+ map: blank
474
482
  };
475
483
  if (options.transformOutput) {
476
484
  transformed = await options.transformOutput(transformed.code, id);
@@ -15,6 +15,7 @@ import os from "os";
15
15
  var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
16
16
 
17
17
  // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
18
+ var hasProp = {}.constructor.hasOwn;
18
19
  var DiagnosticCategory = {};
19
20
  DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
20
21
  DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
@@ -436,9 +437,16 @@ var rawPlugin = (options = {}, meta) => {
436
437
  path.basename(id.replace(/\.[jt]sx$/, "")),
437
438
  path.basename(id)
438
439
  ));
440
+ const blank = /* @__PURE__ */ Object.create(null);
441
+ for (const key in jsonSourceMap) {
442
+ if (!hasProp(jsonSourceMap, key))
443
+ continue;
444
+ const value = jsonSourceMap[key];
445
+ blank[key] = value;
446
+ }
439
447
  let transformed = {
440
448
  code: compiled.code,
441
- map: jsonSourceMap
449
+ map: blank
442
450
  };
443
451
  if (options.transformOutput) {
444
452
  transformed = await options.transformOutput(transformed.code, id);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
3
  "type": "commonjs",
4
- "version": "0.7.21",
4
+ "version": "0.7.23",
5
5
  "description": "CoffeeScript style syntax for TypeScript",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/main.mjs",
@@ -11,7 +11,10 @@
11
11
  "require": "./dist/main.js",
12
12
  "types": "./dist/types.d.ts"
13
13
  },
14
- "./babel-plugin": "./dist/babel-plugin.mjs",
14
+ "./babel-plugin": {
15
+ "require": "./dist/babel-plugin.js",
16
+ "import": "./dist/babel-plugin.mjs"
17
+ },
15
18
  "./bun-civet": "./dist/bun-civet.mjs",
16
19
  "./esm": "./dist/esm.mjs",
17
20
  "./esbuild-plugin": "./dist/esbuild-plugin.js",
@@ -74,9 +77,10 @@
74
77
  "docs:dev": "yarn build && vitepress dev civet.dev",
75
78
  "docs:build": "yarn build && vitepress build civet.dev",
76
79
  "docs:preview": "yarn build && vitepress preview civet.dev",
77
- "prepublishOnly": "yarn build && yarn test",
80
+ "prepublishOnly": "yarn build && yarn test && yarn changelog",
78
81
  "test": "bash ./build/test.sh",
79
- "test:self": "yarn build && mocha --config .mocharc-self.json"
82
+ "test:self": "yarn build && mocha --config .mocharc-self.json",
83
+ "changelog": "civet build/changelog.civet"
80
84
  },
81
85
  "author": "Daniel X. Moore",
82
86
  "license": "MIT",