@float.js/core 2.2.2 → 2.2.3

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/dist/cli/index.js CHANGED
@@ -1,12 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
4
  var __esm = (fn, res) => function __init() {
11
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
6
  };
@@ -1065,6 +1059,7 @@ import { Writable } from "stream";
1065
1059
  // src/build/transform.ts
1066
1060
  init_esm_shims();
1067
1061
  import * as esbuild from "esbuild";
1062
+ import crypto2 from "crypto";
1068
1063
  import fs2 from "fs";
1069
1064
  import path4 from "path";
1070
1065
  import { pathToFileURL } from "url";
@@ -1249,7 +1244,7 @@ async function transformFile(filePath, useCache = true) {
1249
1244
  if (useCache) {
1250
1245
  const cache = getCache();
1251
1246
  const source2 = fs2.readFileSync(absolutePath, "utf-8");
1252
- const sourceHash = __require("crypto").createHash("sha256").update(source2).digest("hex").slice(0, 16);
1247
+ const sourceHash = crypto2.createHash("sha256").update(source2).digest("hex").slice(0, 16);
1253
1248
  const cacheKey = `transform_${absolutePath}_${sourceHash}`;
1254
1249
  if (cache.has(cacheKey)) {
1255
1250
  const cachedCode = cache.get(cacheKey);
@@ -1301,7 +1296,7 @@ async function transformFile(filePath, useCache = true) {
1301
1296
  moduleCache.set(absolutePath, { module, mtime });
1302
1297
  if (useCache) {
1303
1298
  const cache = getCache();
1304
- const sourceHash = __require("crypto").createHash("sha256").update(source).digest("hex").slice(0, 16);
1299
+ const sourceHash = crypto2.createHash("sha256").update(source).digest("hex").slice(0, 16);
1305
1300
  const cacheKey = `transform_${absolutePath}_${sourceHash}`;
1306
1301
  cache.set(cacheKey, code, source);
1307
1302
  }