@pkgr/core 0.2.2 → 0.2.4

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.
@@ -4,4 +4,5 @@ export interface CjsRequire extends NodeJS.Require {
4
4
  <T>(id: string): T;
5
5
  }
6
6
  export declare const cjsRequire: CjsRequire;
7
+ export declare const EVAL_FILENAMES: Set<string>;
7
8
  export declare const EXTENSIONS: string[];
package/lib/constants.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { createRequire } from 'node:module';
2
2
  export const CWD = process.cwd();
3
3
  export const cjsRequire = typeof require === 'undefined' ? createRequire(import.meta.url) : require;
4
+ export const EVAL_FILENAMES = new Set(['[eval]', '[worker eval]']);
4
5
  export const EXTENSIONS = ['.ts', '.tsx', ...Object.keys(cjsRequire.extensions)];
5
6
  //# 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;AAG3E,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,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"}
package/lib/index.cjs CHANGED
@@ -7,6 +7,7 @@ var path = require('node:path');
7
7
  const import_meta = {};
8
8
  const CWD = process.cwd();
9
9
  const cjsRequire = typeof require === "undefined" ? node_module.createRequire(import_meta.url) : require;
10
+ const EVAL_FILENAMES = /* @__PURE__ */ new Set(["[eval]", "[worker eval]"]);
10
11
  const EXTENSIONS = [".ts", ".tsx", ...Object.keys(cjsRequire.extensions)];
11
12
 
12
13
  const tryPkg = (pkg) => {
@@ -57,6 +58,7 @@ const findUp = (searchEntry, searchFileOrIncludeDir, includeDir) => {
57
58
  };
58
59
 
59
60
  exports.CWD = CWD;
61
+ exports.EVAL_FILENAMES = EVAL_FILENAMES;
60
62
  exports.EXTENSIONS = EXTENSIONS;
61
63
  exports.cjsRequire = cjsRequire;
62
64
  exports.findUp = findUp;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@pkgr/core",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
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",
7
7
  "homepage": "https://github.com/un-ts/pkgr/blob/master/packages/core",
8
8
  "author": "JounQin <admin@1stg.me> (https://www.1stG.me)",
9
- "funding": "https://opencollective.com/unts",
9
+ "funding": "https://opencollective.com/pkgr",
10
10
  "license": "MIT",
11
11
  "engines": {
12
12
  "node": "^12.20.0 || ^14.18.0 || >=16.0.0"
@@ -20,10 +20,6 @@
20
20
  "types": "./lib/index.d.ts",
21
21
  "default": "./lib/index.js"
22
22
  },
23
- "module-sync": {
24
- "types": "./lib/index.d.ts",
25
- "default": "./lib/index.js"
26
- },
27
23
  "require": {
28
24
  "types": "./index.d.cts",
29
25
  "default": "./lib/index.cjs"