Skip to content

Commit

Permalink
fix: bump Ts.ED dependencies to v8.0.0-rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Oct 30, 2024
1 parent 850e56c commit 03d5a74
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 81 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@
},
"homepage": "https://github.com/tsedio/tsed-cli",
"dependencies": {
"@tsed/core": ">=8.0.0-beta.5",
"@tsed/di": ">=8.0.0-beta.5",
"@tsed/core": ">=8.0.0-rc.1",
"@tsed/di": ">=8.0.0-rc.1",
"@tsed/logger": ">=6.2.1",
"@tsed/normalize-path": ">=8.0.0-beta.5",
"@tsed/openspec": ">=8.0.0-beta.5",
"@tsed/schema": ">=8.0.0-beta.5",
"@tsed/normalize-path": ">=8.0.0-rc.1",
"@tsed/openspec": ">=8.0.0-rc.1",
"@tsed/schema": ">=8.0.0-rc.1",
"axios": "^1.7.7",
"chalk": "^5.3.0",
"commander": "^12.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"vitest": "2.1.1"
},
"peerDependencies": {
"@tsed/core": ">=8.0.0-beta.5",
"@tsed/di": ">=8.0.0-beta.5"
"@tsed/core": ">=8.0.0-rc.1",
"@tsed/di": ">=8.0.0-rc.1"
}
}
2 changes: 1 addition & 1 deletion packages/cli-core/src/services/CliPackageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ registerProvider({
provide: CliPackageJson,
deps: [Configuration],
useFactory(configuration: Configuration) {
return configuration.pkg || {};
return configuration.get("pkg", {});
}
});
8 changes: 4 additions & 4 deletions packages/cli-core/src/services/ProjectPackageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class ProjectPackageJson {
}

