Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 4 commits into from
Aug 16, 2022
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 16, 2022

πŸ”— Linked issue

Resolves nuxt/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 danielroe August 16, 2022 11:09
@netlify
Copy link

netlify bot commented Aug 16, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit 78b3c00
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62fb8ea22935f50009662841

@pi0 pi0 changed the title feat(nuxi): auto cleanup with project manifest feat(nuxi): auto cleanup with project manifest changes Aug 16, 2022
@pi0 pi0 merged commit 4d5f768 into main Aug 16, 2022
@pi0 pi0 deleted the feat/nuxi-cleanup branch August 16, 2022 13:14
@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to 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