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

Add support for Node v14 #901

Merged
merged 8 commits into from
May 28, 2020
Merged

Add support for Node v14 #901

merged 8 commits into from
May 28, 2020

Commits on May 26, 2020

  1. Update node-sass to v4.14.1

    v4.12.0 does not support Node v14:
    
    > Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)
    > For more information on which environments are supported please see:
    > https://github.com/sass/node-sass/releases/tag/v4.13.1
    >     at module.exports (/Users/oliverbyford/Code/govuk-prototype-kit/node_modules/node-sass/lib/binding.js:13:13)
    >     at Object.<anonymous> (/Users/oliverbyford/Code/govuk-prototype-kit/node_modules/node-sass/lib/index.js:14:35)
    >     at Module._compile (internal/modules/cjs/loader.js:1200:30)
    >     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    >     at Module.load (internal/modules/cjs/loader.js:1049:32)
    >     at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    >     at Module.require (internal/modules/cjs/loader.js:1089:19)
    >     at require (internal/modules/cjs/helpers.js:73:18)
    >     at Object.<anonymous> (/Users/oliverbyford/Code/govuk-prototype-kit/node_modules/gulp-sass/index.js:162:21)
    >     at Module._compile (internal/modules/cjs/loader.js:1200:30)
    > gulp exited with code 1
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    fbea30c View commit details
    Browse the repository at this point in the history
  2. Update findAvailablePort to use inquirer

    Prompt's dependency winston is causing a warning in the console:
    
    > (node:15613) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    
    This has been raised as an issue on prompt's GitHub repo [1] but given the last release of prompt was 4 years ago, I think it makes sense to move away to an alternative that's actively maintained.
    
    [1]: flatiron/prompt#199
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    3595a27 View commit details
    Browse the repository at this point in the history
  3. Convert port number to string when writing to file

    This fixes a type error that's being thrown by Object.writeFileSync in Node v14:
    
    > UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (3001)
    >     at Object.writeFileSync (fs.js:1380:5)
    >     at /Users/oliverbyford/Code/govuk-prototype-kit/lib/utils.js:99:14
    >     at processTicksAndRejections (internal/process/task_queues.js:97:5)
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    1426740 View commit details
    Browse the repository at this point in the history
  4. Update askForUsageDataPermission to use inquirer

    Prompt's dependency winston is causing a warning in the console:
    
    > (node:15613) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
    
    This has been raised as an issue on prompt's GitHub repo [1] but given the last release of prompt was 4 years ago, I think it makes sense to move away to an alternative that's actively maintained.
    
    [1]: flatiron/prompt#199
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    f69d62b View commit details
    Browse the repository at this point in the history
  5. Avoid deep include of UUID

    > DeprecationWarning: Deep requiring like `const uuidv4 = require('uuid/v4');` is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    74d0b5b View commit details
    Browse the repository at this point in the history
  6. Test on Node v14

    Node v14 will become the active LTS release in October 2020, at which point we should recommend that users start installing it. (v12 will remain supported under LTS until 30 April 2022)
    
    Until then, some users may only be able to install v14 as the current/latest version – for example, if a department provides Node through a managed software centre – so we should make sure it works with it.
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    b93bf6c View commit details
    Browse the repository at this point in the history
  7. Remove dependency on prompt

    Both places that used prompt have been updated to use inquirer instead, so prompt can now be removed.
    36degrees committed May 26, 2020
    Configuration menu
    Copy the full SHA
    6e53337 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. Document in changelog

    36degrees committed May 27, 2020
    Configuration menu
    Copy the full SHA
    d00733d View commit details
    Browse the repository at this point in the history