Title: Wrong import suggestion in subpath pattern · Issue #52870 · microsoft/TypeScript · GitHub
Open Graph Title: Wrong import suggestion in subpath pattern · Issue #52870 · microsoft/TypeScript
X Title: Wrong import suggestion in subpath pattern · Issue #52870 · microsoft/TypeScript
Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.75.1 OS Version: Darwin x64 22.1.0 (MacOS) Steps to Reproduce: Install @neo4j-ndl/react@1.0.0-alpha-fafbc08 Try to import an icon like Open Graph Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.75.1 OS Version: Darwin x64 22.1.0 (MacOS) Steps to Reproduce: Install @neo4j-ndl/react@1.0.0-alpha-fafbc08 Try to im...
X Description: Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.75.1 OS Version: Darwin x64 22.1.0 (MacOS) Steps to Reproduce: Install @neo4j-ndl/react@1.0.0-alpha-fafbc08 Try to im...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/52870
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrong import suggestion in subpath pattern","articleBody":"\u003c!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --\u003e\r\n\u003c!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --\u003e\r\n\u003c!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions --\u003e\r\n\u003c!-- 🔎 Search existing issues to avoid creating duplicates. --\u003e\r\n\u003c!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ --\u003e\r\n\u003c!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --\u003e\r\n\u003c!-- 🔧 Launch with `code --disable-extensions` to check. --\u003e\r\nDoes this issue occur when all extensions are disabled?: Yes\r\n\r\n\u003c!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --\u003e\r\n\u003c!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help \u003e Report Issue' dialog can assist with this. --\u003e\r\n- VS Code Version: 1.75.1\r\n- OS Version: Darwin x64 22.1.0 (MacOS)\r\n\r\nSteps to Reproduce:\r\n\r\n1. Install `@neo4j-ndl/react@1.0.0-alpha-fafbc08`\r\n2. Try to import an icon like `\u003cAdjustmentsHorizontalIconSolid /\u003e` in a JSX file.\r\n\r\nThe recommended import path is `@neo4j-ndl/react/lib/types/icons` while the correct based on the `exports` field would be `@neo4j-ndl/react/icons`\r\n\r\nThe modified `package.json` is looking like this:\r\n```json\r\n{\r\n \"name\": \"@neo4j-ndl/react\",\r\n \"version\": \"0.17.7\",\r\n \"sideEffects\": false,\r\n \"description\": \"React implementation of Neo4j Design System\",\r\n \"keywords\": [\r\n \"neo4j\",\r\n \"react\",\r\n \"design system\",\r\n \"needle\",\r\n \"ndl\"\r\n ],\r\n \"author\": \"Neo4j Inc.\",\r\n \"homepage\": \"\",\r\n \"license\": \"GPL-3.0\",\r\n \"main\": \"./lib/cjs/index.js\",\r\n \"module\": \"./lib/esm/index.js\",\r\n \"types\": \"./lib/types/index.d.ts\",\r\n \"exports\": {\r\n \"./icons\": {\r\n \"import\": \"./lib/esm/icons/index.js\",\r\n \"require\": \"./lib/cjs/icons/index.js\",\r\n \"types\": \"./lib/types/icons/index.d.ts\"\r\n },\r\n \".\": {\r\n \"import\": \"./lib/esm/index.js\",\r\n \"require\": \"./lib/cjs/index.js\",\r\n \"types\": \"./lib/types/index.d.ts\"\r\n }\r\n },\r\n ...\r\n}\r\n```\r\n\r\nAs a library publishers tried it also with WebStorm to see how it behaves and I can see that there it is imported as expected (video):\r\n\r\n\r\nhttps://user-images.githubusercontent.com/12672541/219434237-a77ee748-c7b3-4995-a083-0690af3d9657.mp4\r\n\r\n\r\nAlso noticed, that if there is one module imported from `@neo4j-ndl/react/icons` then the suggestion works as expected (image): \r\n\u003cimg width=\"675\" alt=\"CleanShot 2023-02-16 at 18 00 20@2x\" src=\"https://user-images.githubusercontent.com/12672541/219435490-ab6b2993-f112-4b2b-8b72-4facbb6e5dc3.png\"\u003e\r\n \r\n","author":{"url":"https://github.com/konsalex","@type":"Person","name":"konsalex"},"datePublished":"2023-02-16T16:57:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/52870/TypeScript/issues/52870"}
route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:82946cf7-f58c-c832-ed9a-3f66077a555d current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id E1D6:2867:353F992:4994421:6A60DC67 html-safe-nonce 3cc0692a1523ff8c0dbc07f580dd40fceae0caede836779574ce52fde81abffa visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUQ2OjI4Njc6MzUzRjk5Mjo0OTk0NDIxOjZBNjBEQzY3IiwidmlzaXRvcl9pZCI6IjE0MTQxMTM4Njk0MTQwNjMyMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 1b8af10b679184f5e0fd9c8bde8eb29430abb182aabcd6f6ef39477de558eed7 hovercard-subject-tag issue:1592119421 github-keyboard-shortcuts repository,issues,copilot google-site-verification Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I octolytics-url https://collector.github.com/github/collect analytics-location / fb:app_id 1401488693436528 apple-itunes-app app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/52870/issue_layout twitter:image https://opengraph.githubassets.com/1a10a2201645e3d5158b2bcd0c666dd97393ff2891378c3aa1bc52fcbea32073/microsoft/TypeScript/issues/52870 twitter:card summary_large_image og:image https://opengraph.githubassets.com/1a10a2201645e3d5158b2bcd0c666dd97393ff2891378c3aa1bc52fcbea32073/microsoft/TypeScript/issues/52870 og:image:alt Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1.75.1 OS Version: Darwin x64 22.1.0 (MacOS) Steps to Reproduce: Install @neo4j-ndl/react@1.0.0-alpha-fafbc08 Try to im... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username konsalex hostname github.com expected-hostname github.com None 8302bdfafed4cf34ac9c1d3593108fafa53bc3f86b893907e38fa6bdd74361ac turbo-cache-control no-preview go-import github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git octolytics-dimension-user_id 6154722 octolytics-dimension-user_login microsoft octolytics-dimension-repository_id 20929025 octolytics-dimension-repository_nwo microsoft/TypeScript octolytics-dimension-repository_public true octolytics-dimension-repository_is_fork false octolytics-dimension-repository_network_root_id 20929025 octolytics-dimension-repository_network_root_nwo microsoft/TypeScript turbo-body-classes logged-out env-production page-responsive disable-turbo false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release c3c2ff0c76b34772c83c9498a08cefee28f53da0 ui-target full theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.