Files
node/lib
Fábio Santos e199fc5534 module: fix error message about importing names from cjs
When importing specific names from a CJS module, and renaming them using
`as`, the example fix in the error message erroneously contains the
keyword `as` in the destructuring variable declaration.

Example of this issue:

    import { parse as acornParse } from "acorn";
             ^^^^^
    SyntaxError: The requested module 'acorn' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export.
    For example:
    import pkg from 'acorn';
    const { parse as acornParse } = pkg;

PR-URL: https://github.com/nodejs/node/pull/33882
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-06-19 18:14:27 +02:00
..
2020-05-24 03:26:21 +02:00
2020-02-18 22:15:50 -08:00
2020-06-07 12:14:49 +02:00
2020-05-27 10:24:05 +02:00
2020-06-02 15:38:59 +02:00
2020-05-23 20:47:02 +02:00
2020-06-19 07:40:11 -07:00
2020-05-16 06:42:16 +02:00
2020-06-19 17:37:26 +02:00
2020-05-30 10:17:31 -07:00
2020-05-30 17:24:43 -04:00
2020-06-16 09:23:34 -07:00
2020-03-09 12:44:16 +01:00
2020-04-28 19:10:26 +02:00
2020-05-20 17:05:06 +02:00
2020-05-30 17:24:43 -04:00
2020-05-16 06:42:16 +02:00
2020-05-16 06:42:16 +02:00
2020-06-09 17:26:10 +02:00