René's URL Explorer Experiment


Title: fix: normalize "." and ".." in resolved module paths to dedupe modules by adrian-niculescu · Pull Request #1977 · NativeScript/android · GitHub

Open Graph Title: fix: normalize "." and ".." in resolved module paths to dedupe modules by adrian-niculescu · Pull Request #1977 · NativeScript/android

X Title: fix: normalize "." and ".." in resolved module paths to dedupe modules by adrian-niculescu · Pull Request #1977 · NativeScript/android

Description: ResolveModuleCallback builds the on-disk path for a relative specifier without collapsing . and .. segments, so the same file imported as ./x from /a/b and as ../x from /a/b/c lands under two different registry keys. stat() resolves the segments so both locate the file, but the differing keys make V8 compile and evaluate the module twice: two instances with separate module state, broken cyclic resolution, and an import.meta.dirname of /a/b/c/.. for the .. spelling. This normalizes the resolved path before it becomes the registry key, the same way the HTTP branch already canonicalizes through CanonicalizeHttpUrlKey. The pass is lexical (matching how specifiers are joined, not a realpath) and applies to every on-disk candidate kind; it is a no-op for already-canonical paths. Test: a test-app spec imports one module as ./counter.mjs and ../counter.mjs and asserts they share one instance (===, and a counter incremented to 2). It fails before the change and passes after. Summary by CodeRabbit Bug Fixes Improved module loading so the same module is treated consistently even when reached through different relative paths. Shared state now updates reliably across multiple import locations, preventing duplicate copies of the same counter. Added coverage to verify that imports from different paths observe the same live state.

Open Graph Description: ResolveModuleCallback builds the on-disk path for a relative specifier without collapsing . and .. segments, so the same file imported as ./x from /a/b and as ../x from /a/b/c lands under two diffe...

X Description: ResolveModuleCallback builds the on-disk path for a relative specifier without collapsing . and .. segments, so the same file imported as ./x from /a/b and as ../x from /a/b/c lands under two diffe...

