8000 refactor: core/standalone-decorator by fengmk2 · Pull Request #280 · eggjs/tegg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor: core/standalone-decorator #280

New issue

Have a questi 8000 on about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/controller-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@eggjs/tegg-types": "^3.52.0",
"is-type-of": "^2.2.0",
"path-to-regexp": "^1.9.0",
"reflect-metadata": "^0.2.1"
"reflect-metadata": "^0.2.2"
},
"devDependencies": {
"@types/node": "22",
Expand Down
2 changes: 1 addition & 1 deletion core/core-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"dependencies": {
"@eggjs/tegg-common-util": "^3.52.0",
"@eggjs/tegg-types": "^3.52.0",
"reflect-metadata": "^0.2.1"
"reflect-metadata": "^0.2.2"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 0 additions & 3 deletions core/standalone-decorator/index.ts

This file was deleted.

30 changes: 16 additions & 14 deletions core/standalone-decorator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,22 @@
"tegg",
"standalone"
],
"main": "dist/index.js",
"type": "module",
"exports": {
".": {
"types": "./src/index.d.ts",
"default": "./src/index.js"
}
},
"files": [
"dist/**/*.js",
"dist/**/*.d.ts"
"src/**/*.js",
"src/**/*.d.ts"
],
"typings": "dist/index.d.ts",
"scripts": {
"clean": "tsc -b --clean",
"tsc": "npm run clean && tsc -p ./tsconfig.json",
"tsc:pub": "npm run clean && tsc -p ./tsconfig.pub.json",
"prepublishOnly": "npm run tsc:pub"
"tsc:pub": "npm run tsc",
"prepublishOnly": "npm run tsc"
},
"author": "killagu <killa123@126.com>",
"license": "MIT",
Expand All @@ -33,21 +38,18 @@
"directory": "core/standalone-decorator"
},
"engines": {
"node": ">=14.0.0"
"node": ">=20.0.0"
},
"dependencies": {
"@eggjs/tegg-common-util": "^3.52.0",
"reflect-metadata": "^0.2.1"
"reflect-metadata": "^0.2.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^20.2.4",
"cross-env": "^7.0.3",
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
"@types/node": "22",
"ts-node": "10",
"typescript": "5"
}
}
4 changes: 2 additions & 2 deletions core/standalone-decorator/src/decorator/Runner.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MainRunnerClass } from '../typing';
import { StandaloneUtil } from '../util/StandaloneUtil';
import { MainRunnerClass } from '../typing.js';
import { StandaloneUtil } from '../util/index.js';

export function Runner<T>() {
return function(clazz: MainRunnerClass<T>) {
Expand Down
1 change: 1 addition & 0 deletions core/standalone-decorator/src/decorator/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Runner.js';
3 changes: 3 additions & 0 deletions core/standalone-decorator/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './typing.js';
export * from './util/index.js';
export * from './decorator/index.js';
2 changes: 1 addition & 1 deletion core/standalone-decorator/src/util/StandaloneUtil.ts
5DA8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MainRunnerClass } from '../typing';
import { MainRunnerClass } from '../typing.js';

export class StandaloneUtil {
private static runnerClass: MainRunnerClass | undefined;
Expand Down
1 change: 1 addition & 0 deletions core/standalone-decorator/src/util/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './StandaloneUtil.js';
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`should export stable 1`] = `
{
"Runner": [Function],
"StandaloneUtil": [Function],
}
`;
6 changes: 6 additions & 0 deletions core/standalone-decorator/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expect, it } from 'vitest';
import * as types from '../src/index.js';

it('should export stable', async () => {
expect(types).toMatchSnapshot();
});
3 changes: 0 additions & 3 deletions core/standalone-decorator/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"baseUrl": "./"
},
"exclude": [
"dist",
"node_modules",
"test"
]
}
12 changes: 0 additions & 12 deletions core/standalone-decorator/tsconfig.pub.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"tsc-workspaces": "npm run tsc --workspaces --if-present",
"tsc:pub": "lerna run tsc:pub",
"tsc:pub-workspaces": "npm run tsc:pub --workspaces --if-present",
"coverage": "vitest run --coverage core/types core/core-decorator core/common-util core/aop-decorator core/lifecycle core/ajv-decorator core/loader core/runtime core/test-util core/aop-runtime core/background-task core/controller-decorator core/dal-decorator core/dal-runtime core/dynamic-inject core/dynamic-inject-runtime core/eventbus-decorator core/eventbus-runtime core/orm-decorator core/schedule-decorator",
"coverage": "vitest run --coverage core/types core/core-decorator core/common-util core/aop-decorator core/lifecycle core/ajv-decorator core/loader core/runtime core/test-util core/aop-runtime core/background-task core/controller-decorator core/dal-decorator core/dal-runtime core/dynamic-inject core/dynamic-inject-runtime core/eventbus-decorator core/eventbus-runtime core/orm-decorator core/schedule-decorator core/standalone-decorator",
"preci": "npm run clean && npm run lint",
"ci": "npm run coverage",
"postci-skip": "npm run prepublishOnly --workspaces --if-present"
Expand Down
Loading
0