@modern-js/bff-runtime 1.0.1 → 1.2.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,12 +1,42 @@
1
1
  # @modern-js/bff-runtime
2
2
 
3
- ## 1.0.1
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cfe11628: Make Modern.js self bootstraping
4
8
 
5
9
  ### Patch Changes
6
10
 
7
- - release 1.0.1
8
- - Updated dependencies [undefined]
9
- - @modern-js/server-utils@1.0.1
11
+ - 146dcd85: modify server framework plugin hook types and hook context
12
+ - 146dcd85: modify server framework plugin hook types
13
+ - 146dcd85: fix test case in babel compiler
14
+ - Updated dependencies [146dcd85]
15
+ - Updated dependencies [cfe11628]
16
+ - Updated dependencies [146dcd85]
17
+ - Updated dependencies [146dcd85]
18
+ - Updated dependencies [1ebc7ee2]
19
+ - @modern-js/server-utils@1.2.0
20
+
21
+ ## 1.1.1
22
+
23
+ ### Patch Changes
24
+
25
+ - 0fa83663: support more .env files
26
+ - Updated dependencies [b011e0c5]
27
+ - Updated dependencies [0fa83663]
28
+ - @modern-js/server-utils@1.1.1
29
+
30
+ ## 1.1.0
31
+
32
+ ### Minor Changes
33
+
34
+ - 96119db2: Relese v1.1.0
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [96119db2]
39
+ - @modern-js/server-utils@1.1.0
10
40
 
11
41
  ## 1.0.0
12
42
 
@@ -1,5 +1,4 @@
1
1
  export * from 'farrow-schema';
2
2
  export * from 'farrow-api';
3
3
  export * from 'farrow-pipeline';
4
- export { hook } from '@modern-js/server-utils';
5
4
  export { match, isHandler, isSchemaHandler } from "./match";
@@ -1,2 +1 @@
1
- export {};
2
1
  export {};
@@ -4,17 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
- hook: true,
8
7
  match: true,
9
8
  isHandler: true,
10
9
  isSchemaHandler: true
11
10
  };
12
- Object.defineProperty(exports, "hook", {
13
- enumerable: true,
14
- get: function () {
15
- return _serverUtils.hook;
16
- }
17
- });
18
11
  Object.defineProperty(exports, "isHandler", {
19
12
  enumerable: true,
20
13
  get: function () {
@@ -76,6 +69,4 @@ Object.keys(_farrowPipeline).forEach(function (key) {
76
69
  });
77
70
  });
78
71
 
79
- var _serverUtils = require("@modern-js/server-utils");
80
-
81
72
  var _match = require("./match");
@@ -1,5 +1,4 @@
1
1
  export * from 'farrow-schema';
2
2
  export * from 'farrow-api';
3
3
  export * from 'farrow-pipeline';
4
- export { hook } from '@modern-js/server-utils';
5
4
  export { match, isHandler, isSchemaHandler } from "./match";
@@ -1,2 +1 @@
1
- export {};
2
1
  export {};
@@ -1,7 +1,6 @@
1
1
  export * from 'farrow-schema';
2
2
  export * from 'farrow-api';
3
3
  export * from 'farrow-pipeline';
4
- export { hook } from '@modern-js/server-utils';
5
4
  export { match, isHandler, isSchemaHandler } from './match';
6
5
  export type { Handler, SchemaHandler } from './match';
7
6
  export type { RequestSchema, TypeOfRequestSchema, InputType } from './request';
package/jest.config.js ADDED
@@ -0,0 +1,8 @@
1
+ const sharedConfig = require('@scripts/jest-config');
2
+
3
+ /** @type {import('@jest/types').Config.InitialOptions} */
4
+ module.exports = {
5
+ // eslint-disable-next-line node/no-unsupported-features/es-syntax
6
+ ...sharedConfig,
7
+ rootDir: __dirname,
8
+ };
package/modern.config.js CHANGED
@@ -1,15 +1,2 @@
1
1
  /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {
3
- testing: {
4
- jest: {
5
- collectCoverage: true,
6
- collectCoverageFrom: ['src/**/*.ts'],
7
- coveragePathIgnorePatterns: ['/node_modules/'],
8
- moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'],
9
- testEnvironment: 'jsdom',
10
- transform: {
11
- '^.+\\.tsx?$': 'ts-jest',
12
- },
13
- },
14
- },
15
- };
2
+ module.exports = {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.0.1",
14
+ "version": "1.2.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -20,6 +20,7 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "node": {
23
+ "jsnext:source": "./src/index.ts",
23
24
  "import": "./dist/js/modern/index.js",
24
25
  "require": "./dist/js/node/index.js"
25
26
  },
@@ -28,7 +29,7 @@
28
29
  },
29
30
  "dependencies": {
30
31
  "@babel/runtime": "^7",
31
- "@modern-js/server-utils": "^1.0.1",
32
+ "@modern-js/server-utils": "^1.2.0",
32
33
  "farrow-api": "^1.10.8",
33
34
  "farrow-http": "^1.10.8",
34
35
  "farrow-pipeline": "^1.10.6",
@@ -41,16 +42,19 @@
41
42
  "@types/react-dom": "^17",
42
43
  "ts-jest": "^27.0.5",
43
44
  "typescript": "^4",
44
- "@modern-js/plugin-testing": "^1.0.2",
45
- "@modern-js/module-tools": "^1.0.2"
45
+ "@scripts/build": "0.0.0",
46
+ "jest": "^27",
47
+ "@scripts/jest-config": "0.0.0"
46
48
  },
47
49
  "publishConfig": {
48
50
  "registry": "https://registry.npmjs.org/",
49
- "access": "public"
51
+ "access": "public",
52
+ "types": "./dist/types/index.d.ts"
50
53
  },
51
54
  "scripts": {
52
55
  "new": "modern new",
53
56
  "build": "modern build",
54
- "test": "modern test --passWithNoTests"
55
- }
57
+ "test": "jest --passWithNoTests"
58
+ },
59
+ "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
56
60
  }
package/src/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export * from 'farrow-schema';
2
2
  export * from 'farrow-api';
3
3
  export * from 'farrow-pipeline';
4
- export { hook } from '@modern-js/server-utils';
5
4
 
6
5
  export { match, isHandler, isSchemaHandler } from './match';
7
6
 
@@ -1,6 +1,6 @@
1
1
  import assert from 'assert';
2
- import { baseMatch } from '@/match';
3
- import { match, isHandler, isSchemaHandler, Any } from '@/index';
2
+ import { baseMatch } from '../src/match';
3
+ import { match, isHandler, isSchemaHandler, Any } from '../src';
4
4
 
5
5
  describe('match', () => {
6
6
  it('should work well', async () => {
@@ -5,8 +5,6 @@
5
5
  "jsx": "preserve",
6
6
  "baseUrl": "./",
7
7
  "isolatedModules": true,
8
- "paths": {
9
- "@/*": ["../src/*"]
10
- }
8
+ "paths": {}
11
9
  }
12
10
  }
package/tsconfig.json CHANGED
@@ -5,9 +5,7 @@
5
5
  "jsx": "preserve",
6
6
  "baseUrl": "./",
7
7
  "isolatedModules": true,
8
- "paths": {
9
- "@/*": ["./src/*"]
10
- }
8
+ "paths": {}
11
9
  },
12
10
  "include": ["src"]
13
11
  }