@modern-js/plugin-garfish 1.21.2 → 2.0.0-beta.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/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @modern-js/plugin-garfish
2
2
 
3
+ ## 2.0.0-beta.0
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [b18fa8f]
12
+ - Updated dependencies [c9e800d39]
13
+ - Updated dependencies [a2509bf]
14
+ - Updated dependencies [4369648ae]
15
+ - Updated dependencies [edd1cfb1a]
16
+ - Updated dependencies [cc971eabf]
17
+ - Updated dependencies [5b9049f]
18
+ - Updated dependencies [6bda14ed7]
19
+ - Updated dependencies [b8bbe036c]
20
+ - Updated dependencies [60d5378]
21
+ - Updated dependencies [d5a31df78]
22
+ - Updated dependencies [dda38c9]
23
+ - Updated dependencies [8b8e1bb57]
24
+ - Updated dependencies [3bbea92b2]
25
+ - Updated dependencies [fcace5b5b]
26
+ - Updated dependencies [abf3421]
27
+ - Updated dependencies [543be95]
28
+ - Updated dependencies [14b712d]
29
+ - @modern-js/runtime@2.0.0-beta.0
30
+ - @modern-js/utils@2.0.0-beta.0
31
+
3
32
  ## 1.21.2
4
33
 
5
34
  ### Patch Changes
@@ -15,7 +15,7 @@ import path from 'path';
15
15
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
16
16
 
17
17
  import Garfish from 'garfish';
18
- import { withRouter } from '@modern-js/runtime/router'; // import Loadable from 'react-loadable';
18
+ import { withRouter } from '@modern-js/plugin-router-legacy'; // import Loadable from 'react-loadable';
19
19
 
20
20
  import { logger, generateSubAppContainerKey } from "../../util";
21
21
  import { Loadable } from "../loadable";
@@ -11,7 +11,7 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _garfish = _interopRequireDefault(require("garfish"));
13
13
 
14
- var _router = require("@modern-js/runtime/router");
14
+ var _pluginRouterLegacy = require("@modern-js/plugin-router-legacy");
15
15
 
16
16
  var _util = require("../../util");
17
17
 
@@ -193,7 +193,7 @@ function getAppInstance(options, appInfo, manifest) {
193
193
 
194
194
  }
195
195
 
196
- return (0, _loadable.Loadable)((0, _router.withRouter)(MicroApp))(manifest === null || manifest === void 0 ? void 0 : manifest.loadable);
196
+ return (0, _loadable.Loadable)((0, _pluginRouterLegacy.withRouter)(MicroApp))(manifest === null || manifest === void 0 ? void 0 : manifest.loadable);
197
197
  }
198
198
 
