Repository: nuxt/nuxt.js
Pull request #6924 (2020-01-28 01:45:55)

chore(builder): analyze mode warning rewording
The "analyze" build warning has been sitting on a screen in front of me for a while now, as I develop a site in Nuxt, and it's worded a little clumsily. Hopefully this fix is okay.

<!--- Provide a general summary of your changes in the title above -->

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] 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
<!--- Describe your changes in detail -->
<!--- Why is this change required? What problem does it solve? -->
<!--- If it resolves an open issue, please link to the issue here. For example "Resolves: #1337" -->


## Checklist:
<!--- Put an `x` in all the boxes that apply. -->
<!--- If your change requires a documentation PR, please link it appropriately -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] 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.




Patch:
diff --git a/packages/builder/src/builder.js b/packages/builder/src/builder.js
index 1693af5ce..04b72a387 100644
--- a/packages/builder/src/builder.js
+++ b/packages/builder/src/builder.js
@@ -68,7 +68,7 @@ export default class Builder {
 
     if (this.options.build.analyze) {
       this.nuxt.hook('build:done', () => {
-        consola.warn('Notice: Please do not deploy bundles built with analyze mode, it\'s only for analyzing purpose.')
+        consola.warn('Notice: Please do not deploy bundles built with "analyze" mode, they\'re for analysis purposes only.')
       })
     }
 


Test patch:
diff --git a/packages/builder/test/builder.ctor.test.js b/packages/builder/test/builder.ctor.test.js
index 0b4631451..8980d0e25 100644
--- a/packages/builder/test/builder.ctor.test.js
+++ b/packages/builder/test/builder.ctor.test.js
@@ -102,7 +102,7 @@ describe('builder: builder constructor', () => {
     const doneHook = nuxt.hook.mock.calls[0][1]
     doneHook()
     expect(consola.warn).toBeCalledTimes(1)
-    expect(consola.warn).toBeCalledWith('Notice: Please do not deploy bundles built with analyze mode, it\'s only for analyzing purpose.')
+    expect(consola.warn).toBeCalledWith('Notice: Please do not deploy bundles built with "analyze" mode, they\'re for analysis purposes only.')
   })
 
   test('should support function template', () => {
diff --git a/test/fixtures/with-config/with-config.test.js b/test/fixtures/with-config/with-config.test.js
index b01c9858f..84652276c 100644
--- a/test/fixtures/with-config/with-config.test.js
+++ b/test/fixtures/with-config/with-config.test.js
@@ -26,7 +26,7 @@ describe('with-config', () => {
       }],
       ['Please use `build.postcss` in your nuxt.config.js instead of an external config file. Support for such files will be removed in Nuxt 3 as they remove all defaults set by Nuxt and can cause severe problems with features like alias resolving inside your CSS.'],
       ['Using styleResources without the @nuxtjs/style-resources is not suggested and can lead to severe performance issues.', 'Please use https://github.com/nuxt-community/style-resources-module'],
-      ['Notice: Please do not deploy bundles built with analyze mode, it\'s only for analyzing purpose.']
+      ['Notice: Please do not deploy bundles built with "analyze" mode, they\'re for analysis purposes only.']
     ])
     expect(customCompressionMiddlewareFunctionName).toBe('damn')
   }, hooks)