Skip to content

Commit

Permalink
feat: angular devkit latest (#106)
Browse files Browse the repository at this point in the history
* feat: bump to latest angular dev to support node 18

* feat: bump to latest angular devkit

* build: set engine to node 18

* chore: changeset
  • Loading branch information
field123 authored Oct 30, 2023
1 parent 9bdd7fd commit bb05c3e
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 107 deletions.
7 changes: 7 additions & 0 deletions .changeset/nice-onions-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@elasticpath/composable-common": patch
"composable-cli": patch
"@elasticpath/d2c-schematics": patch
---

bumped devkit to support node 18
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@
"turbo": "latest"
},
"engines": {
"npm": ">=7.0.0",
"node": ">=14.0.0 <18.0.0"
"node": ">=18.17.0"
},
"dependencies": {
"@moltin/sdk": "^25.0.2"
},
"packageManager": "[email protected]",
"volta": {
"node": "16.20.2"
"node": "18.18.2"
}
}
5 changes: 3 additions & 2 deletions packages/composable-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@angular-devkit/core": "^14.1.0",
"@angular-devkit/schematics": "^14.1.0",
"@angular-devkit/core": "^16.2.8",
"@angular-devkit/schematics": "^16.2.8",
"@elasticpath/composable-common": "workspace:^",
"@elasticpath/composable-integration-hub-deployer": "workspace:^0.2.4",
"@elasticpath/d2c-schematics": "^0.10.1",
Expand Down Expand Up @@ -57,6 +57,7 @@
"zod": "^3.22.2"
},
"devDependencies": {
"@algolia/client-search": "^4.20.0",
"@types/fs-extra": "^9.0.13",
"@types/ink-big-text": "^1.2.1",
"@types/ink-gradient": "^2.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ export interface Option extends yargs.Options {
export async function parseJsonSchemaToOptions(
registry: json.schema.SchemaRegistry,
schema: json.JsonObject,
interactive = true
interactive = true,
): Promise<Option[]> {
const options: Option[] = []

function visitor(
current: json.JsonObject | json.JsonArray,
pointer: json.schema.JsonPointer,
parentSchema?: json.JsonObject | json.JsonArray
parentSchema?: json.JsonObject | json.JsonArray,
) {
if (!parentSchema) {
// Ignore root.
Expand Down Expand Up @@ -211,7 +211,7 @@ export async function parseJsonSchemaToOptions(
options.push(option)
}

const flattenedSchema = await registry.flatten(schema).toPromise()
const flattenedSchema = await registry.ɵflatten(schema)
// @ts-ignore
json.schema.visitJsonSchema(flattenedSchema, visitor)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Settings } from "@algolia/client-search"
import type { Settings } from "@algolia/client-search"

export function configureAlgoliaFacets(sourceSettings: Settings): Settings {
const { attributesForFaceting } = sourceSettings
Expand Down
4 changes: 4 additions & 0 deletions packages/composable-cli/src/lib/devkit/add-env-variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export async function addToEnvFile(

const tree = await callRule(rule, initialTree, context).toPromise()

if (!tree) {
throw new Error("Tree is undefined after calling rule")
}

await commitTree(host, tree)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/composable-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"vitest": "^0.29.7"
},
"dependencies": {
"@angular-devkit/core": "^15.2.2",
"@angular-devkit/schematics": "^15.2.2",
"@angular-devkit/core": "^16.2.8",
"@angular-devkit/schematics": "^16.2.8",
"@graphql-typed-document-node/core": "^3.2.0",
"@moltin/sdk": "^25.0.2",
"@types/uuid": "^9.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/d2c-schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
"schematics": "./collection.json",
"dependencies": {
"@angular-devkit/core": "^14.1.0",
"@angular-devkit/schematics": "^14.1.0",
"@angular-devkit/core": "^16.2.8",
"@angular-devkit/schematics": "^16.2.8",
"@elasticpath/composable-common": "^0.2.5",
"@elasticpath/composable-integration-hub-deployer": "^0.2.4",
"@moltin/sdk": "^25.0.2",
Expand Down
Loading

0 comments on commit bb05c3e

Please sign in to comment.