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(vue-renderer): clone spa meta to prevent cache modification #5964

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

ustun
Copy link

@ustun ustun commented Jun 21, 2019

This ensures that post-processing of the result object does not cause cache corruption.

When transforming the response in SPA mode via render:route hook, setting result.html changes the data in cache, which is not ideal.

Fixes #5962

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

This ensures that post-processing of the result object does not cause cache corruption.
@codecov-io
Copy link

codecov-io commented Jun 21, 2019

Codecov Report

Merging #5964 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #5964   +/-   ##
=======================================
  Coverage   95.68%   95.68%           
=======================================
  Files          82       82           
  Lines        2689     2689           
  Branches      690      690           
=======================================
  Hits         2573     2573           
  Misses         98       98           
  Partials       18       18
Flag Coverage Δ
#e2e 100% <ø> (ø) ⬆️
#fixtures 50.35% <0%> (ø) ⬆️
#unit 92.67% <100%> (ø) ⬆️
Impacted Files Coverage Δ
packages/vue-renderer/src/renderers/spa.js 87.5% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d08ff1...c306bb0. Read the comment docs.

@manniL manniL requested a review from pi0 June 21, 2019 14:23
@ustun
Copy link
Author

ustun commented Jun 27, 2019

Is this stuck because the commit starts with Fix instead of fix? I'm not very familiar with semantic pull request bot.

@ustun ustun changed the title Fix(vue-renderer): Return clone of result object in SPA mode fix(vue-renderer): Return clone of result object in SPA mode Jun 27, 2019
@pi0
Copy link
Member

pi0 commented Jun 27, 2019

@ustun no PR is ok and thanks for that ❤️ Sorry for late review.

@pi0 pi0 changed the title fix(vue-renderer): Return clone of result object in SPA mode fix(vue-renderer): return clone of result object in SPA mode Jun 27, 2019
test/unit/spa.test.js Show resolved Hide resolved
@pi0 pi0 changed the title fix(vue-renderer): return clone of result object in SPA mode fix(vue-renderer): clone spa meta to prevent cache modification Jun 27, 2019
@pi0 pi0 merged commit ae9d351 into nuxt:dev Jun 27, 2019
@ustun ustun deleted the fix-caching-spa-renderer branch June 27, 2019 20:40
@pi0 pi0 mentioned this pull request Jun 28, 2019
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants