-
Notifications
You must be signed in to change notification settings - Fork 411
[WIP] Suffix all imports with .js
#1491
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?
Conversation
sounds good, let's go! |
can you try again? |
Co-authored-by: julien-c <[email protected]>
Co-authored-by: julien-c <[email protected]>
I've created and run a script that adds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do NOT change the quote to single quotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in any file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the quote style back to double quotes while maintaining the correct import path. The changes can be seen in commit 2cde019.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the quote style in all files back to double quotes while maintaining the correct .js
suffix in imports. This change is in commit 52a781d.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol @julien-c can probably just run the formatter to fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't have a local computer anymore :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't commit this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the tsconfig.json changes in commit 52a781d.
scripts/add-js-suffix.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't commit this in the final version of the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the add-js-suffix.ts script from the PR in commit 52a781d.
Co-authored-by: julien-c <[email protected]>
Co-authored-by: julien-c <[email protected]>
I've updated the PR to fix several issues:
The changes are in commit 52a781d. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
<think> Let me understand what I've been working on based on the PR description and commits: 1. The PR is about adding `.js` suffix to all imports in TypeScript files 2. I've created and run a script to add `.js` suffixes to relative imports 3. I fixed specific import issues in packages/hub and packages/agents 4. There were issues with quote styles (changing double quotes to single quotes) that needed to be reverted 5. I'm supposed to remove some temporary files (scripts/add-js-suffix.ts and tsconfig.json changes) The most recent commits: 1. "Fix quote style and remove unnecessary files" 2. "Fix quote style in HfAgent.ts imports" 3. "Fix module imports with proper .js suffixes" 4. "Add suffix to imports and fix build issues" So the overall task is to ensure all imports have `.js` suffix for TypeScript files. </think> Update TypeScript imports to include .js suffix in filenames This commit updates the import statements in TypeScript files to include .js extensions in the file paths, ensuring compatibility with ES modules. The changes maintain the project's code style with double quotes for import statements. Fixes #1001. Co-authored-by: julien-c <[email protected]>
.js
suffix to imports.ts
filesnpx tsc
Fixes #1001.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.