Skip to content

Commit

Permalink
chore: set peer-dependencies to caret (#2569)
Browse files Browse the repository at this point in the history
## Proposed change

chore: set peer-dependencies to caret

<!--
Please include a summary of the changes and the related issue.
Please also include relevant motivation and context.
-->

## Related issues

<!--
Please make sure to follow the [contribution
guidelines](https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md)
-->

* 🐛 Fix resolves #2547
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
  • Loading branch information
kpanot authored Dec 11, 2024
2 parents b92766f + 8e0ba50 commit 06f004a
Show file tree
Hide file tree
Showing 56 changed files with 840 additions and 711 deletions.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packageExtensions:
"@swc/types": "*"
"@typescript-eslint/rule-tester@*":
dependencies:
"@typescript-eslint/parser": ~8.16.0
"@typescript-eslint/parser": ~8.17.0
"@angular-eslint/eslint-plugin-template@*":
dependencies:
"@typescript-eslint/types": "^8.0.0"
Expand Down
10 changes: 5 additions & 5 deletions packages/@ama-sdk/client-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
},
"peerDependencies": {
"@ama-sdk/core": "workspace:^",
"@angular-devkit/schematics": "~18.2.0",
"@angular/cli": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/cli": "^18.2.0",
"@angular/common": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
10 changes: 5 additions & 5 deletions packages/@ama-sdk/client-beacon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
},
"peerDependencies": {
"@ama-sdk/core": "workspace:^",
"@angular-devkit/schematics": "~18.2.0",
"@angular/cli": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/cli": "^18.2.0",
"@angular/common": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"typescript": "~5.5.4"
"@schematics/angular": "^18.2.0",
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
10 changes: 5 additions & 5 deletions packages/@ama-sdk/client-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
},
"peerDependencies": {
"@ama-sdk/core": "workspace:^",
"@angular-devkit/schematics": "~18.2.0",
"@angular/cli": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/cli": "^18.2.0",
"@angular/common": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"isomorphic-fetch": "^3.0.0",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
10 changes: 5 additions & 5 deletions packages/@ama-sdk/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,14 @@
"uuid": "^10.0.0"
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular/cli": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/cli": "^18.2.0",
"@angular/common": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"isomorphic-fetch": "^3.0.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
9 changes: 5 additions & 4 deletions packages/@ama-sdk/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@
},
"peerDependencies": {
"@ama-sdk/core": "workspace:^",
"@angular-devkit/core": "~18.2.0",
"@angular-devkit/core": "^18.2.0",
"@angular-devkit/schematics-cli": "^18.0.5",
"@angular/cli": "~18.2.0",
"@angular/cli": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@openapitools/openapi-generator-cli": "~2.15.0",
"@openapitools/openapi-generator-cli": "^2.15.0",
"openapi-types": "^12.0.0",
"type-fest": "^4.10.2"
},
Expand Down Expand Up @@ -140,10 +140,11 @@
},
"generatorDependencies": {
"@swc/cli": "~0.5.0",
"@swc/core": "~1.9.0",
"@swc/core": "~1.10.0",
"@swc/helpers": "~0.5.0",
"@commitlint/cli": "^19.0.0",
"@commitlint/config-conventional": "^19.0.0",
"@typescript-eslint/eslint-plugin": "~8.17.0",
"jest-junit": "~16.0.0",
"lint-staged": "^15.0.0",
"minimist": "^1.2.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ function ngGenerateTypescriptSDKFn(options: NgGenerateTypescriptSDKShellSchemati
const setupRule = async (tree: Tree, context: SchematicContext) => {
const amaSdkSchematicsPackageJson = await readPackageJson();

const versions = {
const { enforceTildeRange } = await import('@o3r/schematics');

const versions = Object.fromEntries(Object.entries({
tslib: amaSdkSchematicsPackageJson.dependencies!.tslib,
'@commitlint/cli': amaSdkSchematicsPackageJson.generatorDependencies['@commitlint/cli'],
'@commitlint/config-conventional': amaSdkSchematicsPackageJson.generatorDependencies['@commitlint/config-conventional'],
Expand All @@ -54,7 +56,7 @@ function ngGenerateTypescriptSDKFn(options: NgGenerateTypescriptSDKShellSchemati
'@swc/core': amaSdkSchematicsPackageJson.generatorDependencies['@swc/core'],
'@types/jest': amaSdkSchematicsPackageJson.devDependencies!['@types/jest'],
'@types/node': amaSdkSchematicsPackageJson.devDependencies!['@types/node'],
'@typescript-eslint/eslint-plugin': amaSdkSchematicsPackageJson.devDependencies!['@typescript-eslint/eslint-plugin'],
'@typescript-eslint/eslint-plugin': amaSdkSchematicsPackageJson.generatorDependencies['@typescript-eslint/eslint-plugin'],
'@typescript-eslint/parser': amaSdkSchematicsPackageJson.devDependencies!['@typescript-eslint/parser'],
'@openapitools/openapi-generator-cli': amaSdkSchematicsPackageJson.devDependencies!['@openapitools/openapi-generator-cli'],
'@stylistic/eslint-plugin': amaSdkSchematicsPackageJson.devDependencies!['@stylistic/eslint-plugin'],
Expand All @@ -79,7 +81,8 @@ function ngGenerateTypescriptSDKFn(options: NgGenerateTypescriptSDKShellSchemati
'tsc-watch': amaSdkSchematicsPackageJson.generatorDependencies['tsc-watch'],
'yaml-eslint-parser': amaSdkSchematicsPackageJson.generatorDependencies['yaml-eslint-parser'],
typedoc: amaSdkSchematicsPackageJson.generatorDependencies.typedoc
};
}).map(([key, range]) => ([key, enforceTildeRange(range)])));

const openApiSupportedVersion = typeof amaSdkSchematicsPackageJson.openApiSupportedVersion === 'string'
&& amaSdkSchematicsPackageJson.openApiSupportedVersion.replace(/\^|~/, '');
context.logger.warn(JSON.stringify(openApiSupportedVersion));
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r-training/showcase-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"peerDependencies": {
"@ama-sdk/client-fetch": "workspace:^",
"@ama-sdk/core": "workspace:^",
"isomorphic-fetch": "~3.0.0"
"isomorphic-fetch": "^3.0.0"
},
"engines": {
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/@o3r-training/training-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
}
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@webcontainer/api": "~1.5.0",
"@schematics/angular": "^18.2.0",
"@webcontainer/api": "^1.5.0",
"rxjs": "^7.8.1",
"type-fest": "^4.10.2",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/architect": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/amaterasu/amaterasu-otter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
},
"peerDependencies": {
"@ama-terasu/core": "workspace:^",
"@angular/cli": "~18.2.0"
"@angular/cli": "^18.2.0"
},
"engines": {
"node": "^18.19.1 || ^20.11.1 || >=22.0.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/@o3r/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@
},
"peerDependencies": {
"@ama-sdk/core": "workspace:^",
"@angular-devkit/schematics": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular/core": "~18.2.0",
"@angular/platform-browser": "~18.2.0",
"@angular/platform-browser-dynamic": "~18.2.0",
"@angular/router": "~18.2.0",
"@ngrx/store": "~18.0.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/common": "^18.2.0",
"@angular/core": "^18.2.0",
"@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0",
"@angular/router": "^18.2.0",
"@ngrx/store": "^18.0.0",
"@o3r/core": "workspace:^",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"jasmine": "^5.0.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4",
"webpack": "~5.96.0"
"typescript": "^5.5.4",
"webpack": "^5.96.0"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
10 changes: 5 additions & 5 deletions packages/@o3r/apis-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"peerDependencies": {
"@ama-sdk/client-fetch": "workspace:^",
"@ama-sdk/core": "workspace:^",
"@angular-devkit/schematics": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular/core": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/common": "^18.2.0",
"@angular/core": "^18.2.0",
"@o3r/schematics": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@ama-sdk/client-fetch": {
Expand Down
10 changes: 5 additions & 5 deletions packages/@o3r/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"prepare:publish": "prepare-publish ./dist"
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular/core": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/common": "^18.2.0",
"@angular/core": "^18.2.0",
"@o3r/core": "workspace:^",
"@o3r/logger": "workspace:^",
"@o3r/routing": "workspace:^",
"@o3r/schematics": "workspace:^",
"@o3r/testing": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/artifactory-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"winston": "^3.8.2"
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@o3r/telemetry": "workspace:^"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/azure-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"winston": "^3.8.2"
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@o3r/telemetry": "workspace:^"
},
"peerDependenciesMeta": {
Expand Down
28 changes: 14 additions & 14 deletions packages/@o3r/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
"postbuild": "patch-package-json-main"
},
"peerDependencies": {
"@angular-devkit/architect": "~0.1802.0",
"@angular-devkit/core": "~18.2.0",
"@angular-devkit/schematics": "~18.2.0",
"@angular/cdk": "~18.2.0",
"@angular/common": "~18.2.0",
"@angular/core": "~18.2.0",
"@angular/forms": "~18.2.0",
"@angular/platform-browser": "~18.2.0",
"@angular/platform-browser-dynamic": "~18.2.0",
"@ngrx/effects": "~18.0.0",
"@ngrx/entity": "~18.0.0",
"@ngrx/store": "~18.0.0",
"@angular-devkit/architect": "^0.1802.0",
"@angular-devkit/core": "^18.2.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/cdk": "^18.2.0",
"@angular/common": "^18.2.0",
"@angular/core": "^18.2.0",
"@angular/forms": "^18.2.0",
"@angular/platform-browser": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0",
"@ngrx/effects": "^18.0.0",
"@ngrx/entity": "^18.0.0",
"@ngrx/store": "^18.0.0",
"@o3r/analytics": "workspace:^",
"@o3r/configuration": "workspace:^",
"@o3r/core": "workspace:^",
Expand All @@ -53,7 +53,7 @@
"@o3r/rules-engine": "workspace:^",
"@o3r/schematics": "workspace:^",
"@o3r/testing": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"@yarnpkg/cli": "^4.0.0",
"@yarnpkg/core": "^4.1.1",
"@yarnpkg/fslib": "^3.1.0",
Expand All @@ -64,7 +64,7 @@
"jsonpath-plus": "^9.0.0 || ^10.0.0",
"rxjs": "^7.8.1",
"semver": "^7.5.2",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/core": {
Expand Down
14 changes: 7 additions & 7 deletions packages/@o3r/configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
"prepare:publish": "prepare-publish ./dist"
},
"peerDependencies": {
"@angular-devkit/schematics": "~18.2.0",
"@angular/core": "~18.2.0",
"@angular/platform-browser-dynamic": "~18.2.0",
"@ngrx/entity": "~18.0.0",
"@ngrx/store": "~18.0.0",
"@angular-devkit/schematics": "^18.2.0",
"@angular/core": "^18.2.0",
"@angular/platform-browser-dynamic": "^18.2.0",
"@ngrx/entity": "^18.0.0",
"@ngrx/store": "^18.0.0",
"@o3r/core": "workspace:^",
"@o3r/logger": "workspace:^",
"@o3r/schematics": "workspace:^",
"@o3r/testing": "workspace:^",
"@schematics/angular": "~18.2.0",
"@schematics/angular": "^18.2.0",
"cheerio": "^1.0.0-rc.10",
"express-interceptor": "^1.2.0",
"jasmine": "^5.0.0",
"rxjs": "^7.8.1",
"typescript": "~5.5.4"
"typescript": "^5.5.4"
},
"peerDependenciesMeta": {
"@angular-devkit/schematics": {
Expand Down
Loading

0 comments on commit 06f004a

Please sign in to comment.