hero-editor 1.17.0 → 2.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hero-editor",
3
- "version": "1.17.0",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "main": "dist/lib.js",
6
6
  "scripts": {
@@ -13,15 +13,16 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "devDependencies": {
16
- "@babel/core": "^7.10.2",
17
- "@babel/preset-env": "^7.10.2",
18
- "@babel/preset-react": "^7.10.1",
16
+ "@babel/core": "^7.26.0",
17
+ "@babel/preset-env": "^7.26.0",
18
+ "@babel/preset-react": "^7.25.9",
19
19
  "@testing-library/react": "^10.2.1",
20
20
  "@testing-library/react-hooks": "^3.3.0",
21
21
  "@webpack-cli/serve": "^2.0.5",
22
- "babel-jest": "^26.0.1",
23
- "babel-loader": "^8.1.0",
24
- "jest": "^26.0.1",
22
+ "babel-jest": "^29.7.0",
23
+ "babel-loader": "^9.2.1",
24
+ "jest": "^29.7.0",
25
+ "jest-environment-jsdom": "^29.7.0",
25
26
  "react": "^16.13.1",
26
27
  "react-dom": "^16.13.1",
27
28
  "react-test-renderer": "^16.13.1",
@@ -40,5 +41,8 @@
40
41
  "peerDependencies": {
41
42
  "react": "^16.13.1",
42
43
  "react-dom": "^16.13.1"
44
+ },
45
+ "jest": {
46
+ "testEnvironment": "jsdom"
43
47
  }
44
48
  }
@@ -1,3 +1,6 @@
1
- const apply = (args = []) => (func) => func(...args);
1
+ const apply =
2
+ (args = []) =>
3
+ (func) =>
4
+ func(...args);
2
5
 
3
6
  export default apply;
@@ -1,4 +1,6 @@
1
- const compose = (...funcs) => (arg) =>
2
- funcs.reduceRight((composed, f) => (f ? f(composed) : composed), arg);
1
+ const compose =
2
+ (...funcs) =>
3
+ (arg) =>
4
+ funcs.reduceRight((composed, f) => (f ? f(composed) : composed), arg);
3
5
 
4
6
  export default compose;
@@ -1,4 +1,6 @@
1
- const flow = (...funcs) => (arg) =>
2
- funcs.reduce((composed, f) => (f ? f(composed) : composed), arg);
1
+ const flow =
2
+ (...funcs) =>
3
+ (arg) =>
4
+ funcs.reduce((composed, f) => (f ? f(composed) : composed), arg);
3
5
 
4
6
  export default flow;
@@ -1,5 +1,13 @@
1
1
  // lmao
2
2
  const y = (f) =>
3
- ((g) => (...a) => f(g(g))(...a))((g) => (...a) => f(g(g))(...a));
3
+ (
4
+ (g) =>
5
+ (...a) =>
6
+ f(g(g))(...a)
7
+ )(
8
+ (g) =>
9
+ (...a) =>
10
+ f(g(g))(...a),
11
+ );
4
12
 
5
13
  export default y;
@@ -1,7 +1,5 @@
1
1
  import React from 'react';
2
2
  import { Text } from 'slate';
3
- import isUrl from 'is-url';
4
- import getUrl from '../helpers/getUrl';
5
3
  import y from '../helpers/why';
6
4
  import { getUrlFromNode } from '../helpers';
7
5