Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
/frameworkPublic archive

feat(nuxi): auto cleanup with project manifest changes - #6672

Merged
pi0 merged 4 commits into
mainfrom
feat/nuxi-cleanup
Aug 16, 2022
Merged

feat(nuxi): auto cleanup with project manifest changes#6672
pi0 merged 4 commits into
mainfrom
feat/nuxi-cleanup

Conversation

@pi0

@pi0pi0 commented Aug 16, 2022

Copy link
Copy Markdown
Member

🔗 Linked issue

Resolvesnuxt/nuxt#14604 and adds basic manifest implementing nuxt/nuxt#14605

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

When a major change in a project happens (such as updating nuxt or renaming directory) we most likely need to invalidate caches to avoid unpredictable behavior. This PR does two things:

  • Write a basic nuxt.json to buildDir/.nuxt only for nuxi dev (1)
  • Checks manifest hash (full hash) against the previous build and call nuxi cleanup in case of hash mismatches.

Remarks:

(1) Sample .nuxt/nuxt.json:

{
"_hash": "AQBCqiYugT",
"project": {
"rootDir": "/Users/pooya/Code/framework/playground"
},
"versions": {
"nuxt": "3.0.0-rc.8"
}
}

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0
pi0 requested a review from danielroeAugust 16, 2022 11:09
@netlify

netlifyBot commented Aug 16, 2022

Copy link
Copy Markdown

Deploy Preview for nuxt3-docs canceled.

NameLink
🔨 Latest commit78b3c00
🔍 Latest deploy loghttps://app.netlify.com/sites/nuxt3-docs/deploys/62fb8ea22935f50009662841

@pi0pi0 changed the title feat(nuxi): auto cleanup with project manifestfeat(nuxi): auto cleanup with project manifest changesAug 16, 2022
Comment threadpackages/nuxi/src/commands/dev.ts Outdated
Comment threadpackages/nuxi/src/utils/nuxt.ts
@pi0
pi0 merged commit 4d5f768 into mainAug 16, 2022
@pi0
pi0 deleted the feat/nuxi-cleanup branch August 16, 2022 13:14
@pi0pi0 mentioned this pull request Aug 26, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clean up up cache dirs on rootDir/hash change

2 participants

@pi0@danielroe