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

Handle package.json for --build consistently#62405

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

Open
sheetalkamat wants to merge3 commits intomain
base:main
Choose a base branch
Loading
frompackageJsonBuildMode

Conversation

sheetalkamat
Copy link
Member

Fixes#48314

Now that we have buildinfo in --b mode, we can consistently check the package.json status changes in watch or tsc -b invocations to get consistent behaviour by encoding needed package.json into buildInfo

@CopilotCopilotAI review requested due to automatic review settingsSeptember 5, 2025 21:05
@github-project-automationgithub-project-automationbot moved this toNot started inPR BacklogSep 5, 2025
@typescript-bot
Copy link
Collaborator

Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document themon our wiki's API Breaking Changes page.

Also, please make sure@DanielRosenwasser and@RyanCavanaugh are aware of the changes, just as a heads up.

Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes#48314 by ensuring consistent handling of package.json files between regulartsc andtsc --build modes. The key change is encoding necessary package.json information into buildInfo files, allowing watch mode and build mode to behave consistently when detecting package.json status changes.

Key changes:

  • AddspackageJsons field to build info structures to track package.json dependencies
  • Updates build info generation to include package.json paths that affect module resolution
  • Modifies up-to-date checking to consider package.json changes when validating build info

Reviewed Changes

Copilot reviewed 79 out of 80 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
tests/baselines/reference/*.jsUpdated test baselines to reflect new packageJsons field in build info
src/compiler/tsbuildPublic.tsModified to track and watch package.json files using build info data
src/compiler/builderPublic.tsAdded realpath function to BuilderProgramHost interface
src/compiler/builder.tsAdded packageJsons tracking to build info generation and state management
tests/baselines/reference/api/typescript.d.tsUpdated API to include realpath in BuilderProgramHost

@jakebailey
Copy link
Member

Is it likely for this to grow hugely for lots of packages? I guess it doesn't really matter, given it is just one extra string for each package, and each package already has multiple files otherwise we wouldn't have these package.jsons anyway.

Do we definitely want this in Strada at this point?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@andrewbranchandrewbranchAwaiting requested review from andrewbranch

@jakebaileyjakebaileyAwaiting requested review from jakebailey

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
Status: Not started
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Tsbuild watching packagejson is dependent on whether program was built in the invocation
3 participants
@sheetalkamat@typescript-bot@jakebailey

[8]ページ先頭

©2009-2025 Movatter.jp