-
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Angular 20 #151
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?
feat: Angular 20 #151
Changes from 2 commits
f36f05f
501c8cd
0f0a501
3dd69bc
7f06cae
be73d52
3bf6a5d
9694289
2e7ce75
749f1f3
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged --allow-empty --relative |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,9 @@ | |
import '@nativescript/core/globals'; | ||
// Install @nativescript/angular specific polyfills | ||
import '@nativescript/angular/polyfills'; | ||
|
||
import { AbortController, AbortSignal } from '@nativescript/core/abortcontroller'; | ||
(global as any).AbortController = AbortController; | ||
(global as any).AbortSignal = AbortSignal; | ||
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. should be in the pre-zone polyfills 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. fixed but I'll leave comment in case want to adjust further - they are in pre-zone polyfills now. |
||
/** | ||
* Zone.js and patches | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
const webpack = require('@nativescript/webpack'); | ||
const { ProvidePlugin } = require("webpack"); | ||
|
||
module.exports = (env) => { | ||
webpack.init(env); | ||
webpack.useConfig('angular'); | ||
|
||
webpack.chainWebpack((config) => { | ||
config.resolve.set('fallback', { | ||
AbortController: require.resolve('@nativescript/core/abortcontroller'), | ||
AbortSignal: require.resolve('@nativescript/core/abortcontroller'), | ||
}); | ||
}); | ||
|
||
NathanWalker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return webpack.resolveConfig(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const { getJestProjects } = require('@nx/jest'); | ||
const { getJestProjectsAsync } = require('@nx/jest'); | ||
|
||
export default { projects: getJestProjects() }; | ||
export default async () => ({ projects: await getJestProjectsAsync() }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,80 @@ | ||
{ | ||
"migrations": [ | ||
{ | ||
"version": "20.3.0-beta.1", | ||
"description": "Update ESLint flat config to include .cjs, .mjs, .cts, and .mts files in overrides (if needed)", | ||
"implementation": "./src/migrations/update-20-3-0/add-file-extensions-to-overrides", | ||
"package": "@nx/eslint", | ||
"name": "add-file-extensions-to-overrides" | ||
"version": "21.0.0-beta.8", | ||
"description": "Removes the legacy cache configuration from nx.json", | ||
"implementation": "./src/migrations/update-21-0-0/remove-legacy-cache", | ||
"package": "nx", | ||
"name": "remove-legacy-cache" | ||
}, | ||
{ | ||
"version": "21.0.0-beta.8", | ||
"description": "Removes the legacy cache configuration from nx.json", | ||
"implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner", | ||
"package": "nx", | ||
"name": "remove-custom-tasks-runner" | ||
}, | ||
{ | ||
"version": "21.0.0-beta.11", | ||
"description": "Updates release version config based on the breaking changes in Nx v21", | ||
"implementation": "./src/migrations/update-21-0-0/release-version-config-changes", | ||
"package": "nx", | ||
"name": "release-version-config-changes" | ||
}, | ||
{ | ||
"version": "21.0.0-beta.11", | ||
"description": "Updates release changelog config based on the breaking changes in Nx v21", | ||
"implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes", | ||
"package": "nx", | ||
"name": "release-changelog-config-changes" | ||
}, | ||
{ | ||
"version": "21.1.0-beta.2", | ||
"description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present", | ||
"implementation": "./src/migrations/update-21-1-0/add-gitignore-entry", | ||
"package": "nx", | ||
"name": "21-1-0-add-ignore-entries-for-nx-rule-files" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "20.3.0-beta.2", | ||
"description": "If workspace includes Module Federation projects, ensure the new @nx/module-federation package is installed.", | ||
"factory": "./src/migrations/update-20-3-0/ensure-nx-module-federation-package", | ||
"version": "20.4.0-beta.1", | ||
"requires": { "@angular/core": ">=19.1.0" }, | ||
"description": "Update the @angular/cli package version to ~19.1.0.", | ||
"factory": "./src/migrations/update-20-4-0/update-angular-cli", | ||
"package": "@nx/angular", | ||
"name": "ensure-nx-module-federation-package" | ||
"name": "update-angular-cli-version-19-1-0" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "20.5.0-beta.5", | ||
"requires": { "@angular/core": ">=19.2.0" }, | ||
"description": "Update the @angular/cli package version to ~19.2.0.", | ||
"factory": "./src/migrations/update-20-5-0/update-angular-cli", | ||
"package": "@nx/angular", | ||
"name": "update-angular-cli-version-19-2-0" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "21.0.0-beta.3", | ||
"description": "Set the `continuous` option to `true` for continuous tasks.", | ||
"factory": "./src/migrations/update-21-0-0/set-continuous-option", | ||
"package": "@nx/angular", | ||
"name": "set-continuous-option" | ||
}, | ||
{ | ||
"cli": "nx", | ||
"version": "21.0.0-beta.9", | ||
"description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.", | ||
"implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync", | ||
"package": "@nx/jest", | ||
"name": "replace-getJestProjects-with-getJestProjectsAsync-v21" | ||
}, | ||
{ | ||
"version": "21.0.0-beta.10", | ||
"description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.", | ||
"implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor", | ||
"package": "@nx/jest", | ||
"name": "remove-tsconfig-option-from-jest-executor" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,13 @@ import { | |
EnvironmentInjector, | ||
EventEmitter, | ||
Inject, | ||
InjectFlags, | ||
InjectionToken, | ||
InjectOptions, | ||
Injector, | ||
NgZone, | ||
OnDestroy, | ||
Output, | ||
SkipSelf, | ||
Type, | ||
ViewContainerRef, | ||
} from '@angular/core'; | ||
|
@@ -84,12 +84,12 @@ export class DestructibleInjector implements Injector { | |
private destructibleProviders: ProviderSet, | ||
private parent: Injector, | ||
) {} | ||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions | InjectFlags): T { | ||
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions): T { | ||
const ref = this.parent.get(token, notFoundValue, flags); | ||
|
||
// if we're skipping ourselves then it's not our responsibility to destroy | ||
if (typeof flags === 'number') { | ||
if (!(flags & InjectFlags.SkipSelf) && this.destructibleProviders.has(token)) { | ||
if (!(flags && this.destructibleProviders.has(token))) { | ||
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 breaks the skipself flags |
||
this.refs.add(ref); | ||
} | ||
} else { | ||
|
Uh oh!
There was an error while loading. Please reload this page.