Browse Source

upgrade: schematics to 19 & fix build error

pull/21669/head
masum-ulu 1 year ago
parent
commit
9c6edb78f1
  1. 10
      npm/ng-packs/packages/schematics/package.json
  2. 6
      npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts

10
npm/ng-packs/packages/schematics/package.json

@ -4,16 +4,16 @@
"author": "", "author": "",
"schematics": "./collection.json", "schematics": "./collection.json",
"dependencies": { "dependencies": {
"@angular-devkit/core": "~18.1.0", "@angular-devkit/core": "~19.0.0",
"@angular-devkit/schematics": "~18.1.0", "@angular-devkit/schematics": "~19.0.0",
"@angular/cli": "~18.1.0", "@angular/cli": "~19.0.0",
"got": "^11.5.2", "got": "^11.5.2",
"jsonc-parser": "^2.3.0", "jsonc-parser": "^2.3.0",
"should-quote": "^1.0.0", "should-quote": "^1.0.0",
"typescript": "5.0.4" "typescript": "~5.6.0"
}, },
"devDependencies": { "devDependencies": {
"@schematics/angular": "~18.1.0", "@schematics/angular": "~19.0.0",
"@types/jest": "29.4.4", "@types/jest": "29.4.4",
"@types/node": "20.2.5", "@types/node": "20.2.5",
"jest": "29.4.3", "jest": "29.4.3",

6
npm/ng-packs/packages/schematics/src/commands/create-lib/index.ts

@ -88,7 +88,11 @@ async function resolvePackagesDirFromAngularJson(host: Tree) {
function readFirstLibInAngularJson(workspace: WorkspaceDefinition): ProjectDefinition | undefined { function readFirstLibInAngularJson(workspace: WorkspaceDefinition): ProjectDefinition | undefined {
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
return Array.from(workspace.projects.values()).find(value => isLibrary(value)); const library = <ProjectDefinition | undefined>(
Array.from(workspace.projects.values()).find((value: ProjectDefinition) => isLibrary(value))
);
return library;
} }
async function createLibFromModuleTemplate(tree: Tree, options: GenerateLibSchema) { async function createLibFromModuleTemplate(tree: Tree, options: GenerateLibSchema) {

Loading…
Cancel
Save