From 1c2b94a727cd5a31d1c2c2357c9bbf7fb75995ed Mon Sep 17 00:00:00 2001 From: Sarkis Kovlekjian Date: Tue, 15 Oct 2024 21:29:29 +0200 Subject: [PATCH 1/4] fix issue #802 break-all --- src/mdx/components.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdx/components.js b/src/mdx/components.js index 7c93e40bcdd..f9bce4ef9d1 100644 --- a/src/mdx/components.js +++ b/src/mdx/components.js @@ -179,7 +179,7 @@ export const UnorderedList = styled.ul` } li { - word-wrap: break-all; + word-break: break-all; } li > p { From a373384f3b89086915528cc8586820467c9681a9 Mon Sep 17 00:00:00 2001 From: Sarkis Kovlekjian Date: Sun, 27 Oct 2024 20:05:12 +0100 Subject: [PATCH 2/4] address issue #1348 --- src/components/page-footer.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/page-footer.js b/src/components/page-footer.js index 301509b34b8..313ab4581c3 100644 --- a/src/components/page-footer.js +++ b/src/components/page-footer.js @@ -36,11 +36,13 @@ const Contributors = ({contributors = [], latestCommit}) => { {contributors.length} {pluralize('contributor', contributors.length)} {contributors.map(login => ( - - - - - +
  • + + + + + +
  • ))} {latestCommit ? ( From f6d413796b12950edcdf90e9203739ba3b1d78d3 Mon Sep 17 00:00:00 2001 From: Sarkis Kovlekjian Date: Tue, 29 Oct 2024 15:20:18 +0100 Subject: [PATCH 3/4] fix CI with linting --- src/components/page-footer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/page-footer.js b/src/components/page-footer.js index 313ab4581c3..6b3fa372a5b 100644 --- a/src/components/page-footer.js +++ b/src/components/page-footer.js @@ -37,12 +37,12 @@ const Contributors = ({contributors = [], latestCommit}) => { {contributors.map(login => (
  • - + - + - -
  • + + ))} {latestCommit ? ( From 638051140f2e2225acf4b617da9f2b11b2d333e8 Mon Sep 17 00:00:00 2001 From: Sarkis Kovlekjian Date: Tue, 5 Nov 2024 14:54:27 +0100 Subject: [PATCH 4/4] add type field documentation in package.json v10 --- .../cli/v10/configuring-npm/package-json.mdx | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/cli/v10/configuring-npm/package-json.mdx b/content/cli/v10/configuring-npm/package-json.mdx index f87efbfb11d..acacc8ddb0e 100644 --- a/content/cli/v10/configuring-npm/package-json.mdx +++ b/content/cli/v10/configuring-npm/package-json.mdx @@ -204,6 +204,28 @@ Both email and url are optional either way. npm also sets a top-level "maintainers" field with your npm user info. +### type + +This _optional_ field of value _string_ helps Node.js determine the module format used in the package, affecting _import_ and _export_ behavior. + +By default, Node.js utilizes the [CommonJS modules](https://nodejs.org/docs/latest/api/modules.html#modules-commonjs-modules) system for files with a `.js` or `.cjs` extension regardless whether the `type` field was provided or not. To use the modern [ECMAScript modules](https://nodejs.org/docs/latest/api/esm.html) (AKA ES modules) system, a `.mjs` file extension is required. + +In a package.json file, the `type` field currently accepts two values: + +- `commonjs` (default): Specifies that `.js` files within the package should be treated as CommonJS modules. + +- `module`: Specifies that `.js` files within the package should be treated as ES modules. + +Example: + +```json +// ECMAScript +{ +"type": "module" +} + +``` + ### funding You can specify an object containing a URL that provides up-to-date information about ways to help fund development of your package, a string URL, or an array of objects and string URLs: