@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/index.js CHANGED
@@ -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
  };
@@ -1069,6 +1063,7 @@ import { Writable } from "stream";
1069
1063
  // src/build/transform.ts
1070
1064
  init_esm_shims();
1071
1065
  import * as esbuild from "esbuild";
1066
+ import crypto2 from "crypto";
1072
1067
  import fs2 from "fs";
1073
1068
  import path4 from "path";
1074
1069
  import { pathToFileURL } from "url";
@@ -1253,7 +1248,7 @@ async function transformFile(filePath, useCache = true) {
1253
1248
  if (useCache) {
1254
1249
  const cache2 = getCache();
1255
1250
  const source2 = fs2.readFileSync(absolutePath, "utf-8");
1256
- const sourceHash = __require("crypto").createHash("sha256").update(source2).digest("hex").slice(0, 16);
1251
+ const sourceHash = crypto2.createHash("sha256").update(source2).digest("hex").slice(0, 16);
1257
1252
  const cacheKey = `transform_${absolutePath}_${sourceHash}`;
1258
1253
  if (cache2.has(cacheKey)) {
1259
1254
  const cachedCode = cache2.get(cacheKey);
@@ -1305,7 +1300,7 @@ async function transformFile(filePath, useCache = true) {
1305
1300
  moduleCache.set(absolutePath, { module, mtime });
1306
1301
  if (useCache) {
1307
1302
  const cache2 = getCache();
1308
- const sourceHash = __require("crypto").createHash("sha256").update(source).digest("hex").slice(0, 16);
1303
+ const sourceHash = crypto2.createHash("sha256").update(source).digest("hex").slice(0, 16);
1309
1304
  const cacheKey = `transform_${absolutePath}_${sourceHash}`;
1310
1305
  cache2.set(cacheKey, code, source);
1311
1306
  }