199
199
  function generateApps(options, manifest) {
@@ -15,7 +15,7 @@ import path from 'path';
15
15
  import React from 'react'; // eslint-disable-next-line import/no-named-as-default
16
16
 
17
17
  import Garfish from 'garfish';
18
- import { withRouter } from '@modern-js/runtime/router'; // import Loadable from 'react-loadable';
18
+ import { withRouter } from '@modern-js/plugin-router-legacy'; // import Loadable from 'react-loadable';
19
19
 
20
20
  import { logger, generateSubAppContainerKey } from "../../util";
21
21
  import { Loadable } from "../loadable";
@@ -1,4 +1,5 @@
1
- import { RouteComponentProps } from '@modern-js/runtime/router';
1
+ /// <reference types="react" />
2
+ import { RouteComponentProps } from '@modern-js/plugin-router-legacy';
2
3
  import { LoadableConfig, MicroComponentProps } from './useModuleApps';
3
4
  export interface MicroProps extends RouteComponentProps {
4
5
  setLoadingState: (state: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import Garfish from 'garfish';
2
3
  import { Manifest, ModulesInfo } from '../useModuleApps';
3
4
  declare global {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.21.2",
14
+ "version": "2.0.0-beta.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/runtime/index.d.ts",
17
17
  "typesVersions": {
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/runtime": "^7.18.0",
53
- "@modern-js/utils": "1.21.2",
53
+ "@modern-js/utils": "2.0.0-beta.0",
54
54
  "@types/debug": "^4.1.7",
55
55
  "@types/react-loadable": "^5.5.6",
56
56
  "debug": "^4.3.2",
@@ -59,7 +59,7 @@
59
59
  "react-loadable": "^5.5.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@modern-js/runtime": "^1.21.2"
62
+ "@modern-js/runtime": "^2.0.0-beta.0"
63
63
  },
64
64
  "peerDependenciesMeta": {
65
65
  "@modern-js/runtime": {
@@ -67,23 +67,23 @@
67
67
  }
68
68
  },
69
69
  "devDependencies": {
70
- "@modern-js/core": "1.21.2",
71
- "@modern-js/runtime": "1.21.2",
72
- "@modern-js/types": "1.21.2",
73
- "@scripts/build": "1.21.2",
74
- "@scripts/jest-config": "1.21.2",
70
+ "@modern-js/core": "2.0.0-beta.0",
71
+ "@modern-js/runtime": "2.0.0-beta.0",
72
+ "@modern-js/plugin-router-legacy": "2.0.0-beta.0",
73
+ "@modern-js/types": "2.0.0-beta.0",
74
+ "@scripts/build": "2.0.0-beta.0",
75
+ "@scripts/jest-config": "2.0.0-beta.0",
75
76
  "@testing-library/jest-dom": "^5.16.1",
76
- "@testing-library/react": "^12.0.0",
77
- "@testing-library/react-hooks": "^7.0.1",
78
- "@testing-library/user-event": "^13.5.0",
79
- "@types/hoist-non-react-statics": "^3.3.1",
77
+ "@testing-library/react": "^13.4.0",
78
+ "@testing-library/react-hooks": "^8.0.1",
79
+ "@testing-library/user-event": "^14.4.3",
80
80
  "@types/testing-library__jest-dom": "^5.14.3",
81
81
  "@types/jest": "^27",
82
82
  "@types/node": "^14",
83
83
  "jest": "^27",
84
84
  "jest-fetch-mock": "^3.0.3",
85
- "react": "^17.0.2",
86
- "react-dom": "^17.0.2",
85
+ "react": "^18",
86
+ "react-dom": "^18",
87
87
  "react-router-dom": "^6.2.1",
88
88
  "typescript": "^4",
89
89
  "webpack-chain": "^6.5.1"
@@ -94,33 +94,10 @@
94
94
  "registry": "https://registry.npmjs.org/",
95
95
  "access": "public"
96
96
  },
97
- "wireit": {
98
- "build": {
99
- "command": "modern build",
100
- "files": [
101
- "src/**/*",
102
- "tsconfig.json",
103
- "package.json"
104
- ],
105
- "output": [
106
- "dist/**/*"
107
- ]
108
- },
109
- "test": {
110
- "command": "jest --passWithNoTests",
111
- "files": [
112
- "src/**/*",
113
- "tsconfig.json",
114
- "package.json",
115
- "tests/**/*"
116
- ],
117
- "output": []
118
- }
119
- },
120
97
  "scripts": {
121
98
  "new": "modern new",
122
- "build": "wireit",
99
+ "build": "modern build",
123
100
  "build:watch": "rm -rf ./dist && modern build --watch",
124
- "test": "wireit"
101
+ "test": "jest --passWithNoTests"
125
102
  }
126
103
  }
package/type.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Config } from './dist/types/runtime/useModuleApps';
2
+ import '@modern-js/plugin-router-legacy';
2
3
 
3
4
  declare module '@modern-js/runtime' {
4
5
  export const useModuleApp: typeof import('./dist/types/runtime').useModuleApp;
@@ -7,6 +8,6 @@ declare module '@modern-js/runtime' {
7
8
 
8
9
  declare module '@modern-js/core' {
9
10
  interface RuntimeConfig {
10
- masterApp?: Config
11
+ masterApp?: Config;
11
12
  }
12
13
  }