diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9408d22e4..a6a26b87fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -129,6 +129,17 @@ jobs: key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }} restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }} + - name: Apply templates... + run: node common/scripts/install-run-rush.js apply-templates + + - name: Check templates + run: | + echo '================================================================' + echo 'Checking for diff files' + echo '================================================================' + git diff '*.js' '*.ts' '*.svelte' '*.json' | cat + [ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' | cat)" ] + echo '================================================================' - name: Formatting... run: node common/scripts/install-run-rush.js fast-format - name: Check files formatting @@ -136,8 +147,8 @@ jobs: echo '================================================================' echo 'Checking for diff files' echo '================================================================' - git diff '*.ts' '*.svelte' | cat - [ -z "$(git diff --name-only '*.ts' '*.svelte' | cat)" ] + git diff '*.js' '*.ts' '*.svelte' '*.json' | cat + [ -z "$(git diff --name-only '*.js' '*.ts' '*.svelte' '*.json' | cat)" ] echo '================================================================' test: needs: build diff --git a/packages/platform-rig/profiles/default/tsconfig.json b/packages/platform-rig/profiles/default/tsconfig.json index c781b3fb57..c434de43a6 100644 --- a/packages/platform-rig/profiles/default/tsconfig.json +++ b/packages/platform-rig/profiles/default/tsconfig.json @@ -16,6 +16,7 @@ "esModuleInterop": true, "rootDir": "./src", "outDir": "./lib", - "incremental": true + "incremental": true, + "isolatedModules": true } } \ No newline at end of file diff --git a/packages/platform-rig/profiles/model/tsconfig.json b/packages/platform-rig/profiles/model/tsconfig.json index 9d0a124be8..3a7ae70f1b 100644 --- a/packages/platform-rig/profiles/model/tsconfig.json +++ b/packages/platform-rig/profiles/model/tsconfig.json @@ -11,6 +11,8 @@ "skipDefaultLibCheck": true, "declarationMap": true, "esModuleInterop": true, - "incremental": true + "incremental": true, + "types" : [], + "isolatedModules": true } } \ No newline at end of file diff --git a/packages/platform-rig/profiles/node/tsconfig.json b/packages/platform-rig/profiles/node/tsconfig.json index c7b55d78d5..be325351a1 100644 --- a/packages/platform-rig/profiles/node/tsconfig.json +++ b/packages/platform-rig/profiles/node/tsconfig.json @@ -14,6 +14,7 @@ "esModuleInterop": true, "rootDir": "./src", "outDir": "./lib", - "incremental": true + "incremental": true, + "isolatedModules": true } } diff --git a/packages/platform-rig/profiles/package/tsconfig.json b/packages/platform-rig/profiles/package/tsconfig.json index a70b799bfa..6c389326f9 100644 --- a/packages/platform-rig/profiles/package/tsconfig.json +++ b/packages/platform-rig/profiles/package/tsconfig.json @@ -14,6 +14,7 @@ "esModuleInterop": true, "rootDir": "./src", "outDir": "./lib", - "incremental": true + "incremental": true, + "isolatedModules": true } } \ No newline at end of file diff --git a/packages/platform-rig/profiles/ui/tsconfig.json b/packages/platform-rig/profiles/ui/tsconfig.json index 9f7227676c..e095e09e86 100644 --- a/packages/platform-rig/profiles/ui/tsconfig.json +++ b/packages/platform-rig/profiles/ui/tsconfig.json @@ -16,6 +16,8 @@ "esnext", "dom" ], - "incremental": true + "incremental": true, + "types": ["jest"], + "isolatedModules": true } } \ No newline at end of file diff --git a/packages/rank/package.json b/packages/rank/package.json index 4a65f616e4..8aa607f13d 100644 --- a/packages/rank/package.json +++ b/packages/rank/package.json @@ -29,8 +29,8 @@ "prettier-plugin-svelte": "^3.1.0", "jest": "^29.7.0", "ts-jest": "^29.1.1", - "@types/jest":"^29.5.5", - "typescript":"^5.3.3" + "@types/jest": "^29.5.5", + "typescript": "^5.3.3" }, "dependencies": { "lexorank": "~1.0.4" diff --git a/pods/authProviders/config/rig.json b/pods/authProviders/config/rig.json new file mode 100644 index 0000000000..0110930f55 --- /dev/null +++ b/pods/authProviders/config/rig.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig" +} diff --git a/templates/apply.js b/templates/apply.js index f6ef4b2638..a1f2083eee 100644 --- a/templates/apply.js +++ b/templates/apply.js @@ -66,7 +66,7 @@ function updatePackage(packageRoot, templates) { let template for (const t of templates) { - if( t.isDefault) { + if( t.isDefault && currentPackage.template === undefined) { template = t } @@ -76,7 +76,7 @@ function updatePackage(packageRoot, templates) { break } - if (t.package.peerDependencies !== undefined) { + if (t.package.peerDependencies !== undefined && currentPackage.template === undefined) { const peers = Object.keys(t.package.peerDependencies) const deps = Object.keys(currentPackage.dependencies ?? {}) const devDeps = Object.keys(currentPackage.devDependencies ?? {}) @@ -86,6 +86,11 @@ function updatePackage(packageRoot, templates) { } } } + if( template === undefined) { + console.warn('No template found for package', currentPackage.template) + return + } + console.log('updating => ', currentPackage.name, ' with template', template.package.name) const packageJson = template.package