set dir(dir: string) {
configuration().project.rootDir = dir;
configuration().set("project.rootDir", dir);

this.read();
}
Expand Down Expand Up @@ -126,12 +126,12 @@ export class ProjectPackageJson {

setRaw(pkg: any) {
const config = configuration();
const projectPreferences = config.defaultProjectPreferences;
const preferences = getValue(pkg, config.name);
const projectPreferences = config.get("defaultProjectPreferences");
const preferences = getValue(pkg, config.get("name"));

this.raw = {
...pkg,
[config.name]: {
[config.get("name")]: {
...(projectPreferences && projectPreferences(pkg)),
...preferences
}
Expand Down
23 changes: 8 additions & 15 deletions packages/cli-core/src/services/Renderer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {join} from "node:path";

// @ts-ignore
import {FakeCliFs, normalizePath} from "@tsed/cli-testing";
import {DITest} from "@tsed/di";
import {configuration, DITest} from "@tsed/di";
import Consolidate from "consolidate";
import {globby} from "globby";
import handlebars from "handlebars";
Expand Down Expand Up @@ -39,8 +39,7 @@ describe("Renderer", () => {
it("should return the valid path from", () => {
const service = new SrcRendererService();

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand All @@ -60,8 +59,7 @@ describe("Renderer", () => {
baseDir: "/init"
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand All @@ -85,8 +83,7 @@ describe("Renderer", () => {
templateDir: TEMPLATE_DIR
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand All @@ -109,8 +106,7 @@ describe("Renderer", () => {
templateDir: `${TEMPLATE_DIR}/init`
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand All @@ -133,8 +129,7 @@ describe("Renderer", () => {
baseDir: "/init"
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand All @@ -158,8 +153,7 @@ describe("Renderer", () => {
basename: "myFile.controller.ts"
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand Down Expand Up @@ -191,8 +185,7 @@ describe("Renderer", () => {
...props
};

// @ts-ignore
service.configuration.set("project", {
configuration().set("project", {
rootDir: "/home",
srcDir: "/src"
});
Expand Down
9 changes: 4 additions & 5 deletions packages/cli-core/src/services/Renderer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "../utils/hbs/index.js";

import {isString} from "@tsed/core";
import {Configuration, constant, inject, Injectable} from "@tsed/di";
import {constant, inject, Injectable} from "@tsed/di";
import {normalizePath} from "@tsed/normalize-path";
import Consolidate from "consolidate";
import fs from "fs-extra";
Expand All @@ -28,7 +28,6 @@ export abstract class Renderer {
public templateDir = constant<string>("templateDir", "");
readonly fs = inject(CliFs);
readonly cache = new Set<string>();
protected configuration = inject(Configuration);

abstract get rootDir(): string;

Expand Down Expand Up @@ -190,20 +189,20 @@ export abstract class Renderer {
@Injectable()
export class RootRendererService extends Renderer {
get rootDir() {
return this.configuration.project?.rootDir as string;
return constant<string>("project.rootDir", "");
}
}

@Injectable()
export class SrcRendererService extends Renderer {
get rootDir() {
return join(...([this.configuration.project?.rootDir, this.configuration.project?.srcDir].filter(Boolean) as string[]));
return join(...([constant("project.rootDir"), constant("project.srcDir")].filter(Boolean) as string[]));
}
}

@Injectable()
export class ScriptsRendererService extends Renderer {
get rootDir() {
return join(...([this.configuration.project?.rootDir, this.configuration.project?.scriptsDir].filter(Boolean) as string[]));
return join(...([constant("project.rootDir"), constant("project.scriptsDir")].filter(Boolean) as string[]));
}
}
16 changes: 8 additions & 8 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
"@swc/core": "1.7.26",
"@swc/helpers": "^0.5.13",
"@tsed/cli-core": "workspace:*",
"@tsed/core": ">=8.0.0-beta.5",
"@tsed/di": ">=8.0.0-beta.5",
"@tsed/core": ">=8.0.0-rc.1",
"@tsed/di": ">=8.0.0-rc.1",
"@tsed/logger": ">=6.2.1",
"@tsed/openspec": ">=8.0.0-beta.5",
"@tsed/schema": ">=8.0.0-beta.5",
"@tsed/openspec": ">=8.0.0-rc.1",
"@tsed/schema": ">=8.0.0-rc.1",
"chalk": "^5.3.0",
"change-case": "^5.4.4",
"esm-module-alias": "^2.2.1",
Expand All @@ -89,10 +89,10 @@
},
"peerDependencies": {
"@tsed/cli-core": "workspace:*",
"@tsed/core": ">=8.0.0-beta.5",
"@tsed/di": ">=8.0.0-beta.5",
"@tsed/core": ">=8.0.0-rc.1",
"@tsed/di": ">=8.0.0-rc.1",
"@tsed/logger": ">=6.2.1",
"@tsed/openspec": ">=8.0.0-beta.5",
"@tsed/schema": ">=8.0.0-beta.5"
"@tsed/openspec": ">=8.0.0-rc.1",
"@tsed/schema": ">=8.0.0-rc.1"
}
}
1 change: 0 additions & 1 deletion packages/cli/src/commands/init/InitCmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
Configuration,
createSubTasks,
createTasksRunner,
Inject,
inject,
PackageManager,
PackageManagersModule,
Expand Down
80 changes: 40 additions & 40 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2349,8 +2349,8 @@ __metadata:
uuid: "npm:^10.0.0"
vitest: "npm:2.1.1"
peerDependencies:
"@tsed/core": ">=8.0.0-beta.5"
"@tsed/di": ">=8.0.0-beta.5"
"@tsed/core": ">=8.0.0-rc.1"
"@tsed/di": ">=8.0.0-rc.1"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2548,14 +2548,14 @@ __metadata:
"@commitlint/config-conventional": "npm:19.5.0"
"@swc/core": "npm:1.7.26"
"@swc/helpers": "npm:0.5.13"
"@tsed/core": "npm:>=8.0.0-beta.5"
"@tsed/di": "npm:>=8.0.0-beta.5"
"@tsed/core": "npm:>=8.0.0-rc.1"
"@tsed/di": "npm:>=8.0.0-rc.1"
"@tsed/logger": "npm:>=6.2.1"
"@tsed/markdown-it-symbols": "npm:3.20.8"
"@tsed/monorepo-utils": "npm:2.3.5"
"@tsed/normalize-path": "npm:>=8.0.0-beta.5"
"@tsed/openspec": "npm:>=8.0.0-beta.5"
"@tsed/schema": "npm:>=8.0.0-beta.5"
"@tsed/normalize-path": "npm:>=8.0.0-rc.1"
"@tsed/openspec": "npm:>=8.0.0-rc.1"
"@tsed/schema": "npm:>=8.0.0-rc.1"
"@tsed/ts-doc": "npm:^4.1.0"
"@types/node": "npm:22.7.4"
"@typescript-eslint/eslint-plugin": "npm:8.7.0"
Expand Down Expand Up @@ -2626,11 +2626,11 @@ __metadata:
"@swc/core": "npm:1.7.26"
"@swc/helpers": "npm:^0.5.13"
"@tsed/cli-core": "workspace:*"
"@tsed/core": "npm:>=8.0.0-beta.5"
"@tsed/di": "npm:>=8.0.0-beta.5"
"@tsed/core": "npm:>=8.0.0-rc.1"
"@tsed/di": "npm:>=8.0.0-rc.1"
"@tsed/logger": "npm:>=6.2.1"
"@tsed/openspec": "npm:>=8.0.0-beta.5"
"@tsed/schema": "npm:>=8.0.0-beta.5"
"@tsed/openspec": "npm:>=8.0.0-rc.1"
"@tsed/schema": "npm:>=8.0.0-rc.1"
"@tsed/typescript": "workspace:*"
"@types/change-case": "npm:^2.3.1"
chalk: "npm:^5.3.0"
Expand All @@ -2645,44 +2645,44 @@ __metadata:
vitest: "npm:2.1.1"
peerDependencies:
"@tsed/cli-core": "workspace:*"
"@tsed/core": ">=8.0.0-beta.5"
"@tsed/di": ">=8.0.0-beta.5"
"@tsed/core": ">=8.0.0-rc.1"
"@tsed/di": ">=8.0.0-rc.1"
"@tsed/logger": ">=6.2.1"
"@tsed/openspec": ">=8.0.0-beta.5"
"@tsed/schema": ">=8.0.0-beta.5"
"@tsed/openspec": ">=8.0.0-rc.1"
"@tsed/schema": ">=8.0.0-rc.1"
bin:
tsed: lib/esm/bin/tsed.js
languageName: unknown
linkType: soft

"@tsed/core@npm:>=8.0.0-beta.5":
version: 8.0.0-beta.5
resolution: "@tsed/core@npm:8.0.0-beta.5"
"@tsed/core@npm:>=8.0.0-rc.1":
version: 8.0.0-rc.1
resolution: "@tsed/core@npm:8.0.0-rc.1"
dependencies:
reflect-metadata: "npm:^0.2.2"
tslib: "npm:2.7.0"
checksum: 10/2f11058e3e3e603f0027f4070793732f4b95919109649cb8ca322af24853194c53d852b16bcbfacf478d9efb65b4d0f74bc33fad5592beb23860569c959e0b9c
checksum: 10/9795ac85871f1230b25b2c4c5f7cb796af2ef03e51a8bb45da074fe3b3635986d0a94a84603ba6667e8d9e77388dd16d71cb3ffb0e9b31df6b8e1ab1fe562336
languageName: node
linkType: hard

"@tsed/di@npm:>=8.0.0-beta.5":
version: 8.0.0-beta.5
resolution: "@tsed/di@npm:8.0.0-beta.5"
"@tsed/di@npm:>=8.0.0-rc.1":
version: 8.0.0-rc.1
resolution: "@tsed/di@npm:8.0.0-rc.1"
dependencies:
tslib: "npm:2.7.0"
uuid: "npm:^10.0.0"
peerDependencies:
"@tsed/core": 8.0.0-beta.5
"@tsed/core": 8.0.0-rc.1
"@tsed/logger": ">=6.7.5"
"@tsed/schema": 8.0.0-beta.5
"@tsed/schema": 8.0.0-rc.1
peerDependenciesMeta:
"@tsed/core":
optional: false
"@tsed/logger":
optional: false
"@tsed/schema":
optional: false
checksum: 10/e08dffe91a118e5f01dffbaa942657164d6ccf5b1a36555a15705fe0a73f91c945d6e067919f4167c05afeaf7d6e8dcc8d8173075dc6ad8e3325a5eea5b891ae
checksum: 10/4ab38d883dec9337cedf6b7e135c7004798f003aa4672398d72ca07f2c11edf8dd4a8ed95bf81c49d6ecec65cb353619de2edaf6421ac4d74a138d3171a57c29
languageName: node
linkType: hard

Expand Down Expand Up @@ -2748,43 +2748,43 @@ __metadata:
languageName: node
linkType: hard

"@tsed/normalize-path@npm:>=8.0.0-beta.5":
version: 8.0.0-beta.5
resolution: "@tsed/normalize-path@npm:8.0.0-beta.5"
"@tsed/normalize-path@npm:>=8.0.0-rc.1":
version: 8.0.0-rc.1
resolution: "@tsed/normalize-path@npm:8.0.0-rc.1"
dependencies:
normalize-path: "npm:3.0.0"
tslib: "npm:2.7.0"
checksum: 10/056e7c3f8c9cb066ec88e49ac604775d646ab0fa7ab4d3a107be7cc689b9d970ad777fb770bdea8faa7613a39fe6e7ec6f3bc4a56135190ef115719ae74bd8e9
checksum: 10/ea896471bffb5cf003a9039f4cbd49141552d578c68a4da214958cc5de74a0061cf5a0c9bd09fa68d2924aeeb28dd2059bba7b12c27d886b313b608f45276696
languageName: node
linkType: hard

"@tsed/openspec@npm:8.0.0-beta.5, @tsed/openspec@npm:>=8.0.0-beta.5":
version: 8.0.0-beta.5
resolution: "@tsed/openspec@npm:8.0.0-beta.5"
checksum: 10/d49599b0304119816d703bb21ab365de8dccf56f68e34146764b3387fdbdd8b560d3b83ff3b605f730a285e06bbd788488e99aa6bf31237fa6792a2dd9bb25d2
"@tsed/openspec@npm:8.0.0-rc.1, @tsed/openspec@npm:>=8.0.0-rc.1":
version: 8.0.0-rc.1
resolution: "@tsed/openspec@npm:8.0.0-rc.1"
checksum: 10/d54e0d2ba43351fc5266cbacb7e671b52b418ad038427cce79fb1a47fdcffd9c0e93ca3882741a94ab71f73be0ddd23e58fb23574ed36cfb84ce7b9e35364d9e
languageName: node
linkType: hard

"@tsed/schema@npm:>=8.0.0-beta.5":
version: 8.0.0-beta.5
resolution: "@tsed/schema@npm:8.0.0-beta.5"
"@tsed/schema@npm:>=8.0.0-rc.1":
version: 8.0.0-rc.1
resolution: "@tsed/schema@npm:8.0.0-rc.1"
dependencies:
"@tsed/openspec": "npm:8.0.0-beta.5"
"@tsed/openspec": "npm:8.0.0-rc.1"
change-case: "npm:^5.4.4"
fs-extra: "npm:^11.2.0"
json-schema: "npm:0.4.0"
picomatch: "npm:2.3.1"
statuses: "npm:^2.0.1"
tslib: "npm:2.7.0"
peerDependencies:
"@tsed/core": 8.0.0-beta.5
"@tsed/openspec": 8.0.0-beta.5
"@tsed/core": 8.0.0-rc.1
"@tsed/openspec": 8.0.0-rc.1
peerDependenciesMeta:
"@tsed/core":
optional: false
"@tsed/openspec":
optional: false
checksum: 10/5b46d5eff2f03232cb2852e1bb7ff24767b3dd389ab6582d1d817f0ff8de4eb67c6870b6df8d101aee1b77b67e150f8a56f85a13fe30bbf4a44708ddb977ecc2
checksum: 10/b231eb80b078fa10a86dcba840a53bd2cd876a0308b394131562a57c9937c43d24646e0303f332cabbdccee39816207cc38b4e39c3ddaf8e661f7d483b2c11cb
languageName: node
linkType: hard

Expand Down

0 comments on commit 03d5a74

Please sign in to comment.