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

fix(nuxt): add router.options files in definite order #25397

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Jan 23, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In debugging https://github.com/nuxt/nuxt/actions/runs/7628326647/job/20779171448?pr=25395, realised that we in fact were resolving app/router.options files in a non-reproducible order (since #24922).

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Jan 23, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@danielroe danielroe self-assigned this Jan 23, 2024
@github-actions github-actions bot added the 3.x label Jan 23, 2024
@danielroe danielroe merged commit a42aaec into main Jan 23, 2024
36 checks passed
@danielroe danielroe deleted the fix/router-options-order branch January 23, 2024 17:44
@github-actions github-actions bot mentioned this pull request Jan 23, 2024
@@ -38,10 +38,10 @@ export default defineNuxtModule({
// Add default options
context.files.push({ path: resolve(runtimeDir, 'router.options'), optional: true })

await Promise.all(nuxt.options._layers.map(async layer => {
for (const layer of nuxt.options._layers) {
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't we use await Promise.all and then loop over the resolved promises?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, yes, we could indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants