diff --git a/.bitmap b/.bitmap index eddc6336..16f9b3c0 100644 --- a/.bitmap +++ b/.bitmap @@ -153,12 +153,12 @@ "mainFile": "index.ts", "rootDir": "angular/examples/my-angular-v16-env" }, - "readme": { + /*"readme": { "scope": "bitdev.angular", "version": "1.0.1", "mainFile": "index.ts", "rootDir": "angular/readme" - }, + },*/ "templates/generators": { "scope": "bitdev.angular", "version": "1.0.0", @@ -172,4 +172,4 @@ "rootDir": "angular/templates/starters" }, "$schema-version": "16.0.0" -} \ No newline at end of file +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e87df8be..cdce1856 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep default - run: npm i replace-in-file && node scripts/keep-env.js --version=16 --default + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=16 --default - name: Cleanup node modules run: rm -rf node_modules @@ -36,53 +36,56 @@ jobs: run: bit install --log - name: Remove v15 - run: bit remove versions/angular-v15 -s -f --log + run: bit remove envs/angular-v15-env -s -f --log - name: Remove v15 fork - run: bit remove forks/angular-env-v15 -s -f --log + run: bit remove examples/my-angular-v15-env -s -f --log - name: Remove v14 - run: bit remove versions/angular-v14 -s -f --log + run: bit remove envs/angular-v14-env -s -f --log - name: Remove v14 fork - run: bit remove forks/angular-env-v14 -s -f --log + run: bit remove examples/my-angular-v14-env -s -f --log - name: Remove v13 - run: bit remove versions/angular-v13 -s -f --log + run: bit remove envs/angular-v13-env -s -f --log - name: Remove v13 fork - run: bit remove forks/angular-env-v13 -s -f --log + run: bit remove examples/my-angular-v13-env -s -f --log - name: Remove v12 - run: bit remove versions/angular-v12 -s -f --log + run: bit remove envs/angular-v12-env -s -f --log - name: Remove v12 fork - run: bit remove forks/angular-env-v12 -s -f --log + run: bit remove examples/my-angular-v12-env -s -f --log - name: Add example component - run: bit add examples/demo-lib --log + run: bit add integration/demo-lib --log - name: Add example app - run: bit add examples/demo-app --log + run: bit add integration/demo-app --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + # Compile the example app - name: Bit compile example app run: bit compile demo-app --log @@ -113,7 +116,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep v16 - run: npm i replace-in-file && node scripts/keep-env.js --version=16 + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=16 - name: Cleanup node modules run: rm -rf node_modules @@ -122,56 +125,59 @@ jobs: run: bit install --log - name: Remove default - run: bit remove angular -s -f --log + run: bit remove angular-env -s -f --log - name: Remove default fork - run: bit remove forks/angular-env-default -s -f --log + run: bit remove examples/my-angular-env -s -f --log - name: Remove v15 - run: bit remove versions/angular-v15 -s -f --log + run: bit remove envs/angular-v15-env -s -f --log - name: Remove v15 fork - run: bit remove forks/angular-env-v15 -s -f --log + run: bit remove examples/my-angular-v15-env -s -f --log - name: Remove v14 - run: bit remove versions/angular-v14 -s -f --log + run: bit remove envs/angular-v14-env -s -f --log - name: Remove v14 fork - run: bit remove forks/angular-env-v14 -s -f --log + run: bit remove examples/my-angular-v14-env -s -f --log - name: Remove v13 - run: bit remove versions/angular-v13 -s -f --log + run: bit remove envs/angular-v13-env -s -f --log - name: Remove v13 fork - run: bit remove forks/angular-env-v13 -s -f --log + run: bit remove examples/my-angular-v13-env -s -f --log - name: Remove v12 - run: bit remove versions/angular-v12 -s -f --log + run: bit remove envs/angular-v12-env -s -f --log - name: Remove v12 fork - run: bit remove forks/angular-env-v12 -s -f --log + run: bit remove examples/my-angular-v12-env -s -f --log - name: Add example component - run: bit add examples/demo-lib-v16 --log + run: bit add integration/demo-lib-v16 --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + - name: Bit test run: bit test --log @@ -199,7 +205,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep v15 - run: npm i replace-in-file && node scripts/keep-env.js --version=15 + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=15 - name: Cleanup node modules run: rm -rf node_modules @@ -208,56 +214,59 @@ jobs: run: bit install --log - name: Remove default - run: bit remove angular -s -f --log + run: bit remove angular-env -s -f --log - name: Remove default fork - run: bit remove forks/angular-env-default -s -f --log + run: bit remove examples/my-angular-env -s -f --log - name: Remove v16 - run: bit remove versions/angular-v16 -s -f --log + run: bit remove envs/angular-v16-env -s -f --log - name: Remove v16 fork - run: bit remove forks/angular-env-v16 -s -f --log + run: bit remove examples/my-angular-v16-env -s -f --log - name: Remove v14 - run: bit remove versions/angular-v14 -s -f --log + run: bit remove envs/angular-v14-env -s -f --log - name: Remove v14 fork - run: bit remove forks/angular-env-v14 -s -f --log + run: bit remove examples/my-angular-v14-env -s -f --log - name: Remove v13 - run: bit remove versions/angular-v13 -s -f --log + run: bit remove envs/angular-v13-env -s -f --log - name: Remove v13 fork - run: bit remove forks/angular-env-v13 -s -f --log + run: bit remove examples/my-angular-v13-env -s -f --log - name: Remove v12 - run: bit remove versions/angular-v12 -s -f --log + run: bit remove envs/angular-v12-env -s -f --log - name: Remove v12 fork - run: bit remove forks/angular-env-v12 -s -f --log + run: bit remove examples/my-angular-v12-env -s -f --log - name: Add example component - run: bit add examples/demo-lib-v15 --log + run: bit add integration/demo-lib-v15 --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + - name: Bit test run: bit test --log @@ -284,7 +293,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep v14 - run: npm i replace-in-file && node scripts/keep-env.js --version=14 + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=14 - name: Cleanup node modules run: rm -rf node_modules @@ -293,56 +302,59 @@ jobs: run: bit install --log - name: Remove default - run: bit remove angular -s -f --log + run: bit remove angular-env -s -f --log - name: Remove default fork - run: bit remove forks/angular-env-default -s -f --log + run: bit remove examples/my-angular-env -s -f --log - name: Remove v16 - run: bit remove versions/angular-v16 -s -f --log + run: bit remove envs/angular-v16-env -s -f --log - name: Remove v16 fork - run: bit remove forks/angular-env-v16 -s -f --log + run: bit remove examples/my-angular-v16-env -s -f --log - name: Remove v15 - run: bit remove versions/angular-v15 -s -f --log + run: bit remove envs/angular-v15-env -s -f --log - name: Remove v15 fork - run: bit remove forks/angular-env-v15 -s -f --log + run: bit remove examples/my-angular-v15-env -s -f --log - name: Remove v13 - run: bit remove versions/angular-v13 -s -f --log + run: bit remove envs/angular-v13-env -s -f --log - name: Remove v13 fork - run: bit remove forks/angular-env-v13 -s -f --log + run: bit remove examples/my-angular-v13-env -s -f --log - name: Remove v12 - run: bit remove versions/angular-v12 -s -f --log + run: bit remove envs/angular-v12-env -s -f --log - name: Remove v12 fork - run: bit remove forks/angular-env-v12 -s -f --log + run: bit remove examples/my-angular-v12-env -s -f --log - name: Add example component - run: bit add examples/demo-lib-v14 --log + run: bit add integration/demo-lib-v14 --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + - name: Bit test run: bit test --log @@ -369,7 +381,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep v13 - run: npm i replace-in-file && node scripts/keep-env.js --version=13 + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=13 - name: Cleanup node modules run: rm -rf node_modules @@ -378,56 +390,59 @@ jobs: run: bit install --log - name: Remove default - run: bit remove angular -s -f --log + run: bit remove angular-env -s -f --log - name: Remove default fork - run: bit remove forks/angular-env-default -s -f --log + run: bit remove examples/my-angular-env -s -f --log - name: Remove v16 - run: bit remove versions/angular-v16 -s -f --log + run: bit remove envs/angular-v16-env -s -f --log - name: Remove v16 fork - run: bit remove forks/angular-env-v16 -s -f --log + run: bit remove examples/my-angular-v16-env -s -f --log - name: Remove v15 - run: bit remove versions/angular-v15 -s -f --log + run: bit remove envs/angular-v15-env -s -f --log - name: Remove v15 fork - run: bit remove forks/angular-env-v15 -s -f --log + run: bit remove examples/my-angular-v15-env -s -f --log - name: Remove v14 - run: bit remove versions/angular-v14 -s -f --log + run: bit remove envs/angular-v14-env -s -f --log - name: Remove v14 fork - run: bit remove forks/angular-env-v14 -s -f --log + run: bit remove examples/my-angular-v14-env -s -f --log - name: Remove v12 - run: bit remove versions/angular-v12 -s -f --log + run: bit remove envs/angular-v12-env -s -f --log - name: Remove v12 fork - run: bit remove forks/angular-env-v12 -s -f --log + run: bit remove examples/my-angular-v12-env -s -f --log - name: Add example component - run: bit add examples/demo-lib-v13 --log + run: bit add integration/demo-lib-v13 --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + - name: Bit test run: bit test --log @@ -455,7 +470,7 @@ jobs: - uses: actions/checkout@v3 - name: Keep v12 - run: npm i replace-in-file && node scripts/keep-env.js --version=12 + run: npm i replace-in-file@6.3.5 && node scripts/keep-env.js --version=12 - name: Cleanup node modules run: rm -rf node_modules @@ -464,56 +479,59 @@ jobs: run: bit install --log - name: Remove default - run: bit remove angular -s -f --log + run: bit remove angular-env -s -f --log - name: Remove default fork - run: bit remove forks/angular-env-default -s -f --log + run: bit remove examples/my-angular-env -s -f --log - name: Remove v16 - run: bit remove versions/angular-v16 -s -f --log + run: bit remove envs/angular-v16-env -s -f --log - name: Remove v16 fork - run: bit remove forks/angular-env-v16 -s -f --log + run: bit remove examples/my-angular-v16-env -s -f --log - name: Remove v15 - run: bit remove versions/angular-v15 -s -f --log + run: bit remove envs/angular-v15-env -s -f --log - name: Remove v15 fork - run: bit remove forks/angular-env-v15 -s -f --log + run: bit remove examples/my-angular-v15-env -s -f --log - name: Remove v14 - run: bit remove versions/angular-v14 -s -f --log + run: bit remove envs/angular-v14-env -s -f --log - name: Remove v14 fork - run: bit remove forks/angular-env-v14 -s -f --log + run: bit remove examples/my-angular-v14-env -s -f --log - name: Remove v13 - run: bit remove versions/angular-v13 -s -f --log + run: bit remove envs/angular-v13-env -s -f --log - name: Remove v13 fork - run: bit remove forks/angular-env-v13 -s -f --log + run: bit remove examples/my-angular-v13-env -s -f --log - name: Add example component - run: bit add examples/demo-lib-v12 --log + run: bit add integration/demo-lib-v12 --log - - name: Cleanup node modules + - name: Bit cc run: bit cc - - name: Cleanup node modules + - name: Cleanup capsules run: bit capsule delete --all - name: Cleanup node modules run: rm -rf node_modules - - name: Cleanup node modules + - name: Cleanup package-lock.json run: rm -rf package-lock.json - - name: Cleanup node modules + - name: Cleanup .git/bit run: rm -rf .git/bit - name: Install dependencies run: bit install --log + - name: Generate config files + run: bit ws-config write + - name: Bit test run: bit test --log diff --git a/scripts/keep-env.js b/scripts/keep-env.js index 03b6c3cc..321f7bcc 100644 --- a/scripts/keep-env.js +++ b/scripts/keep-env.js @@ -19,13 +19,13 @@ const argv = key => { const regexp = []; // Remove all versions but this one const version = parseInt(argv('version')); -regexp.push(new RegExp(`\\s\\s"teambit\\.angular\\/versions\\/angular\\-v(?!${version})\\d\\d?":\\s\\{\\},\\n`, "g")); +regexp.push(new RegExp(`\\s\\s"bitdev\\.angular\\/envs\\/angular\\-v(?!${version})\\d\\d?\\-env":\\s\\{\\},\\n`, "g")); const defaultEnv = argv('default'); // Remove default env & app if needed if(!defaultEnv) { - regexp.push(new RegExp(`\\s\\s"teambit\\.angular\\/angular":\\s\\{\\},\\n`, "g")); - regexp.push(new RegExp(`\\s\\s"examples\\/demo-app":\\s\\{\\},\\n`, "g")); + regexp.push(new RegExp(`\\s\\s"bitdev\\.angular\\/angular\\-env":\\s\\{\\},\\n`, "g")); + regexp.push(new RegExp(`\\s\\s"integration\\/demo-app":\\s\\{\\},\\n`, "g")); } try { diff --git a/workspace.jsonc b/workspace.jsonc index 7fed5ce1..c20da6aa 100644 --- a/workspace.jsonc +++ b/workspace.jsonc @@ -77,20 +77,22 @@ }, "teambit.generator/generator": { "envs": [ - // "bitdev.angular/angular-env", - "bitdev.angular/envs/angular-v16-env" - // "bitdev.angular/envs/angular-v15-env", - // "bitdev.angular/envs/angular-v14-env", - // "bitdev.angular/envs/angular-v13-env", - // "bitdev.angular/envs/angular-v12-env", + "bitdev.angular/angular-env", + "bitdev.angular/envs/angular-v16-env", + "bitdev.angular/envs/angular-v15-env", + "bitdev.angular/envs/angular-v14-env", + "bitdev.angular/envs/angular-v13-env", + "bitdev.angular/envs/angular-v12-env", ] }, - // "bitdev.angular/envs/angular-v15-env": {}, - // "bitdev.angular/envs/angular-v14-env": {}, - // "bitdev.angular/envs/angular-v13-env": {}, - // "bitdev.angular/envs/angular-v12-env": {}, + "bitdev.angular/angular-env": {}, + "bitdev.angular/envs/angular-v16-env": {}, + "bitdev.angular/envs/angular-v15-env": {}, + "bitdev.angular/envs/angular-v14-env": {}, + "bitdev.angular/envs/angular-v13-env": {}, + "bitdev.angular/envs/angular-v12-env": {}, // Add angular apps (until this is no longer necessary) -// "integration/demo-app": {}, + "integration/demo-app": {}, /** * workspace variants allow you to set different subsets of configuration for components in your workspace. * this is extremely useful for upgrading, aligning and building components with a