Skip to content

Commit 8cc49e6

Browse files
feat(user-onboarding): remove workspaces (#71)
## Description This pull request updates the monorepo's dependencies, build tooling, and CI/CD workflows to modernize the stack and streamline processes. The most significant changes include upgrading Angular and Lerna versions, removing legacy Lerna bootstrap steps, updating GitHub Actions workflows, and adjusting build configurations to support larger bundle sizes. Fixes #70 ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Intermediate change (work in progress) ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Test A - [ ] Test B ## Checklist: - [ ] Performed a self-review of my own code - [ ] npm test passes on your machine - [ ] New tests added or existing tests modified to cover all changes - [ ] Code conforms with the style guide - [ ] API Documentation in code was updated - [ ] Any dependent changes have been merged and published in downstream modules
1 parent deda9dc commit 8cc49e6

File tree

16 files changed

+6855
-5946
lines changed

16 files changed

+6855
-5946
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [user-onboarding-v20]
66
pull_request:
7-
branches: [master]
7+
branches: [user-onboarding-v20]
88

99
# This workflow contains a single job called "npm_audit"
1010
jobs:
@@ -25,12 +25,6 @@ jobs:
2525
- name: Install Monorepo Deps
2626
run: npm ci --ignore-scripts
2727

28-
- name: Install Lerna
29-
run: npm i -g lerna@5.1.5 --ignore-scripts
30-
31-
- name: Bootstrap Monorepo
32-
run: lerna bootstrap --ignore-scripts
33-
3428
- name: Run Test Cases
3529
run: npx lerna run test
3630

.github/workflows/pull_request.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,5 @@ jobs:
2323
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
2424
run: npm ci --ignore-scripts
2525

26-
- name: Install Lerna
27-
run: npm i -g lerna@5.1.5 --ignore-scripts
28-
29-
- name: Bootstrap Monorepo
30-
run: lerna bootstrap --ignore-scripts
31-
3226
- name: Run test
33-
run: lerna run test
27+
run: npx lerna run test

.github/workflows/release.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ name: Release [Manual]
44
on: workflow_dispatch
55
permissions:
66
contents: write
7+
id-tokens: write
78
jobs:
89
Release:
910
runs-on: ubuntu-latest
1011
steps:
11-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1213
with:
1314
# fetch-depth is necessary to get all tags
1415
# otherwise lerna can't detect the changes and will end up bumping the versions for all packages
1516
fetch-depth: 0
1617
token: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
1718
- name: Setup Node
18-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
1920
with:
2021
node-version: '20.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
always-auth: false # important for trusted publishing
2124
- name: Configure CI Git User
2225
run: |
2326
git config --global user.name $CONFIG_USERNAME
@@ -27,21 +30,19 @@ jobs:
2730
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
2831
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
2932
CONFIG_EMAIL: ${{ vars.RELEASE_COMMIT_EMAIL }}
30-
- name: Authenticate with Registry
31-
run: |
32-
echo "@${NPM_USERNAME}:registry=https://registry.npmjs.org/" > .npmrc
33-
echo "registry=https://registry.npmjs.org/" >> .npmrc
34-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
35-
npm whoami
36-
env:
37-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
NPM_USERNAME: ${{ vars.NPM_USERNAME }}
33+
# - name: Authenticate with Registry
34+
# run: |
35+
# echo "@${NPM_USERNAME}:registry=https://registry.npmjs.org/" > .npmrc
36+
# echo "registry=https://registry.npmjs.org/" >> .npmrc
37+
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
38+
# npm whoami
39+
# env:
40+
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41+
# NPM_USERNAME: ${{ vars.NPM_USERNAME }}
3942

40-
- name: Bootstrap
43+
- name: Install Dependencies
4144
run: |
4245
npm ci --ignore-scripts
43-
npm i -g lerna@5.1.5 --ignore-scripts
44-
lerna bootstrap --ignore-scripts
4546
- name: Test
4647
run: npx lerna run test
4748
- name: Stash Changes
@@ -50,8 +51,6 @@ jobs:
5051
# "HUSKY=0" disables pre-commit-msg check (Needed in order to allow lerna perform the release commit)
5152
run: HUSKY=0 npx lerna version --yes --ci --conventional-commits
5253
- name: Publish to NPM 🚀
53-
# To always compare changes from registry
54-
# using `from-package` compares version in local package.json with registry and publish it if required.
5554
run: npx lerna publish from-package --yes
56-
env:
57-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
# env:
56+
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

lerna.json

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
{
2-
"packages": [
3-
"packages/search/projects/search-lib",
4-
"packages/search/projects/search-element"
5-
],
2+
"packages": [
3+
"packages/user-onboarding/projects/user-onboarding-lib",
4+
"packages/user-onboarding/projects/user-onboarding-element"
5+
],
66
"command": {
7-
"bootstrap": {
8-
"concurrency": 4,
9-
"ignore": [
10-
"@sourceloop/chat-notif-example_ui",
11-
"@sourceloop/search-client-example",
12-
"@sourceloop/payment-example-frontend",
13-
"@sourceloop/user-onboarding-example",
14-
"@sourceloop/chat-notif-example-ui-socket",
15-
"@sourceloop/oauth-example-ui",
16-
"@sourceloop/ai-assistant-example"
17-
]
18-
},
197
"version": {
208
"conventionalCommits": true,
219
"message": "chore(release): publish"
2210
},
11+
"publish": {
12+
"conventionalCommits": true,
13+
"message": "chore: publish release",
14+
"allowBranch": "user-onboarding-v20",
15+
"noPrivate": true,
16+
"graphType": "all"
17+
},
2318
"run": {
2419
"concurrency": 3,
2520
"ignore": [
@@ -38,10 +33,6 @@
3833
"yes": true
3934
}
4035
},
41-
"ignoreChanges": [
42-
"**/__fixtures__/**",
43-
"**/__tests__/**",
44-
"**/*.md"
45-
],
36+
"ignoreChanges": ["**/__fixtures__/**", "**/__tests__/**", "**/*.md"],
4637
"version": "independent"
4738
}

0 commit comments

Comments
 (0)