@brillout/test-e2e 0.5.30 → 0.5.31

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/bin.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require('./dist/cli.js')
2
+ import './dist/cli.js'
package/dist/editFile.js CHANGED
@@ -5,6 +5,8 @@ import fs from 'fs';
5
5
  import path from 'path';
6
6
  import { assert } from './utils.js';
7
7
  import { getCurrentTest } from './getCurrentTest.js';
8
+ import { createRequire } from 'module';
9
+ const require_ = createRequire(import.meta.url);
8
10
  const filesContentOriginal = {};
9
11
  function editFile(filePathRelative, replacer) {
10
12
  const filePath = getFilePath(filePathRelative);
@@ -38,6 +40,6 @@ function editFileAssertReverted() {
38
40
  function getFilePath(filePathRelative) {
39
41
  const { testFile } = getCurrentTest();
40
42
  const cwd = path.dirname(testFile);
41
- const filePath = require.resolve(filePathRelative, { paths: [cwd] });
43
+ const filePath = require_.resolve(filePathRelative, { paths: [cwd] });
42
44
  return filePath;
43
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/test-e2e",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "bin": "./bin.js",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",