Skip to content

Commit

Permalink
fix(showcase): first local build dep concurrency (#2402)
Browse files Browse the repository at this point in the history
## Proposed change

fix(showcase): first local build dep concurrency
fix(showcase): warning on virtual-test dependencies

<!--
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)
-->

*- No issue associated -*

<!-- * 🐛 Fix #issue -->
<!-- * 🐛 Fix resolves #issue -->
<!-- * 🚀 Feature #issue -->
<!-- * 🚀 Feature resolves #issue -->
<!-- * :octocat: Pull Request #issue -->
  • Loading branch information
kpanot authored Nov 5, 2024
2 parents e45d060 + efc6462 commit 4ec6c8f
Show file tree
Hide file tree
Showing 20 changed files with 119 additions and 29 deletions.
4 changes: 2 additions & 2 deletions apps/showcase/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"output": "/localizations"
},
{
"glob": "**/*.metadata.json",
"glob": "*.metadata.json",
"input": "apps/showcase",
"output": "/metadata"
}
Expand All @@ -95,7 +95,7 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumWarning": "2.5mb",
"maximumError": "2.5mb"
},
{
Expand Down
3 changes: 3 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@
"build-tools": {
"cache": true
},
"build-utils": {
"cache": true
},
"copy-assets": {
"cache": true
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@ama-sdk/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"typescript": "~5.5.4"
},
"generatorDependencies": {
"@swc/cli": "~0.4.0",
"@swc/cli": "~0.5.0",
"@swc/core": "~1.7.0",
"@swc/helpers": "~0.5.0",
"@commitlint/cli": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/testing/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
'parserOptions': {
'tsconfigRootDir': __dirname,
'project': [
'tsconfig.tools.json',
'tsconfig.build.tools.json',
'tsconfig.schematics.json',
'tsconfig.build.json',
'tsconfig.eslint.json',
Expand Down
6 changes: 4 additions & 2 deletions packages/@o3r/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"prepare:build:builders": "yarn cpy 'schematics/**/*.json' 'schematics/**/templates/**' dist/schematics && yarn cpy '{collection,migration}.json' dist",
"prepare:publish": "prepare-publish ./dist",
"build:schematics": "tsc -b tsconfig.schematics.json --pretty && yarn generate-cjs-manifest",
"build:tools": "tsc -b tsconfig.tools.json --pretty",
"build:tools": "tsc -b tsconfig.build.tools.json --pretty",
"build:utils": "tsc -b tsconfig.build.utils.json --pretty && node ./scripts/generate-esm-manifest.cjs",
"postbuild": "patch-package-json-main"
},
"exports": {
Expand Down Expand Up @@ -90,7 +91,8 @@
},
"./visual-test/utils": {
"types": "./visual-test/utils.d.ts",
"default": "./visual-test/utils.js"
"default": "./visual-test/utils.js",
"import": "./esm/visual-test/utils.js"
}
},
"peerDependencies": {
Expand Down
31 changes: 30 additions & 1 deletion packages/@o3r/testing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
"options": {
"script": "postbuild"
},
"dependsOn": ["compile", "build-schematics", "build-tools"]
"dependsOn": [
"compile",
"build-schematics",
"build-tools",
"build-utils"
]
},
"compile": {
"executor": "@nx/js:tsc",
Expand Down Expand Up @@ -41,11 +46,35 @@
"build-tools": {
"executor": "nx:run-script",
"outputs": ["{projectRoot}/dist/src/tools/protractor"],
"inputs": [
"base-build",
"{projectRoot}/tsconfig.build.tools.json",
"{projectRoot}/src/tools/protractor/fetch-manager/_fetch-manager.ts",
"{projectRoot}/src/tools/protractor/post-message-interceptor/_post-message-interceptor.ts"
],
"options": {
"script": "build:tools"
},
"dependsOn": ["^build", "compile"]
},
"build-utils": {
"executor": "nx:run-script",
"outputs": [
"{projectRoot}/dist/esm"
],
"inputs": [
"base-build",
"{projectRoot}/tsconfig.build.utils.json",
"{projectRoot}/src/visual-test/utils.ts"
],
"options": {
"script": "build:utils"
},
"dependsOn": [
"^build",
"compile"
]
},
"lint": {
"options": {
"eslintConfig": "packages/@o3r/testing/.eslintrc.js",
Expand Down
7 changes: 7 additions & 0 deletions packages/@o3r/testing/scripts/generate-esm-manifest.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { writeFileSync } = require('node:fs');
const { resolve } = require('node:path');

/** @type {import('type-fest').PackageJson}*/
const packageFileContent = { type: 'module' };

writeFileSync(resolve(__dirname, '..', 'dist', 'esm', 'package.json'), JSON.stringify(packageFileContent, null, 2));
File renamed without changes.
12 changes: 12 additions & 0 deletions packages/@o3r/testing/tsconfig.build.utils.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../../tsconfig.build",
"compilerOptions": {
"incremental": true,
"rootDir": "src",
"tsBuildInfoFile": "build/.tsbuildinfo.utils",
"outDir": "./dist/esm"
},
"include": [
"src/visual-test/utils.ts"
]
}
3 changes: 2 additions & 1 deletion packages/@o3r/testing/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./tsconfig.build",
"include": [
".eslintrc.js"
".eslintrc.js",
"scripts/**"
],
"exclude": [
"node_modules/**"
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/testing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"path": "./tsconfig.build.composite.json"
},
{
"path": "./tsconfig.tools.json"
"path": "./tsconfig.build.tools.json"
},
{
"path": "./tsconfig.spec.json"
Expand Down
17 changes: 13 additions & 4 deletions tools/github-actions/audit/packaged-action/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/github-actions/audit/packaged-action/index.js.map

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions tools/github-actions/cascading/packaged-action/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions tools/github-actions/get-npm-tag/packaged-action/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions tools/github-actions/new-version/packaged-action/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@o3r/test-helpers": ["packages/@o3r/test-helpers/dist", "packages/@o3r/test-helpers/src/public_api"],
"@o3r/test-helpers/setup-jest-builders": ["packages/@o3r/test-helpers/dist/src/setup-jest-builders", "packages/@o3r/test-helpers/src/setup-jest-builders"],
"@o3r/testing": ["packages/@o3r/testing/dist", "packages/@o3r/testing/src/public_api"],
"@o3r/testing/*": ["packages/@o3r/testing/dist/*", "packages/@o3r/testing/src/*"],
"@o3r/testing/*": ["packages/@o3r/testing/dist/esm/*", "packages/@o3r/testing/dist/*", "packages/@o3r/testing/src/*"],
"@o3r/third-party": ["packages/@o3r/third-party/dist", "packages/@o3r/third-party/src/public_api"],
"@o3r/training-tools": ["packages/@o3r/training-tools/dist", "packages/@o3r/training-tools/src/public_api"],
"@o3r/workspace": ["packages/@o3r/workspace/dist"]
Expand Down

0 comments on commit 4ec6c8f

Please sign in to comment.