Opengraph URL: https://github.com/NativeScript/android/pull/1977

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:cd9cc436-ce4b-bc0f-f1fc-982ef0256e15
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB8F8:3BB26F:2FEF1B4:426D5F5:6A633D43
html-safe-nonce24ec7ad7d0d1775d245a57001b33bbdceeb078e0badfe5a4fba96ecbb5404296
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEY4OjNCQjI2RjoyRkVGMUI0OjQyNkQ1RjU6NkE2MzNENDMiLCJ2aXNpdG9yX2lkIjoiMTMzNzcwNzQ1MzQ4NTM2NjU5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac313654b891dc20ed3f968e284564ab4fa87fd9228b90e07701f08bb6c88a708b
hovercard-subject-tagpull_request:3927073835
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/android/pull/1977/files
twitter:imagehttps://avatars.githubusercontent.com/u/15037449?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/15037449?s=400&v=4
og:image:altResolveModuleCallback builds the on-disk path for a relative specifier without collapsing . and .. segments, so the same file imported as ./x from /a/b and as ../x from /a/b/c lands under two diffe...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/android git https://github.com/NativeScript/android.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id29137950
octolytics-dimension-repository_nwoNativeScript/android
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id29137950
octolytics-dimension-repository_network_root_nwoNativeScript/android
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
release990295d92a4cc7b63fbbd83a046217cd7d77d49c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/android/pull/1977/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fandroid%2Fpull%2F1977%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%2Fandroid%2Fpull%2F1977%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%2Fandroid
Reloadhttps://github.com/NativeScript/android/pull/1977/files
Reloadhttps://github.com/NativeScript/android/pull/1977/files
Reloadhttps://github.com/NativeScript/android/pull/1977/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1977/files
NativeScript https://github.com/NativeScript
androidhttps://github.com/NativeScript/android
Please reload this pagehttps://github.com/NativeScript/android/pull/1977/files
Notifications https://github.com/login?return_to=%2FNativeScript%2Fandroid
Fork 144 https://github.com/login?return_to=%2FNativeScript%2Fandroid
Star 562 https://github.com/login?return_to=%2FNativeScript%2Fandroid
Code https://github.com/NativeScript/android
Issues 98 https://github.com/NativeScript/android/issues
Pull requests 13 https://github.com/NativeScript/android/pulls
Actions https://github.com/NativeScript/android/actions
Projects https://github.com/NativeScript/android/projects
Wiki https://github.com/NativeScript/android/wiki
Security and quality 0 https://github.com/NativeScript/android/security
Insights https://github.com/NativeScript/android/pulse
Code https://github.com/NativeScript/android
Issues https://github.com/NativeScript/android/issues
Pull requests https://github.com/NativeScript/android/pulls
Actions https://github.com/NativeScript/android/actions
Projects https://github.com/NativeScript/android/projects
Wiki https://github.com/NativeScript/android/wiki
Security and quality https://github.com/NativeScript/android/security
Insights https://github.com/NativeScript/android/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2Fandroid%2Fissues%2Fnew%2Fchoose
NathanWalkerhttps://github.com/NathanWalker
NativeScript:mainhttps://github.com/NativeScript/android/tree/main
adrian-niculescu:fix/esm-relative-path-deduphttps://github.com/adrian-niculescu/NativeScript-Android/tree/fix/esm-relative-path-dedup
Conversation 3 https://github.com/NativeScript/android/pull/1977
Commits 1 https://github.com/NativeScript/android/pull/1977/commits
Checks 3 https://github.com/NativeScript/android/pull/1977/checks
Files changed https://github.com/NativeScript/android/pull/1977/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1977/files
fix: normalize "." and ".." in resolved module paths to dedupe modules https://github.com/NativeScript/android/pull/1977/files#top
Show all changes 1 commit https://github.com/NativeScript/android/pull/1977/files
e4e84cd fix: normalize "." and ".." in resolved module paths to dedupe modules adrian-niculescu Jun 24, 2026 https://github.com/NativeScript/android/pull/1977/commits/e4e84cdffa8e7d3484689c94f43c5245451e0bdf
Clear filters https://github.com/NativeScript/android/pull/1977/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1977/files
Please reload this pagehttps://github.com/NativeScript/android/pull/1977/files
counter.mjs https://github.com/NativeScript/android/pull/1977/files#diff-8b01efd61ffd52f53bb2a2c356a54fd75edc055274daa9a3358228827e77e90a
viaParentDir.mjs https://github.com/NativeScript/android/pull/1977/files#diff-3512d90f982dded21f29bd8227033a6797438032a2df455abd739c8772fb8909
viaSameDir.mjs https://github.com/NativeScript/android/pull/1977/files#diff-517d29841ce99789900aa297a539c05810201b8ffbd3ba3724ed69684d5c1e83
testESModules.mjs https://github.com/NativeScript/android/pull/1977/files#diff-7f48bcd1b6121cad3b55db14b90b9c864ca02a40b554357d5bc91c376c62f6a3
ModuleInternalCallbacks.cpp https://github.com/NativeScript/android/pull/1977/files#diff-a29f30988e4bc02de7c519f256ce882ac70847698e04f4bfb078f7be28c3271e
test-app/app/src/main/assets/app/esm-dedup/counter.mjshttps://github.com/NativeScript/android/pull/1977/files#diff-8b01efd61ffd52f53bb2a2c356a54fd75edc055274daa9a3358228827e77e90a
View file https://github.com/adrian-niculescu/NativeScript-Android/blob/e4e84cdffa8e7d3484689c94f43c5245451e0bdf/test-app/app/src/main/assets/app/esm-dedup/counter.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1977/{{ revealButtonHref }}
test-app/app/src/main/assets/app/esm-dedup/nested/viaParentDir.mjshttps://github.com/NativeScript/android/pull/1977/files#diff-3512d90f982dded21f29bd8227033a6797438032a2df455abd739c8772fb8909
View file https://github.com/adrian-niculescu/NativeScript-Android/blob/e4e84cdffa8e7d3484689c94f43c5245451e0bdf/test-app/app/src/main/assets/app/esm-dedup/nested/viaParentDir.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1977/{{ revealButtonHref }}
test-app/app/src/main/assets/app/esm-dedup/viaSameDir.mjshttps://github.com/NativeScript/android/pull/1977/files#diff-517d29841ce99789900aa297a539c05810201b8ffbd3ba3724ed69684d5c1e83
View file https://github.com/adrian-niculescu/NativeScript-Android/blob/e4e84cdffa8e7d3484689c94f43c5245451e0bdf/test-app/app/src/main/assets/app/esm-dedup/viaSameDir.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1977/{{ revealButtonHref }}
test-app/app/src/main/assets/app/tests/testESModules.mjshttps://github.com/NativeScript/android/pull/1977/files#diff-7f48bcd1b6121cad3b55db14b90b9c864ca02a40b554357d5bc91c376c62f6a3
View file https://github.com/adrian-niculescu/NativeScript-Android/blob/e4e84cdffa8e7d3484689c94f43c5245451e0bdf/test-app/app/src/main/assets/app/tests/testESModules.mjs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1977/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1977/files#diff-7f48bcd1b6121cad3b55db14b90b9c864ca02a40b554357d5bc91c376c62f6a3
test-app/runtime/src/main/cpp/ModuleInternalCallbacks.cpphttps://github.com/NativeScript/android/pull/1977/files#diff-a29f30988e4bc02de7c519f256ce882ac70847698e04f4bfb078f7be28c3271e
View file https://github.com/adrian-niculescu/NativeScript-Android/blob/e4e84cdffa8e7d3484689c94f43c5245451e0bdf/test-app/runtime/src/main/cpp/ModuleInternalCallbacks.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/android/pull/1977/{{ revealButtonHref }}
https://github.com/NativeScript/android/pull/1977/files#diff-a29f30988e4bc02de7c519f256ce882ac70847698e04f4bfb078f7be28c3271e
https://github.com/NativeScript/android/pull/1977/files#diff-a29f30988e4bc02de7c519f256ce882ac70847698e04f4bfb078f7be28c3271e
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.