@mediatool/frontend-tools 1.2.1 → 1.2.3

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/dist/mtft.cjs CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  var commander = require('commander');
5
5
  var vite = require('vite');
6
- var promises = require('node:fs/promises');
7
- var node_path = require('node:path');
6
+ var promises = require('fs/promises');
7
+ var path = require('path');
8
8
  var ramda = require('ramda');
9
9
  var Mocha = require('mocha/lib/mocha.js');
10
10
  var runHelpers_js = require('mocha/lib/cli/run-helpers.js');
@@ -15,8 +15,8 @@ var Mocha__default = /*#__PURE__*/_interopDefaultLegacy(Mocha);
15
15
 
16
16
  async function getModuleContext () {
17
17
  const location = process.cwd();
18
- const pkgLocation = node_path.resolve(location, './package.json');
19
- const entryLocation = node_path.resolve(location, './index.js');
18
+ const pkgLocation = path.resolve(location, './package.json');
19
+ const entryLocation = path.resolve(location, './index.js');
20
20
 
21
21
  try {
22
22
  await promises.stat(pkgLocation);
@@ -72,9 +72,9 @@ function build (type) {
72
72
 
73
73
  const extensions = '{js,jsx,ts,tsx}';
74
74
  const types = {
75
- all: `./{,!(node_modules)/**}/*-test.${extensions}`,
76
- unit: `./{,!(node_modules)/**}/test/unit/*-test.${extensions}`,
77
- it: `./{,!(node_modules)/**}/test/it/*-test.${extensions}`,
75
+ all: `./{,!(node_modules)/**}/**/*-test.${extensions}`,
76
+ unit: `./{,!(node_modules)/**}/test/unit/**/*-test.${extensions}`,
77
+ it: `./{,!(node_modules)/**}/test/it/**/*-test.${extensions}`,
78
78
  };
79
79
 
80
80
  async function test (typeOrSpec, options) {
@@ -1,5 +1,5 @@
1
- import { readFile, stat } from 'node:fs/promises'
2
- import { resolve } from 'node:path'
1
+ import { readFile, stat } from 'fs/promises'
2
+ import { resolve } from 'path'
3
3
  // eslint-disable-next-line import/no-extraneous-dependencies
4
4
  import { keys, uniq } from 'ramda'
5
5
 
package/lib/test/index.js CHANGED
@@ -3,9 +3,9 @@ import { handleRequires, runMocha } from 'mocha/lib/cli/run-helpers.js'
3
3
 
4
4
  const extensions = '{js,jsx,ts,tsx}'
5
5
  const types = {
6
- all: `./{,!(node_modules)/**}/*-test.${extensions}`,
7
- unit: `./{,!(node_modules)/**}/test/unit/*-test.${extensions}`,
8
- it: `./{,!(node_modules)/**}/test/it/*-test.${extensions}`,
6
+ all: `./{,!(node_modules)/**}/**/*-test.${extensions}`,
7
+ unit: `./{,!(node_modules)/**}/test/unit/**/*-test.${extensions}`,
8
+ it: `./{,!(node_modules)/**}/test/it/**/*-test.${extensions}`,
9
9
  }
10
10
 
11
11
  export default async function test (typeOrSpec, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediatool/frontend-tools",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Common configs and tooling for bundling, testing, linting frontend modules",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -20,23 +20,23 @@
20
20
  "mtft": "./dist/mtft.cjs"
21
21
  },
22
22
  "dependencies": {
23
- "@babel/core": "^7.18.9",
24
- "@babel/preset-env": "^7.18.9",
23
+ "@babel/core": "^7.20.2",
24
+ "@babel/preset-env": "^7.20.2",
25
25
  "@babel/preset-react": "^7.18.6",
26
26
  "@babel/preset-typescript": "^7.18.6",
27
27
  "@babel/register": "^7.18.9",
28
- "@mediatool/eslint-config-mediatool": "^1.1.10",
29
- "@testing-library/react": "^13.3.0",
30
- "@testing-library/user-event": "^14.3.0",
31
- "@types/chai": "^4.3.1",
32
- "@types/mocha": "^9.1.1",
33
- "@vitejs/plugin-react": "^2.1.0",
34
- "chai": "^4.3.6",
35
- "commander": "^9.4.0",
36
- "global-jsdom": "^8.5.0",
37
- "jsdom": "^20.0.0",
38
- "mocha": "^10.0.0",
39
- "vite": "^3.1.0"
28
+ "@mediatool/eslint-config-mediatool": "^1.1.13",
29
+ "@testing-library/react": "^13.4.0",
30
+ "@testing-library/user-event": "^14.4.3",
31
+ "@types/chai": "^4.3.4",
32
+ "@types/mocha": "^10.0.0",
33
+ "@vitejs/plugin-react": "^2.2.0",
34
+ "chai": "^4.3.7",
35
+ "commander": "^9.4.1",
36
+ "global-jsdom": "^8.6.0",
37
+ "jsdom": "^20.0.2",
38
+ "mocha": "^10.1.0",
39
+ "vite": "^3.2.4"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": "^18.2.0",