Title: Update imports on file move rewrites `./index` to '.' · Issue #26028 · microsoft/TypeScript · GitHub
Open Graph Title: Update imports on file move rewrites `./index` to '.' · Issue #26028 · microsoft/TypeScript
X Title: Update imports on file move rewrites `./index` to '.' · Issue #26028 · microsoft/TypeScript
Description: From microsoft/vscode#54981 (comment) TypeScript Version: 3.1.0-dev.20180726 Search Terms: update imports getEditsForFileRename Code For a project index.ts export const foo = 123 foo.ts import { foo } from './index'; In VScode, Rename fo...
Open Graph Description: From microsoft/vscode#54981 (comment) TypeScript Version: 3.1.0-dev.20180726 Search Terms: update imports getEditsForFileRename Code For a project index.ts export const foo = 123 foo.ts import { fo...
X Description: From microsoft/vscode#54981 (comment) TypeScript Version: 3.1.0-dev.20180726 Search Terms: update imports getEditsForFileRename Code For a project index.ts export const foo = 123 foo.ts import { fo...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/26028
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Update imports on file move rewrites `./index` to '.'","articleBody":"From https://github.com/Microsoft/vscode/issues/54981#issuecomment-408448682\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:** 3.1.0-dev.20180726\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n- update imports \r\n- getEditsForFileRename\r\n\r\n**Code**\r\nFor a project\r\n\r\n`index.ts`\r\n```ts\r\nexport const foo = 123\r\n```\r\n\r\n`foo.ts`\r\n```ts\r\nimport { foo } from './index';\r\n```\r\n\r\n1. In VScode, Rename `foo.ts` to `bar.ts`\r\n1. Confirm that you want to update import paths\r\n\r\n**Expected behavior:**\r\nNo edits returned from `getEditsForFileRename`\r\n\r\n**Actual behavior:**\r\nAn edit is returned that rewrites `foo.ts` to:\r\n\r\n```ts\r\nimport { foo } from '.';\r\n```\r\n","author":{"url":"https://github.com/mjbvz","@type":"Person","name":"mjbvz"},"datePublished":"2018-07-27T23:27:07Z","url":"https://github.com/microsoft/TypeScript/issues/26028"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:dc8a28df-f052-d963-3d6d-9edf257f79a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 843A:222D8A:83FA8A:B8F4C0:6B0480B7 |
| html-safe-nonce | 1ffa7e54000de0a53cafddff9cc67d91cab1d269c70354e8797f0db7e9e712c1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDNBOjIyMkQ4QTo4M0ZBOEE6QjhGNEMwOjZCMDQ4MEI3IiwidmlzaXRvcl9pZCI6IjIyODcxNDIxMjk2NzYxMjU5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5fafcc83f1ad312b0a12ce1db3553c5934a83cd07a3f609b95e9030f70ddeb4d |
| hovercard-subject-tag | issue:345393556 |
| 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/26028/issue_layout |
| twitter:image | https://opengraph.githubassets.com/38476d520b3b9587e644673ac3cbc3fde334381106adda980f617dd8d96a374c/microsoft/TypeScript/issues/26028 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/38476d520b3b9587e644673ac3cbc3fde334381106adda980f617dd8d96a374c/microsoft/TypeScript/issues/26028 |
| og:image:alt | From microsoft/vscode#54981 (comment) TypeScript Version: 3.1.0-dev.20180726 Search Terms: update imports getEditsForFileRename Code For a project index.ts export const foo = 123 foo.ts import { fo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mjbvz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0366ddfb372682a32e92a5d86155cb08fa83e5bbe79953a968789f2f7e24c511 |
| 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 | ed3f2e01f6b7672780c586c8af0e72726374d7b6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width