@mediatool/frontend-tools 1.1.0 → 1.2.1

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.
@@ -0,0 +1 @@
1
+ export { assert, expect } from 'chai';
package/dist/react.js ADDED
@@ -0,0 +1 @@
1
+ export * from '@testing-library/react';
package/dist/utils.js ADDED
@@ -0,0 +1,29 @@
1
+ import { expect, assert } from 'chai';
2
+ import * as react$1 from '@testing-library/react';
3
+
4
+ function _mergeNamespaces(n, m) {
5
+ m.forEach(function (e) {
6
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
7
+ if (k !== 'default' && !(k in n)) {
8
+ var d = Object.getOwnPropertyDescriptor(e, k);
9
+ Object.defineProperty(n, k, d.get ? d : {
10
+ enumerable: true,
11
+ get: function () { return e[k]; }
12
+ });
13
+ }
14
+ });
15
+ });
16
+ return Object.freeze(n);
17
+ }
18
+
19
+ var assertions = /*#__PURE__*/Object.freeze({
20
+ __proto__: null,
21
+ expect: expect,
22
+ assert: assert
23
+ });
24
+
25
+ var react = /*#__PURE__*/_mergeNamespaces({
26
+ __proto__: null
27
+ }, [react$1]);
28
+
29
+ export { assertions, react };
@@ -0,0 +1 @@
1
+ export { expect, assert } from 'chai'
@@ -0,0 +1,2 @@
1
+ export * as assertions from './assertions'
2
+ export * as react from './react'
@@ -0,0 +1 @@
1
+ export * from '@testing-library/react'
package/package.json CHANGED
@@ -1,10 +1,16 @@
1
1
  {
2
2
  "name": "@mediatool/frontend-tools",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Common configs and tooling for bundling, testing, linting frontend modules",
5
- "main": "index.js",
6
5
  "license": "UNLICENSED",
7
6
  "type": "module",
7
+ "main": "./dist/utils.js",
8
+ "exports": {
9
+ ".": "./dist/utils.js",
10
+ "./assertions": "./dist/assertions.js",
11
+ "./react": "./dist/react.js",
12
+ "./lib/test/setup-mocha.cjs": "./lib/test/setup-mocha.cjs"
13
+ },
8
14
  "scripts": {
9
15
  "build": "rm -rf dist && rollup -c rollup.config.js",
10
16
  "test": "echo 'Testless'",
@@ -21,7 +27,6 @@
21
27
  "@babel/register": "^7.18.9",
22
28
  "@mediatool/eslint-config-mediatool": "^1.1.10",
23
29
  "@testing-library/react": "^13.3.0",
24
- "@testing-library/react-hooks": "^8.0.1",
25
30
  "@testing-library/user-event": "^14.3.0",
26
31
  "@types/chai": "^4.3.1",
27
32
  "@types/mocha": "^9.1.1",
package/rollup.config.js CHANGED
@@ -1,8 +1,31 @@
1
- export default {
2
- input: 'lib/cli.js',
3
- output: {
4
- file: 'dist/mtft.cjs',
5
- format: 'cjs',
6
- banner: '#!/usr/bin/env node',
7
- },
8
- }
1
+ export default [
2
+ {
3
+ input: 'lib/cli.js',
4
+ output: {
5
+ file: 'dist/mtft.cjs',
6
+ format: 'cjs',
7
+ banner: '#!/usr/bin/env node',
8
+ },
9
+ },
10
+ {
11
+ input: 'lib/utils/index.js',
12
+ output: {
13
+ file: 'dist/utils.js',
14
+ format: 'es',
15
+ },
16
+ },
17
+ {
18
+ input: 'lib/utils/assertions.js',
19
+ output: {
20
+ file: 'dist/assertions.js',
21
+ format: 'es',
22
+ },
23
+ },
24
+ {
25
+ input: 'lib/utils/react.js',
26
+ output: {
27
+ file: 'dist/react.js',
28
+ format: 'es',
29
+ },
30
+ },
31
+ ]