Skip to content

Make execa compatible with Node.js 13.0.0-pre#370

Merged
sindresorhus merged 2 commits into
sindresorhus:masterfrom
Trott:prep-for-node-13
Oct 3, 2019
Merged

Make execa compatible with Node.js 13.0.0-pre#370
sindresorhus merged 2 commits into
sindresorhus:masterfrom
Trott:prep-for-node-13

Conversation

@Trott

@Trott Trott commented Oct 2, 2019

Copy link
Copy Markdown
Contributor

Use error.code instead of error.errno when expecting a string error
code. errno is always numeric in Node.js 13.0.0-pre.

Node.js 13.0.0 comes out later this month (October 2019) so implementing
and publishing this change will hopefully smooth the upgrade path for
execa users.

Use `error.code` instead of `error.errno` when expecting a string error
code. `errno` is always numeric in Node.js 13.0.0-pre.

Node.js 13.0.0 comes out later this month (October 2019) so implementing
and publishing this change will hopefully smooth the upgrade path for
execa users.
@Trott Trott force-pushed the prep-for-node-13 branch from 2386799 to 968c03e Compare October 2, 2019 13:51
@ehmicky

ehmicky commented Oct 2, 2019

Copy link
Copy Markdown
Collaborator

Thanks for this heads up @Trott! This looks good to me. @sindresorhus what do you think?

@sindresorhus

Copy link
Copy Markdown
Owner

Should we also update the readme? We're showing errno: 'ENOENT', in a couple of examples.

@ehmicky

ehmicky commented Oct 2, 2019

Copy link
Copy Markdown
Collaborator

Yes you're right, it's shown in two instances in the readme, @Trott could you please update the PR with this?

Also @Trott will os.constants.errno still be available? We're using this as well.

`errno` property will be numeric in Node.js 13.0.0, so update the readme
accordingly.
@Trott

Trott commented Oct 2, 2019

Copy link
Copy Markdown
Contributor Author

Yes you're right, it's shown in two instances in the readme, @Trott could you please update the PR with this?

👍 I updated the readme in a separate commit and pushed it to this branch.

Also @Trott will os.constants.errno still be available? We're using this as well.

Yes, that should still be available:

$ node-pre -e 'console.log(process.versions.node, os.constants.errno)'
13.0.0-pre [Object: null prototype] {
  E2BIG: 7,
  EACCES: 13,
  EADDRINUSE: 48,
  EADDRNOTAVAIL: 49,
  EAFNOSUPPORT: 47,
  EAGAIN: 35,
  EALREADY: 37,
  EBADF: 9,
  EBADMSG: 94,
  EBUSY: 16,
  ECANCELED: 89,
  ECHILD: 10,
  ECONNABORTED: 53,
  ECONNREFUSED: 61,
  ECONNRESET: 54,
  EDEADLK: 11,
  EDESTADDRREQ: 39,
  EDOM: 33,
  EDQUOT: 69,
  EEXIST: 17,
  EFAULT: 14,
  EFBIG: 27,
  EHOSTUNREACH: 65,
  EIDRM: 90,
  EILSEQ: 92,
  EINPROGRESS: 36,
  EINTR: 4,
  EINVAL: 22,
  EIO: 5,
  EISCONN: 56,
  EISDIR: 21,
  ELOOP: 62,
  EMFILE: 24,
  EMLINK: 31,
  EMSGSIZE: 40,
  EMULTIHOP: 95,
  ENAMETOOLONG: 63,
  ENETDOWN: 50,
  ENETRESET: 52,
  ENETUNREACH: 51,
  ENFILE: 23,
  ENOBUFS: 55,
  ENODATA: 96,
  ENODEV: 19,
  ENOENT: 2,
  ENOEXEC: 8,
  ENOLCK: 77,
  ENOLINK: 97,
  ENOMEM: 12,
  ENOMSG: 91,
  ENOPROTOOPT: 42,
  ENOSPC: 28,
  ENOSR: 98,
  ENOSTR: 99,
  ENOSYS: 78,
  ENOTCONN: 57,
  ENOTDIR: 20,
  ENOTEMPTY: 66,
  ENOTSOCK: 38,
  ENOTSUP: 45,
  ENOTTY: 25,
  ENXIO: 6,
  EOPNOTSUPP: 102,
  EOVERFLOW: 84,
  EPERM: 1,
  EPIPE: 32,
  EPROTO: 100,
  EPROTONOSUPPORT: 43,
  EPROTOTYPE: 41,
  ERANGE: 34,
  EROFS: 30,
  ESPIPE: 29,
  ESRCH: 3,
  ESTALE: 70,
  ETIME: 101,
  ETIMEDOUT: 60,
  ETXTBSY: 26,
  EWOULDBLOCK: 35,
  EXDEV: 18
}
$

@Trott

Trott commented Oct 2, 2019

Copy link
Copy Markdown
Contributor Author

By the way, if you want to do more testing yourself here or on some other project but don't want to be bothered compiling Node.js 13.0.0-pre yourself, you can download the current release candidate (which actually isn't a release candidate at all but rather more of a beta, but that's a rant for another day) from https://nodejs.org/download/rc/v13.0.0-rc.1/.

@ehmicky

ehmicky commented Oct 3, 2019

Copy link
Copy Markdown
Collaborator

Thanks @Trott! This looks good to me. What do you think @sindresorhus?

@sindresorhus sindresorhus merged commit 492dff4 into sindresorhus:master Oct 3, 2019
@Trott

Trott commented Oct 3, 2019

Copy link
Copy Markdown
Contributor Author

@sindresorhus @ehmicky Thanks for merging quickly. Can we get a new release published so that people testing with the Node.js v13.0.0-rc.1 don't hit this issue?

@sindresorhus

Copy link
Copy Markdown
Owner

https://github.com/sindresorhus/execa/releases/tag/v2.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants