Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: netlify/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.4.0
Choose a base ref
...
head repository: netlify/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.4.1
Choose a head ref
  • 2 commits
  • 9 files changed
  • 3 contributors

Commits on Jul 15, 2021

  1. fix: enable and fix unicorn/prefer-spread (#2943)

    Co-authored-by: Erez Rokah <erezrokah@users.noreply.github.com>
    tinfoil-knight and erezrokah authored Jul 15, 2021
    1

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    77c6ebb View commit details
  2. chore: release 4.4.1 (#2950)

    Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
    token-generator-app[bot] authored Jul 15, 2021
    1

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    e73a23d View commit details
Showing with 24 additions and 16 deletions.
  1. +0 −1 .eslintrc.js
  2. +7 −0 CHANGELOG.md
  3. +2 −2 npm-shrinkwrap.json
  4. +1 −1 package.json
  5. +1 −1 src/commands/dev/trace.js
  6. +2 −2 src/utils/addons/compare.js
  7. +1 −0 src/utils/deploy/util.js
  8. +9 −8 src/utils/detect-server-settings.js
  9. +1 −1 src/utils/proxy.js
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ module.exports = {
'fp/no-this': 0,
'import/max-dependencies': 0,
'node/no-sync': 0,
'unicorn/prefer-spread': 0,
'unicorn/consistent-destructuring': 0,
// TODO: harmonize with filename snake_case in other Netlify Dev projects
'unicorn/filename-case': [2, { case: 'kebabCase' }],
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [4.4.1](https://www.github.com/netlify/cli/compare/v4.4.0...v4.4.1) (2021-07-15)


### Bug Fixes

* enable and fix unicorn/prefer-spread ([#2943](https://www.github.com/netlify/cli/issues/2943)) ([77c6ebb](https://www.github.com/netlify/cli/commit/77c6ebbbbb3608312183d1654348251cc7aeca97))

## [4.4.0](https://www.github.com/netlify/cli/compare/v4.3.3...v4.4.0) (2021-07-15)


4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "netlify-cli",
"description": "Netlify command line tool",
"version": "4.4.0",
"version": "4.4.1",
"author": "Netlify Inc.",
"contributors": [
"Mathias Biilmann <matt@netlify.com> (https://twitter.com/biilmann)",
2 changes: 1 addition & 1 deletion src/commands/dev/trace.js
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ class TraceCommand extends Command {
async run() {
this.parse(TraceCommand)

const args = ['trace'].concat(this.argv)
const args = ['trace', ...this.argv]
const { subprocess } = runProcess({ log: this.log, args })
await subprocess
}
4 changes: 2 additions & 2 deletions src/utils/addons/compare.js
Original file line number Diff line number Diff line change
@@ -12,14 +12,14 @@ module.exports = function compare(oldValues, newValues) {

const oldKeys = Object.keys(oldValues)
const newKeys = Object.keys(newValues)
const set = new Set(newKeys.concat(oldKeys))
const set = new Set([...newKeys, ...oldKeys])

return [...set].reduce((acc, current) => {
// if values not deep equal. There are changes
if (!isEqual(newValues[current], oldValues[current])) {
return {
isEqual: false,
keys: acc.keys.concat(current),
keys: [...acc.keys, current],
diffs: {
...acc.diffs,
[`${current}`]: {
1 change: 1 addition & 0 deletions src/utils/deploy/util.js
Original file line number Diff line number Diff line change
@@ -96,6 +96,7 @@ const waitForDeploy = async (api, deployId, siteId, timeout) => {
const getUploadList = (required, shaMap) => {
if (!required || !shaMap) return []
// TODO: use `Array.flatMap()` instead once we remove support for Node <11.0.0
// eslint-disable-next-line unicorn/prefer-spread
return [].concat(...required.map((sha) => shaMap[sha]))
}

17 changes: 9 additions & 8 deletions src/utils/detect-server-settings.js
Original file line number Diff line number Diff line change
@@ -310,15 +310,16 @@ const filterSettings = function (scriptInquirerOptions, input) {
}

const formatSettingsArrForInquirer = function (frameworks) {
return [].concat(
...frameworks.map((framework) =>
framework.dev.commands.map((command) => ({
name: `[${chalk.yellow(framework.name)}] '${command}'`,
value: { ...framework, commands: [command] },
short: `${framework.name}-${command}`,
})),
),
const formattedArr = frameworks.map((framework) =>
framework.dev.commands.map((command) => ({
name: `[${chalk.yellow(framework.name)}] '${command}'`,
value: { ...framework, commands: [command] },
short: `${framework.name}-${command}`,
})),
)
// Replace by .flatMap() when Node.js support >= 11.0.0
// eslint-disable-next-line unicorn/prefer-spread
return [].concat(...formattedArr)
}

module.exports = {
2 changes: 1 addition & 1 deletion src/utils/proxy.js
Original file line number Diff line number Diff line change
@@ -201,7 +201,7 @@ const serveRedirect = async function ({ req, res, proxy, match, options }) {
// We pass through request params in one of the following cases:
// 1. The redirect rule doesn't have any query params
// 2. This is a function redirect https://github.com/netlify/cli/issues/1605
if (Array.from(dest.searchParams).length === 0 || isFunction(options.functionsPort, stripOrigin(dest))) {
if ([...dest.searchParams].length === 0 || isFunction(options.functionsPort, stripOrigin(dest))) {
dest.searchParams.forEach((_, key) => {
dest.searchParams.delete(key)
})