@contrast/esm-hooks 2.28.2 → 2.30.0

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.
@@ -18,14 +18,7 @@ import M from 'node:module';
18
18
  import { fileURLToPath } from 'node:url';
19
19
  import { findPackageJson } from '@contrast/find-package-json';
20
20
  import { primordials } from '@contrast/common';
21
- const { StringPrototypeSlice, JSONParse } = primordials;
22
-
23
- const isBuiltin = M.isBuiltin || function(pathname) {
24
- if (pathname.startsWith('node:')) {
25
- pathname = StringPrototypeSlice.call(pathname, 5);
26
- }
27
- return M.builtinModules.includes(pathname);
28
- };
21
+ const { JSONParse } = primordials;
29
22
 
30
23
  /** @typedef { 'builtin' | 'commonjs' | 'module' } Format */
31
24
 
@@ -41,7 +34,7 @@ export async function getFileType(filename, stopAt) {
41
34
  // already a path or node: url
42
35
  }
43
36
 
44
- if (isBuiltin(filename)) {
37
+ if (M.isBuiltin(filename)) {
45
38
  return 'builtin';
46
39
  }
47
40
 
@@ -45,10 +45,12 @@ export const {
45
45
  lutimes,
46
46
  realpath,
47
47
  mkdtemp,
48
+ mkdtempDisposable,
48
49
  writeFile,
49
50
  appendFile,
50
51
  readFile,
51
52
  watch,
52
53
  constants,
53
54
  glob,
55
+ Utf8Stream,
54
56
  } = promises;
@@ -67,6 +67,8 @@ export const {
67
67
  mkdirSync,
68
68
  mkdtemp,
69
69
  mkdtempSync,
70
+ mkdtempDisposable,
71
+ mkdtempDisposableSync,
70
72
  open,
71
73
  openSync,
72
74
  openAsBlob,
@@ -115,6 +117,7 @@ export const {
115
117
  WriteStream,
116
118
  FileReadStream,
117
119
  FileWriteStream,
120
+ Utf8Stream,
118
121
  _toUnixTimestamp,
119
122
  Dir,
120
123
  opendir,
@@ -58,6 +58,7 @@ export const {
58
58
  parseArgs,
59
59
  parseEnv,
60
60
  promisify,
61
+ setTraceSigInt,
61
62
  stripVTControlCharacters,
62
63
  styleText,
63
64
  toUSVString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/esm-hooks",
3
- "version": "2.28.2",
3
+ "version": "2.30.0",
4
4
  "type": "module",
5
5
  "description": "Support for loading and instrumenting ECMAScript modules",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -16,17 +16,17 @@
16
16
  "types": "lib/index.d.ts",
17
17
  "engines": {
18
18
  "npm": ">=6.13.7 <7 || >= 8.3.1",
19
- "node": ">= 16.9.1"
19
+ "node": ">= 18.7.0"
20
20
  },
21
21
  "scripts": {
22
22
  "test": "bash ../scripts/test.sh"
23
23
  },
24
24
  "dependencies": {
25
- "@contrast/common": "1.34.2",
26
- "@contrast/config": "1.49.2",
27
- "@contrast/core": "1.54.2",
25
+ "@contrast/common": "1.36.0",
26
+ "@contrast/config": "1.51.0",
27
+ "@contrast/core": "1.56.0",
28
28
  "@contrast/find-package-json": "^1.1.0",
29
- "@contrast/logger": "1.27.2",
30
- "@contrast/rewriter": "1.30.2"
29
+ "@contrast/logger": "1.29.0",
30
+ "@contrast/rewriter": "1.32.0"
31
31
  }
32
32
  }