@mediatool/frontend-tools 1.3.6 → 1.4.2

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
@@ -9,6 +9,7 @@ var ramda = require('ramda');
9
9
  var module$1 = require('module');
10
10
  var child_process = require('child_process');
11
11
 
12
+ var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
12
13
  async function fileExists (location) {
13
14
  return promises.stat(location)
14
15
  .then(() => true)
@@ -82,7 +83,7 @@ function build (type) {
82
83
  return fn()
83
84
  }
84
85
 
85
- const require$1 = module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mtft.cjs', document.baseURI).href)));
86
+ const require$1 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('mtft.cjs', document.baseURI).href)));
86
87
  const mochaCliPath = require$1.resolve('mocha/lib/cli/cli.js');
87
88
  const requireFilePath = require$1.resolve('@mediatool/frontend-tools/lib/test/require.cjs');
88
89
 
package/dist/utils.js CHANGED
@@ -1,4 +1,4 @@
1
- import { expect, assert } from 'chai';
1
+ import { assert, expect } from 'chai';
2
2
  import * as react$1 from '@testing-library/react';
3
3
 
4
4
  function _mergeNamespaces(n, m) {
@@ -18,8 +18,8 @@ function _mergeNamespaces(n, m) {
18
18
 
19
19
  var assertions = /*#__PURE__*/Object.freeze({
20
20
  __proto__: null,
21
- expect: expect,
22
- assert: assert
21
+ assert: assert,
22
+ expect: expect
23
23
  });
24
24
 
25
25
  var react = /*#__PURE__*/_mergeNamespaces({
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line import/no-unresolved
1
2
  require('global-jsdom/register')
2
3
 
3
4
  if (typeof window !== 'undefined') {
@@ -7,11 +8,11 @@ if (typeof window !== 'undefined') {
7
8
  matches: false,
8
9
  media: query,
9
10
  onchange: null,
10
- addListener: function () {},
11
- removeListener: function() {},
12
- addEventListener: function() {},
13
- removeEventListener: function() {},
14
- dispatchEvent: function() { return true },
11
+ addListener () {},
12
+ removeListener () {},
13
+ addEventListener () {},
14
+ removeEventListener () {},
15
+ dispatchEvent () { return true },
15
16
  }
16
17
  }
17
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mediatool/frontend-tools",
3
- "version": "1.3.6",
3
+ "version": "1.4.2",
4
4
  "description": "Common configs and tooling for bundling, testing, linting frontend modules",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -12,16 +12,18 @@
12
12
  "./lib/test/require.cjs": "./lib/test/require.cjs"
13
13
  },
14
14
  "scripts": {
15
+ "preinstall": "npx only-allow pnpm",
15
16
  "build": "rm -rf dist && rollup -c rollup.config.js",
17
+ "lint": "eslint --max-warnings 0 lib",
16
18
  "test": "echo 'Testless'",
17
- "prepublishOnly": "yarn build"
19
+ "prepublishOnly": "pnpm run build"
18
20
  },
19
21
  "bin": {
20
22
  "mtft": "dist/mtft.cjs"
21
23
  },
22
24
  "dependencies": {
23
25
  "@babel/preset-react": "^7.18.6",
24
- "@mediatool/eslint-config-mediatool": "^1.1.13",
26
+ "@mediatool/eslint-config-mediatool": "^1.6.0",
25
27
  "@testing-library/react": "^13.4.0",
26
28
  "@testing-library/user-event": "^14.4.3",
27
29
  "@types/chai": "^4.3.4",
@@ -40,6 +42,7 @@
40
42
  "react-dom": "^18.2.0"
41
43
  },
42
44
  "devDependencies": {
43
- "ramda": "^0.28.0"
45
+ "ramda": "^0.28.0",
46
+ "rollup": "^4.21.2"
44
47
  }
45
48
  }