@modern-js/plugin-proxy 1.2.3 → 1.2.6
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/.eslintrc.js +8 -0
- package/CHANGELOG.md +31 -0
- package/dist/js/modern/index.js +0 -1
- package/dist/js/node/index.js +0 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/utils/createProxyRule.d.ts +2 -2
- package/jest.config.js +0 -1
- package/package.json +3 -24
- package/dist/js/modern/types.js +0 -1
- package/dist/js/node/types.js +0 -3
- package/dist/types/types.d.ts +0 -7
- package/tests/.eslintrc.js +0 -6
- package/tests/__snapshots__/cli.test.ts.snap +0 -19
- package/tests/cli.test.ts +0 -39
- package/tests/tsconfig.json +0 -14
package/.eslintrc.js
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @modern-js/plugin-proxy
|
|
2
2
|
|
|
3
|
+
## 1.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6cffe99d: chore:
|
|
8
|
+
remove react eslint rules for `modern-js` rule set.
|
|
9
|
+
add .eslintrc for each package to speed up linting
|
|
10
|
+
- 04ae5262: chore: bump @modern-js/utils to v1.4.1 in dependencies
|
|
11
|
+
- 60f7d8bf: feat: add tests dir to npmignore
|
|
12
|
+
- Updated dependencies [b8599d09]
|
|
13
|
+
- Updated dependencies [60f7d8bf]
|
|
14
|
+
- Updated dependencies [3bf4f8b0]
|
|
15
|
+
- @modern-js/utils@1.5.0
|
|
16
|
+
|
|
17
|
+
## 1.2.5
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- bebb39b6: chore: improve devDependencies and peerDependencies
|
|
22
|
+
- 132f7b53: feat: move config declarations to @modern-js/core
|
|
23
|
+
- Updated dependencies [132f7b53]
|
|
24
|
+
- @modern-js/utils@1.3.7
|
|
25
|
+
|
|
26
|
+
## 1.2.4
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 681a1ff9: feat: remove unnecessary peerDependencies
|
|
31
|
+
- Updated dependencies [c2046f37]
|
|
32
|
+
- @modern-js/utils@1.3.6
|
|
33
|
+
|
|
3
34
|
## 1.2.3
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
package/dist/js/node/index.js
CHANGED
|
@@ -11,8 +11,6 @@ var _createProxyRule = require("./utils/createProxyRule");
|
|
|
11
11
|
|
|
12
12
|
var _whistleProxy = _interopRequireDefault(require("./utils/whistleProxy"));
|
|
13
13
|
|
|
14
|
-
require("./types");
|
|
15
|
-
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
16
|
var _default = () => {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const createProxyRule: (appDirectory: string, proxyOptions:
|
|
1
|
+
import type { DevProxyOptions } from '@modern-js/core';
|
|
2
|
+
export declare const createProxyRule: (appDirectory: string, proxyOptions: DevProxyOptions) => string;
|
package/jest.config.js
CHANGED
package/package.json
CHANGED
|
@@ -11,22 +11,12 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.6",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
18
18
|
"module": "./dist/js/treeshaking/index.js",
|
|
19
19
|
"jsnext:modern": "./dist/js/modern/index.js",
|
|
20
|
-
"typesVersions": {
|
|
21
|
-
"*": {
|
|
22
|
-
".": [
|
|
23
|
-
"./dist/types/index.d.ts"
|
|
24
|
-
],
|
|
25
|
-
"types": [
|
|
26
|
-
"./dist/types/types.d.ts"
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
20
|
"exports": {
|
|
31
21
|
".": {
|
|
32
22
|
"node": {
|
|
@@ -39,33 +29,22 @@
|
|
|
39
29
|
"./cli": {
|
|
40
30
|
"jsnext:source": "./src/index.ts",
|
|
41
31
|
"default": "./dist/js/node/index.js"
|
|
42
|
-
},
|
|
43
|
-
"./types": {
|
|
44
|
-
"node": {
|
|
45
|
-
"import": "./dist/js/modern/types.js",
|
|
46
|
-
"require": "./dist/js/node/types.js",
|
|
47
|
-
"types": "./dist/types/types.d.ts"
|
|
48
|
-
},
|
|
49
|
-
"default": "./dist/js/treeshaking/types.js"
|
|
50
32
|
}
|
|
51
33
|
},
|
|
52
34
|
"dependencies": {
|
|
53
35
|
"@babel/runtime": "^7",
|
|
54
|
-
"@modern-js/utils": "^1.
|
|
36
|
+
"@modern-js/utils": "^1.5.0",
|
|
55
37
|
"whistle": "^2.7.18"
|
|
56
38
|
},
|
|
57
39
|
"devDependencies": {
|
|
58
40
|
"@types/jest": "^26",
|
|
59
41
|
"@types/node": "^14",
|
|
60
42
|
"typescript": "^4",
|
|
61
|
-
"@modern-js/core": "
|
|
43
|
+
"@modern-js/core": "1.8.0",
|
|
62
44
|
"@scripts/build": "0.0.0",
|
|
63
45
|
"jest": "^27",
|
|
64
46
|
"@scripts/jest-config": "0.0.0"
|
|
65
47
|
},
|
|
66
|
-
"peerDependencies": {
|
|
67
|
-
"@modern-js/core": "^1.5.0"
|
|
68
|
-
},
|
|
69
48
|
"sideEffects": false,
|
|
70
49
|
"publishConfig": {
|
|
71
50
|
"registry": "https://registry.npmjs.org/",
|
package/dist/js/modern/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@modern-js/core';
|
package/dist/js/node/types.js
DELETED
package/dist/types/types.d.ts
DELETED
package/tests/.eslintrc.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`plugin proxy test config 1`] = `Array []`;
|
|
4
|
-
|
|
5
|
-
exports[`plugin proxy test schema 1`] = `
|
|
6
|
-
Array [
|
|
7
|
-
Array [
|
|
8
|
-
Object {
|
|
9
|
-
"schema": Object {
|
|
10
|
-
"typeof": Array [
|
|
11
|
-
"string",
|
|
12
|
-
"object",
|
|
13
|
-
],
|
|
14
|
-
},
|
|
15
|
-
"target": "dev.proxy",
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
]
|
|
19
|
-
`;
|
package/tests/cli.test.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { manager } from '@modern-js/core';
|
|
3
|
-
import plugin from '../src';
|
|
4
|
-
|
|
5
|
-
const root = path.normalize(path.resolve(__dirname, '../../../../'));
|
|
6
|
-
expect.addSnapshotSerializer({
|
|
7
|
-
test: val =>
|
|
8
|
-
typeof val === 'string' &&
|
|
9
|
-
(val.includes('modern.js') ||
|
|
10
|
-
val.includes('node_modules') ||
|
|
11
|
-
val.includes(root)),
|
|
12
|
-
print: val =>
|
|
13
|
-
// eslint-disable-next-line no-nested-ternary
|
|
14
|
-
typeof val === 'string'
|
|
15
|
-
? // eslint-disable-next-line no-nested-ternary
|
|
16
|
-
val.includes('node_modules')
|
|
17
|
-
? `"${val.replace(/.+node_modules/, '')}"`
|
|
18
|
-
: val.includes('modern.js')
|
|
19
|
-
? `"${val.replace(/.+modern\.js/, '')}"`
|
|
20
|
-
: `"${val.replace(root, '')}"`
|
|
21
|
-
: (val as string),
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
describe('plugin proxy test', () => {
|
|
25
|
-
it('schema', async () => {
|
|
26
|
-
const main = manager.clone().usePlugin(plugin);
|
|
27
|
-
const runner = await main.init();
|
|
28
|
-
const result = await runner.validateSchema();
|
|
29
|
-
|
|
30
|
-
expect(result).toMatchSnapshot();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('config', async () => {
|
|
34
|
-
const main = manager.clone().usePlugin(plugin);
|
|
35
|
-
const runner = await main.init();
|
|
36
|
-
const result = await runner.config();
|
|
37
|
-
expect(result).toMatchSnapshot();
|
|
38
|
-
});
|
|
39
|
-
});
|
package/tests/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@modern-js/tsconfig/base",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"declaration": true,
|
|
5
|
-
"jsx": "preserve",
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"noEmit": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"isolatedModules": true,
|
|
11
|
-
"paths": {},
|
|
12
|
-
"types": ["node", "jest"]
|
|
13
|
-
}
|
|
14
|
-
}
|