Skip to content

Commit

Permalink
chore(angular-server): add sync github action and update @stencil/cor…
Browse files Browse the repository at this point in the history
…e to 4.19.1 in core (#29670)

Issue number: internal

---------

This does a couple things:

**1 - Adds a `sync` command to get the latest `core` build in
`angular-server`**

The release process for `angular-server` failed
[here](https://github.com/ionic-team/ionic-framework/actions/runs/9686982182/job/26730689874).
This failure was only made apparent because the Lerna command
[here](https://github.com/ionic-team/ionic-framework/blob/52ff0505e86dc204cb2fd2fdaf67229e6eeb36f8/.github/workflows/actions/publish-npm/action.yml#L35)
runs prior to building each package.

This should have been caught by CI on the [update to @stencil/core to
v4.19.0](#29666), but
the `angular-server` package is the only package that doesn't sync
`core` before it builds. This PR adds a `sync` command so that
`angular-server` will use the latest core build during the normal build
action.

**2 - Resolving types errors in `angular-server`**

After properly syncing `core` in `angular-server` using the command
added, running build fails with the following:

<img width="400px" alt="Screenshot 2024-06-27 at 1 16 15 PM"
src="https://github.com/ionic-team/ionic-framework/assets/6577830/68d74750-821b-4776-b563-124d8fa06a79">

This was a regression in Stencil. `@stencil/core` has been updated to
resolve these errors so the build passes.
  • Loading branch information
brandyscarney authored Jun 27, 2024
1 parent 52ff050 commit 4c90830
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 13 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/actions/build-angular-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ runs:
- uses: actions/setup-node@v4
with:
node-version: 18.x

- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Angular Server Dependencies
run: npm ci
shell: bash
working-directory: ./packages/angular-server
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/angular-server
- name: Build
run: npm run build.prod
shell: bash
Expand Down
18 changes: 8 additions & 10 deletions core/package-lock.json

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

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"loader/"
],
"dependencies": {
"@stencil/core": "^4.19.0",
"@stencil/core": "^4.19.1",
"ionicons": "^7.2.2",
"tslib": "^2.1.0"
},
Expand Down
31 changes: 31 additions & 0 deletions packages/angular-server/package-lock.json

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

4 changes: 3 additions & 1 deletion packages/angular-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"lint": "eslint . --ext .ts && npm run prettier",
"lint.fix": "eslint . --ext .ts --fix && npm run prettier.fix",
"prettier": "prettier \"**/*.ts\" --check",
"prettier.fix": "prettier \"**/*.ts\" --write"
"prettier.fix": "prettier \"**/*.ts\" --write",
"sync": "sh ./scripts/sync.sh"
},
"peerDependencies": {
"@angular/core": ">=16.0.0",
Expand All @@ -52,6 +53,7 @@
"@angular/platform-server": "^16.0.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.2",
Expand Down
12 changes: 12 additions & 0 deletions packages/angular-server/scripts/sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

# Delete old packages
rm -f *.tgz

# Pack @ionic/core
npm pack ../../core

# Install Dependencies
npm install *.tgz --no-save

0 comments on commit 4c90830

Please sign in to comment.