@contrast/esm-hooks 1.22.0 → 1.23.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.
Files changed (2) hide show
  1. package/lib/index.mjs +2 -4
  2. package/package.json +2 -2
package/lib/index.mjs CHANGED
@@ -15,11 +15,10 @@
15
15
 
16
16
  import { promises as fs } from 'fs';
17
17
  import { fileURLToPath } from 'url';
18
- import initCore from '@contrast/core';
19
18
  import getType from './get-file-type.mjs';
20
19
 
21
- export default function (core = initCore()) {
22
- const esmHooks = {
20
+ export default function (core) {
21
+ core.esmHooks = {
23
22
  async getSource(url, context, defaultGetSource) {
24
23
  const filename = fileURLToPath(url);
25
24
  core.logger.trace('getSource %s', filename);
@@ -84,6 +83,5 @@ export default function (core = initCore()) {
84
83
  }
85
84
  };
86
85
 
87
- core.esmHooks = esmHooks;
88
86
  return core.esmHooks;
89
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/esm-hooks",
3
- "version": "1.22.0",
3
+ "version": "1.23.0",
4
4
  "type": "module",
5
5
  "description": "Support for loading and instrumenting ECMAScript modules",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -18,7 +18,7 @@
18
18
  "test": "../scripts/test.sh"
19
19
  },
20
20
  "dependencies": {
21
- "@contrast/core": "1.26.0",
21
+ "@contrast/core": "1.27.0",
22
22
  "parent-package-json": "^2.0.1"
23
23
  }
24
24
  }