@mediatool/frontend-tools 1.3.3 → 1.3.5

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
@@ -97,7 +97,7 @@ async function test (typeOrSpec) {
97
97
  const spec = types[typeOrSpec] || typeOrSpec;
98
98
 
99
99
  const args = [
100
- '--loader=tsx',
100
+ '--import=tsx',
101
101
  mochaCliPath,
102
102
  spec,
103
103
  '--require',
package/lib/test/index.js CHANGED
@@ -16,7 +16,7 @@ export default async function test (typeOrSpec) {
16
16
  const spec = types[typeOrSpec] || typeOrSpec
17
17
 
18
18
  const args = [
19
- '--loader=tsx',
19
+ '--import=tsx',
20
20
  mochaCliPath,
21
21
  spec,
22
22
  '--require',
@@ -1,18 +1,22 @@
1
1
  require('global-jsdom/register')
2
2
 
3
- if (typeof window !== 'undefined' && !window.matchMedia) {
4
- window.matchMedia = function (query) {
5
- return {
6
- matches: false,
7
- media: query,
8
- onchange: null,
9
- addListener: function () {},
10
- removeListener: function() {},
11
- addEventListener: function() {},
12
- removeEventListener: function() {},
13
- dispatchEvent: function() { return true },
3
+ if (typeof window !== 'undefined') {
4
+ if (!window.matchMedia) {
5
+ window.matchMedia = function (query) {
6
+ return {
7
+ matches: false,
8
+ media: query,
9
+ onchange: null,
10
+ addListener: function () {},
11
+ removeListener: function() {},
12
+ addEventListener: function() {},
13
+ removeEventListener: function() {},
14
+ dispatchEvent: function() { return true },
15
+ }
14
16
  }
15
17
  }
18
+
19
+ global.CustomEvent = window.CustomEvent
16
20
  }
17
21
 
18
22
  require.extensions['.css'] = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediatool/frontend-tools",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Common configs and tooling for bundling, testing, linting frontend modules",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "prepublishOnly": "yarn build"
18
18
  },
19
19
  "bin": {
20
- "mtft": "./dist/mtft.cjs"
20
+ "mtft": "dist/mtft.cjs"
21
21
  },
22
22
  "dependencies": {
23
23
  "@babel/preset-react": "^7.18.6",
@@ -31,8 +31,8 @@
31
31
  "commander": "^9.4.1",
32
32
  "global-jsdom": "^8.6.0",
33
33
  "jsdom": "^20.0.2",
34
- "mocha": "^10.1.0",
35
- "tsx": "^3.12.7",
34
+ "mocha": "^10.3.0",
35
+ "tsx": "^4.7.1",
36
36
  "vite": "^3.2.4"
37
37
  },
38
38
  "peerDependencies": {