René's URL Explorer Experiment


Title: fix(webpack): downlevel NativeClass classes in files updated by earlier transformers by edusperoni · Pull Request #11314 · NativeScript/NativeScript · GitHub

Open Graph Title: fix(webpack): downlevel NativeClass classes in files updated by earlier transformers by edusperoni · Pull Request #11314 · NativeScript/NativeScript

X Title: fix(webpack): downlevel NativeClass classes in files updated by earlier transformers by edusperoni · Pull Request #11314 · NativeScript/NativeScript

Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/DevelopmentWorkflow.md#running-unit-tests-application. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/tools/notes/WritingUnitTests.md. What is the current behavior? In Angular projects, any file that contains both an Angular-decorated class (@Injectable, @Directive, @Component, ...) and a @NativeClass class is silently skipped by the NativeClass transformer. The @NativeClass decorator survives into the emitted bundle as __decorate([NativeClass()], ...) and the app crashes at runtime with: ReferenceError: NativeClass is not defined Root cause: in the Angular webpack flavor the NativeClass transformer runs after Angular's Ivy transform. On files containing Angular-decorated classes, Ivy rebuilds the file via factory.updateSourceFile(), so the resulting SourceFile node itself carries ts.NodeFlags.Synthesized. The transformer's visitNode bails out on any Synthesized node before reaching its isSourceFile branch, so the whole file is returned untouched. Files without Angular decorators pass through Ivy unchanged (original SourceFile, no flag), which is why only this mixed-content case breaks. What is the new behavior? visitNode handles the SourceFile before the Synthesized bail-out, so files rebuilt by earlier transformers are still processed. The per-statement Synthesized check in transformStatements continues to protect statements generated by earlier transformers (e.g. Ivy's added imports and rewritten Angular classes) as well as the transformer's own helper output. Includes a regression test that runs the transformer after a preceding transformer which rebuilds the source file (simulating Ivy) — it fails without the fix and passes with it.

Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...

Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11314

X: @github

direct link

Domain: Github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f8112f5d-01eb-b7ac-cb68-2b9b8b8e1884
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9B90:1CE2AE:4F4453:6E5510:6A639C4A
html-safe-nonce1b419617dc87cb3d823d8b083dbf1a25440684259885dbccfc1863b36af18a0a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjkwOjFDRTJBRTo0RjQ0NTM6NkU1NTEwOjZBNjM5QzRBIiwidmlzaXRvcl9pZCI6IjQ0NjIwMDA4NjgzMjMyMzY1OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac133af59d132bb7e37b668a306b50f7e5866dca70221b42f6b1fedf8852acb3c5
hovercard-subject-tagpull_request:4118785935
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/11314/files
twitter:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4061767?s=400&v=4
og:image:altPR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4ca676e17c4da4532dc68541e9fc874034ae840c26b5f34da7f1c42d9a600659
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3a0a9f049e072eb8e5795dfddcefdba9e277501d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/NativeScript/NativeScript/pull/11314/files#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11314%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fpull%2F11314%2Ffiles
Sign up https://Github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11314/files
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11314/files
Reloadhttps://Github.com/NativeScript/NativeScript/pull/11314/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
NativeScript https://Github.com/NativeScript
NativeScripthttps://Github.com/NativeScript/NativeScript
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
Notifications https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.6k https://Github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://Github.com/NativeScript/NativeScript
Issues 771 https://Github.com/NativeScript/NativeScript/issues
Pull requests 66 https://Github.com/NativeScript/NativeScript/pulls
Discussions https://Github.com/NativeScript/NativeScript/discussions
Actions https://Github.com/NativeScript/NativeScript/actions
Projects https://Github.com/NativeScript/NativeScript/projects
Wiki https://Github.com/NativeScript/NativeScript/wiki
Security and quality 0 https://Github.com/NativeScript/NativeScript/security
Insights https://Github.com/NativeScript/NativeScript/pulse
Code https://Github.com/NativeScript/NativeScript
Issues https://Github.com/NativeScript/NativeScript/issues
Pull requests https://Github.com/NativeScript/NativeScript/pulls
Discussions https://Github.com/NativeScript/NativeScript/discussions
Actions https://Github.com/NativeScript/NativeScript/actions
Projects https://Github.com/NativeScript/NativeScript/projects
Wiki https://Github.com/NativeScript/NativeScript/wiki
Security and quality https://Github.com/NativeScript/NativeScript/security
Insights https://Github.com/NativeScript/NativeScript/pulse
Sign up for GitHub https://Github.com/signup?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://Github.com/login?return_to=%2FNativeScript%2FNativeScript%2Fissues%2Fnew%2Fchoose
NathanWalkerhttps://Github.com/NathanWalker
mainhttps://Github.com/NativeScript/NativeScript/tree/main
fix/webpack-native-class-synthesized-source-filehttps://Github.com/NativeScript/NativeScript/tree/fix/webpack-native-class-synthesized-source-file
Conversation 1 https://Github.com/NativeScript/NativeScript/pull/11314
Commits 1 https://Github.com/NativeScript/NativeScript/pull/11314/commits
Checks 6 https://Github.com/NativeScript/NativeScript/pull/11314/checks
Files changed https://Github.com/NativeScript/NativeScript/pull/11314/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
fix(webpack): downlevel NativeClass classes in files updated by earlier transformers https://Github.com/NativeScript/NativeScript/pull/11314/files#top
Show all changes 1 commit https://Github.com/NativeScript/NativeScript/pull/11314/files
95849d6 fix(webpack): downlevel NativeClass classes in files updated by earli… edusperoni Jul 23, 2026 https://Github.com/NativeScript/NativeScript/pull/11314/commits/95849d6ab5129b1073003dc22206d439dd16a26c
Clear filters https://Github.com/NativeScript/NativeScript/pull/11314/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
native-class.spec.ts https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-ed2fca757e37c3733120511dc3299cf623c5b796162238ba06f45956b56fdf93
index.ts https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-a20b26d37d4f59d81dcc864a82ee9a896d76123a936d8279717149977c50c8a8
packages/webpack5/__tests__/transformers/native-class.spec.tshttps://Github.com/NativeScript/NativeScript/pull/11314/files#diff-ed2fca757e37c3733120511dc3299cf623c5b796162238ba06f45956b56fdf93
View file https://Github.com/NativeScript/NativeScript/blob/95849d6ab5129b1073003dc22206d439dd16a26c/packages/webpack5/__tests__/transformers/native-class.spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11314/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-ed2fca757e37c3733120511dc3299cf623c5b796162238ba06f45956b56fdf93
https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-ed2fca757e37c3733120511dc3299cf623c5b796162238ba06f45956b56fdf93
packages/webpack5/src/transformers/NativeClass/index.tshttps://Github.com/NativeScript/NativeScript/pull/11314/files#diff-a20b26d37d4f59d81dcc864a82ee9a896d76123a936d8279717149977c50c8a8
View file https://Github.com/NativeScript/NativeScript/blob/95849d6ab5129b1073003dc22206d439dd16a26c/packages/webpack5/src/transformers/NativeClass/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/NativeScript/NativeScript/pull/11314/{{ revealButtonHref }}
https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-a20b26d37d4f59d81dcc864a82ee9a896d76123a936d8279717149977c50c8a8
https://Github.com/NativeScript/NativeScript/pull/11314/files#diff-a20b26d37d4f59d81dcc864a82ee9a896d76123a936d8279717149977c50c8a8
Please reload this pagehttps://Github.com/NativeScript/NativeScript/pull/11314/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.