@modern-js/plugin-data-loader 2.5.0 → 2.6.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/dist/cjs/cli/generate-client.js +4 -0
- package/dist/cjs/cli/loader.js +3 -0
- package/dist/cjs/server/index.js +5 -0
- package/dist/esm/cli/loader.js +6 -0
- package/dist/esm/server/index.js +2 -1
- package/dist/esm-node/cli/loader.js +3 -0
- package/dist/esm-node/server/index.js +1 -0
- package/package.json +7 -7
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
package/dist/cjs/cli/loader.js
CHANGED
|
@@ -28,6 +28,9 @@ async function loader(source) {
|
|
|
28
28
|
if (target === "node") {
|
|
29
29
|
return source;
|
|
30
30
|
}
|
|
31
|
+
if (target === "webworker") {
|
|
32
|
+
return source;
|
|
33
|
+
}
|
|
31
34
|
const options = this.getOptions();
|
|
32
35
|
const code = (0, import_generate_client.generateClient)({
|
|
33
36
|
mapFile: options.mapFile,
|
package/dist/cjs/server/index.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -59,6 +63,7 @@ const callRouteLoader = async ({
|
|
|
59
63
|
loader,
|
|
60
64
|
params,
|
|
61
65
|
request,
|
|
66
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
62
67
|
loadContext
|
|
63
68
|
}) => {
|
|
64
69
|
if (!loader) {
|
package/dist/esm/cli/loader.js
CHANGED
package/dist/esm/server/index.js
CHANGED
|
@@ -254,7 +254,8 @@ var json = function(data) {
|
|
|
254
254
|
};
|
|
255
255
|
var callRouteLoader = function() {
|
|
256
256
|
var _ref = _asyncToGenerator(function(param) {
|
|
257
|
-
var routeId, loader, params, request,
|
|
257
|
+
var routeId, loader, params, request, // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
258
|
+
loadContext, result, error;
|
|
258
259
|
return __generator(this, function(_state) {
|
|
259
260
|
switch(_state.label){
|
|
260
261
|
case 0:
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.6.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@remix-run/node": "^1.9.0",
|
|
43
43
|
"path-to-regexp": "^6.2.0",
|
|
44
44
|
"react-router-dom": "^6.6.0",
|
|
45
|
-
"@modern-js/utils": "2.
|
|
45
|
+
"@modern-js/utils": "2.6.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/babel__core": "^7.1.15",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
"typescript": "^4",
|
|
58
58
|
"webpack": "^5.75.0",
|
|
59
59
|
"webpack-chain": "^6.5.1",
|
|
60
|
-
"@modern-js/core": "2.
|
|
61
|
-
"@modern-js/server-core": "2.
|
|
62
|
-
"@modern-js/types": "2.
|
|
63
|
-
"@scripts/
|
|
64
|
-
"@scripts/
|
|
60
|
+
"@modern-js/core": "2.6.0",
|
|
61
|
+
"@modern-js/server-core": "2.6.0",
|
|
62
|
+
"@modern-js/types": "2.6.0",
|
|
63
|
+
"@scripts/build": "2.6.0",
|
|
64
|
+
"@scripts/jest-config": "2.6.0"
|
|
65
65
|
},
|
|
66
66
|
"sideEffects": false,
|
|
67
67
|
"publishConfig": {
|