Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge6 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-1001
Draft

Conversation

Copilot
Copy link
Contributor

@CopilotCopilotAI commentedMay 23, 2025
edited
Loading

  • Identify all packages that need to be updated to add the.js suffix to imports
  • Create a script to scan and update imports in all.ts files
  • Test the script on a small set of files to verify it works correctly
  • Run the script on all packages
  • Verify build works withnpx tsc
  • Run tests to ensure everything functions correctly after the changes

Fixes#1001.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.

@julien-c
Copy link
Member

sounds good, let's go!

@julien-c
Copy link
Member

can you try again?

CopilotAIand others added2 commitsMay 26, 2025 09:44
Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
@CopilotCopilot SWE Agent
Copy link
ContributorAuthor

can you try again?

I've created and run a script that adds.js suffix to all relative imports in TypeScript files. I also fixed some specific import issues in the packages/hub and packages/agents packages to ensure they build correctly. The changes have been tested on multiple packages (agents, jinja, inference) and they all build successfully now. The latest commit isd7074c4.

Copilot finished work on behalf ofjulien-cMay 26, 2025 09:54
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

in any file

Copy link
ContributorAuthor

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 commit2cde019.

Copy link
ContributorAuthor

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 commit52a781d.

Copy link
Member

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

Copy link
Member

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 :/

azr reacted with laugh emoji
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

don't commit this

Copy link
ContributorAuthor

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 commit52a781d.

Copy link
Member

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

Copy link
ContributorAuthor

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 commit52a781d.

Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
Copilot finished work on behalf ofjulien-cMay 26, 2025 15:28
Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
@CopilotCopilot SWE Agent
Copy link
ContributorAuthor

CopilotAI commentedMay 26, 2025
edited
Loading

can you try again?

I've updated the PR to fix several issues:

  1. Changed all import quote styles back to double quotes
  2. Removed the tsconfig.json changes
  3. Removed the add-js-suffix.ts script

The changes are in commit52a781d.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • hg.mozilla.org
    • Triggering command:node ./dist/install.js (dns block)

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 files2. I've created and run a script to add `.js` suffixes to relative imports3. I fixed specific import issues in packages/hub and packages/agents4. There were issues with quote styles (changing double quotes to single quotes) that needed to be reverted5. 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 filenamesThis 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 forimport statements.Fixes#1001.Co-authored-by: julien-c <326577+julien-c@users.noreply.github.com>
Copilot finished work on behalf ofjulien-cMay 26, 2025 15:38
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@julien-cjulien-cjulien-c left review comments

@coyotte508coyotte508coyotte508 left review comments

@ngxsonngxsonAwaiting requested review from ngxsonngxson will be requested when the pull request is marked ready for reviewngxson is a code owner

@enzostvsenzostvsAwaiting requested review from enzostvsenzostvs will be requested when the pull request is marked ready for reviewenzostvs is a code owner

@mishig25mishig25Awaiting requested review from mishig25mishig25 will be requested when the pull request is marked ready for reviewmishig25 is a code owner

@xenovaxenovaAwaiting requested review from xenovaxenova will be requested when the pull request is marked ready for reviewxenova is a code owner

@hanouticelinahanouticelinaAwaiting requested review from hanouticelinahanouticelina will be requested when the pull request is marked ready for reviewhanouticelina is a code owner

@SBrandeisSBrandeisAwaiting requested review from SBrandeisSBrandeis will be requested when the pull request is marked ready for reviewSBrandeis is a code owner

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Suffix all imports with.js
3 participants
@Copilot@julien-c@coyotte508

[8]ページ先頭

©2009-2025 Movatter.jp