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