@pkgr/core 0.2.4 → 0.2.5

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/lib/constants.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { createRequire } from 'node:module';
2
2
  export const CWD = process.cwd();
3
- export const cjsRequire = typeof require === 'undefined' ? createRequire(import.meta.url) : require;
3
+ const importMetaUrl = import.meta.url;
4
+ export const cjsRequire = importMetaUrl
5
+ ? createRequire(importMetaUrl)
6
+ : require;
4
7
  export const EVAL_FILENAMES = new Set(['[eval]', '[worker eval]']);
5
8
  export const EXTENSIONS = ['.ts', '.tsx', ...Object.keys(cjsRequire.extensions)];
6
9
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AAMhC,MAAM,CAAC,MAAM,UAAU,GACrB,OAAO,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAE3E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;AAGlE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAA;AAMhC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAA;AAErC,MAAM,CAAC,MAAM,UAAU,GAAe,aAAa;IACjD,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC;IAC9B,CAAC,CAAC,OAAO,CAAA;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAA;AAGlE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA"}
package/lib/index.cjs CHANGED
@@ -6,7 +6,8 @@ var path = require('node:path');
6
6
 
7
7
  const import_meta = {};
8
8
  const CWD = process.cwd();
9
- const cjsRequire = typeof require === "undefined" ? node_module.createRequire(import_meta.url) : require;
9
+ const importMetaUrl = import_meta.url;
10
+ const cjsRequire = importMetaUrl ? node_module.createRequire(importMetaUrl) : require;
10
11
  const EVAL_FILENAMES = /* @__PURE__ */ new Set(["[eval]", "[worker eval]"]);
11
12
  const EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire.extensions)];
12
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkgr/core",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "description": "Shared core module for `@pkgr` packages or any package else",
6
6
  "repository": "git+https://github.com/un-ts/pkgr.git",