Skip to content
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

Add new option to link for new apps #4808

Merged
merged 3 commits into from
Nov 11, 2024
Merged

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Nov 7, 2024

WHY are these changes introduced?

There is a bug for complex templates where some default config gets discarded.

Some context:

  • When linking, if the remote and local clientId don't match, we were considering that as unable-to-reuse-current-config
  • This makes sense in the context of running a command with --reset, you are linking to a different app, we need to create a new toml and import the config from the remote app, we can't reuse the existing config. But it's there in the previous toml in case you want to copy it over.
  • This is not true for new apps, in that case this would be the first link, so if the config from the template is valid but missing the apiKey, we can just update that field, no need to discard the contents of the toml!

WHAT is this pull request doing?

  • If the app is new (from app init) and has a current config format, we can ignore the api-key value and treat it as a valid config.

How to test your changes?

Ask me or Paulo :)

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@isaacroldan isaacroldan requested a review from a team as a code owner November 7, 2024 11:42
Copy link
Contributor

github-actions bot commented Nov 7, 2024

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 72.05% 8355/11596
🟡 Branches
68.5% (+0.01% 🔼)
4043/5902
🟡 Functions 71.33% 2192/3073
🟡 Lines 72.43% 7901/10908
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / ConcurrentOutput.tsx
98.39% (-1.61% 🔻)
90.91% (-4.55% 🔻)
100%
98.33% (-1.67% 🔻)

Test suite run success

1894 tests passing in 867 suites.

Report generated by 🧪jest coverage report action from 38c9cf9

Copy link
Contributor

@shauns shauns left a comment

Choose a reason for hiding this comment

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

Could we get a test -- to prevent a future regression on this?

Copy link
Contributor

@shauns shauns left a comment

Choose a reason for hiding this comment

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

All good!

@isaacroldan isaacroldan added this pull request to the merge queue Nov 11, 2024
Merged via the queue into main with commit c5e4ec5 Nov 11, 2024
27 checks passed
@isaacroldan isaacroldan deleted the fix-complex-template-init branch November 11, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants