-
Notifications
You must be signed in to change notification settings - Fork 13.3k
chore(angular): test schematics and code-splitting #31401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
466de9b
d2052cb
0ef4de4
5b1ac7f
4c31a83
d4d9df9
0ec8487
1f03469
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: 'Build Ionic Angular' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for splitting this out, the job shape looks right now. Nit: the |
||
| description: 'Build Ionic Angular' | ||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: 24.x | ||
| - uses: ./.github/workflows/actions/download-archive | ||
| with: | ||
| name: ionic-core | ||
| path: ./core | ||
| filename: CoreBuild.zip | ||
| - uses: ./.github/workflows/actions/download-archive | ||
| with: | ||
| name: ionic-angular | ||
| path: ./packages/angular | ||
| filename: AngularBuild.zip | ||
| - name: 🕸️ Install Angular Dependencies | ||
| run: npm ci | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This job pulls down That means the new build step checks this PR's Angular against released core. A PR that adds a core export the Angular types reference fails here with a confusing "has no exported member", and a core change that breaks Angular goes green. A plain |
||
| shell: bash | ||
| working-directory: ./packages/angular | ||
| - name: 📐 Run Angular Package Tests | ||
| run: npm run test | ||
| shell: bash | ||
| working-directory: ./packages/angular | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,8 +37,10 @@ | |
| "prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next", | ||
| "sync": "./scripts/sync.sh", | ||
| "local.sync.and.pack": "./scripts/sync-and-pack.sh", | ||
| "test": "echo 'angular no tests yet'", | ||
| "validate": "npm i && npm run lint && npm run test && npm run build", | ||
| "test": "npm run test.schematics && npm run test.code-split", | ||
| "test.code-split": "node ./scripts/test-code-split.js", | ||
| "test.schematics": "node ./scripts/verify-schematics.js", | ||
| "validate": "npm i && npm run lint && npm run build && npm run test && npm run validate.package", | ||
| "validate.package": "node scripts/verify-exports.js" | ||
| }, | ||
| "exports": { | ||
|
|
@@ -141,6 +143,13 @@ | |
| "./ion-title": "./dist/standalone/directives/ion-title.js", | ||
| "./ion-toast": "./dist/standalone/directives/ion-toast.js", | ||
| "./ion-toolbar": "./dist/standalone/directives/ion-toolbar.js", | ||
| "./dom-controller": "./dist/common/providers/dom-controller.js", | ||
| "./nav-controller": "./dist/common/providers/nav-controller.js", | ||
| "./config": "./dist/common/providers/config.js", | ||
| "./platform": "./dist/common/providers/platform.js", | ||
| "./nav-params": "./dist/common/directives/navigation/nav-params.js", | ||
| "./ion-modal-token": "./dist/common/providers/angular-delegate.js", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The six subpaths above this are bare kebab-case and needed no exclusion. This one takes the It also points at Calling it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm confused about this one, The other import paths match the imported class name. It seems confusing to have to import
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right on both counts, and my suggestion was wrong. The The bit that does still stand is smaller. This subpath publishes |
||
| "./ionic-route-strategy": "./dist/common/utils/routing.js", | ||
| "./action-sheet-controller": "./dist/standalone/providers/action-sheet-controller.js", | ||
| "./alert-controller": "./dist/standalone/providers/alert-controller.js", | ||
| "./animation-controller": "./dist/standalone/providers/animation-controller.js", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: both test steps have the same name, so a failure doesn't say which import style broke. Maybe tag them "(barrel imports)" and "(per-component imports)"? No worries if you'd rather leave it.