From 0972d13dd4445e69f70f02cd4f580f1b1aba03b3 Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Mon, 12 Sep 2022 12:33:04 +0200 Subject: [PATCH] feat(pages): removed deprecated pages, added new pages, updated existing ones (#2742) --- .gitignore | 3 + CONTRIBUTING.md | 2 - README.md | 1 - content/about/about.en.md | 25 +- content/about/governance.en.md | 7 +- content/about/governance.fr.md | 7 +- content/about/releases.fr.md | 2 +- content/about/security.en.md | 31 +-- content/about/working-groups.en.md | 232 ----------------- content/about/working-groups.fr.md | 215 ---------------- content/community/index.fr.md | 67 ----- content/community/index.md | 67 ----- content/download/package-manager.en.md | 59 +++-- content/download/releases.en.md | 15 ++ content/get-involved/code-and-learn.en.md | 24 ++ content/get-involved/collab-summit.en.md | 30 +++ content/get-involved/contribute.en.md | 47 ++++ content/get-involved/index.en.md | 36 +++ content/learn/blocking-vs-non-blocking.en.md | 146 +++++++++++ .../learn/how-to-use-npm-package/index.en.md | 1 - content/learn/javascript-async-await.en.md | 1 - content/learn/javascript-callbacks.en.md | 1 - content/learn/javascript-promises.en.md | 1 - content/learn/javascript-timers/index.en.md | 1 - content/learn/node-buffers.en.md | 1 - content/learn/node-cli-args.en.md | 1 - content/learn/node-control-flow.en.md | 1 - content/learn/node-difference-dev-prod.en.md | 1 - .../learn/node-environment-variables.en.md | 1 - content/learn/node-es6.en.md | 38 +++ content/learn/node-event-emitter.en.md | 1 - content/learn/node-event-loop/index.en.md | 1 - content/learn/node-exceptions.en.md | 1 - content/learn/node-export-module.en.md | 1 - content/learn/node-file-descriptors.en.md | 1 - content/learn/node-file-paths.en.md | 1 - content/learn/node-file-stats.en.md | 1 - content/learn/node-folders.en.md | 1 - content/learn/node-http-server.en.md | 1 - content/learn/node-input-from-cli.en.md | 1 - content/learn/node-inspect-object/index.en.md | 1 - content/learn/node-make-http-requests.en.md | 1 - content/learn/node-module-events.en.md | 1 - content/learn/node-module-fs.en.md | 1 - content/learn/node-module-http.en.md | 1 - content/learn/node-module-os.en.md | 1 - content/learn/node-module-path.en.md | 1 - content/learn/node-output-to-cli.en.md | 1 - content/learn/node-process-nexttick.en.md | 1 - content/learn/node-reading-files.en.md | 1 - content/learn/node-repl/index.en.md | 1 - content/learn/node-request-data.en.md | 1 - content/learn/node-run-cli.en.md | 1 - content/learn/node-setimmediate.en.md | 1 - content/learn/node-terminate-program.en.md | 1 - content/learn/node-with-typescript.en.md | 1 - content/learn/node-with-web-assembly.en.md | 1 - content/learn/node-writing-files.en.md | 1 - content/learn/nodejs-streams.en.md | 1 - .../npm-dependencies-devdependencies.en.md | 1 - ...npm-install-previous-package-version.en.md | 1 - .../learn/npm-know-version-installed.en.md | 1 - content/learn/npm-packages-local-global.en.md | 1 - content/learn/npm-semantic-versioning.en.md | 1 - content/learn/npm-uninstall-packages.en.md | 1 - content/learn/npm.en.md | 1 - content/learn/npx.en.md | 1 - content/learn/package-json.en.md | 1 - content/learn/package-lock-json.en.md | 1 - .../learn/update-npm-dependencies/index.en.md | 1 - content/learn/v8-engine.en.md | 1 - .../learn/where-npm-install-packages.en.md | 1 - firebase.json | 5 - gatsby-config.js | 2 +- redirects.js | 2 - .../VersionSelector/index.module.scss | 2 +- src/components/Article/index.module.scss | 23 +- src/components/Article/index.tsx | 3 +- src/components/BlogCard/index.module.scss | 2 +- src/components/Codebox/index.tsx | 4 +- .../DownloadAdditional/index.module.scss | 4 +- .../DownloadReleases/index.module.scss | 2 +- src/components/EditLink/index.module.scss | 4 + src/components/EditLink/index.tsx | 9 +- .../__snapshots__/index.test.tsx.snap | 2 +- src/components/Footer/index.module.scss | 10 +- .../__snapshots__/index.test.tsx.snap | 33 ++- src/components/Header/index.module.scss | 14 +- src/components/Header/index.tsx | 15 +- src/components/Hero/index.module.scss | 4 +- .../__snapshots__/index.test.tsx.snap | 11 +- .../__snapshots__/page.test.tsx.snap | 13 +- src/components/Layout/article.tsx | 4 +- .../__snapshots__/index.test.tsx.snap | 1 - src/components/NavigationItem/index.tsx | 9 +- .../__snapshots__/index.test.tsx.snap | 1 - .../NavigationSection/index.module.scss | 2 +- .../RandomContributor/index.module.scss | 2 +- src/components/RecentPosts/index.module.scss | 2 +- .../__snapshots__/index.test.tsx.snap | 105 ++++++-- .../SideNavBar/__tests__/index.test.tsx | 16 +- src/components/SideNavBar/index.module.scss | 13 +- src/components/SideNavBar/index.tsx | 114 ++++++--- src/components/TableOfContents/index.tsx | 35 ++- .../BlogContainer/index.module.scss | 6 +- src/containers/BlogContainer/index.tsx | 11 +- .../__snapshots__/navigation.test.tsx.snap | 1 - src/containers/Navigation/index.module.scss | 6 +- src/data/learn.yaml | 2 + src/i18n/locales/en.json | 19 +- src/i18n/locales/es.json | 19 +- src/i18n/locales/fr.json | 21 +- .../__snapshots__/community.test.tsx.snap | 234 ------------------ src/pages/__tests__/community.test.tsx | 24 -- .../__snapshots__/governance.test.tsx.snap | 106 +++++--- .../__snapshots__/index.test.tsx.snap | 103 +++++--- .../__snapshots__/privacy.test.tsx.snap | 100 +++++--- .../__snapshots__/releases.test.tsx.snap | 106 +++++--- .../__snapshots__/resources.test.tsx.snap | 116 ++++++--- .../__snapshots__/security.test.tsx.snap | 104 +++++--- .../working-groups.test.tsx.snap | 234 ------------------ .../about/__tests__/working-groups.test.tsx | 16 -- .../__snapshots__/index.test.tsx.snap | 26 +- .../package-manager.test.tsx.snap | 117 ++++++--- src/pages/download/releases.tsx | 74 ++++++ .../code-learn.tsx} | 8 +- .../collab-summit.tsx} | 17 +- src/pages/get-involved/contribute.tsx | 42 ++++ src/pages/get-involved/index.tsx | 42 ++++ src/styles/base.scss | 10 +- src/styles/containers.scss | 4 +- .../__snapshots__/learn.test.tsx.snap | 13 +- .../__snapshots__/post.test.tsx.snap | 13 +- src/types/navigation.ts | 4 + 134 files changed, 1497 insertions(+), 1675 deletions(-) delete mode 100644 content/about/working-groups.en.md delete mode 100644 content/about/working-groups.fr.md delete mode 100644 content/community/index.fr.md delete mode 100644 content/community/index.md create mode 100644 content/download/releases.en.md create mode 100644 content/get-involved/code-and-learn.en.md create mode 100644 content/get-involved/collab-summit.en.md create mode 100644 content/get-involved/contribute.en.md create mode 100644 content/get-involved/index.en.md create mode 100644 content/learn/blocking-vs-non-blocking.en.md create mode 100644 content/learn/node-es6.en.md delete mode 100644 src/pages/__tests__/__snapshots__/community.test.tsx.snap delete mode 100644 src/pages/__tests__/community.test.tsx delete mode 100644 src/pages/about/__tests__/__snapshots__/working-groups.test.tsx.snap delete mode 100644 src/pages/about/__tests__/working-groups.test.tsx create mode 100644 src/pages/download/releases.tsx rename src/pages/{about/working-groups.tsx => get-involved/code-learn.tsx} (76%) rename src/pages/{community.tsx => get-involved/collab-summit.tsx} (56%) create mode 100644 src/pages/get-involved/contribute.tsx create mode 100644 src/pages/get-involved/index.tsx diff --git a/.gitignore b/.gitignore index b27c5abea8..b3aa8c8f0a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ coverage .history yarn.lock .idea/ + +# Firebase +firebase-debug.log diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4172b2b6ba..6b9cfd579e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,8 +92,6 @@ In the case of an objection being raised in a pull request by another collaborat * A Pull Request must be opened on the @nodejs/nodejs.dev README file adding the new collaborator to the list (note the order of names) * The Pull Request must be approved by at least two members of @nodejs/nodejs.dev, @nodejs/website, or @nodejs/website-redesign * Pull Request must remain open for 72 hours without any objections -* Once the requirements are met and approved, the pull request can be merged and a member of @nodejs/community-committee will add the new member to the [@nodejs/nodejs-dev team](https://github.com/orgs/nodejs/teams/nodejs-dev) - ## 🐛 Debugging Failing Checks diff --git a/README.md b/README.md index 0d138270f4..8443cea4bd 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,6 @@ participated in that process. [Query issues for "Meeting"][] [code of conduct]: https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md -[community committee]: https://github.com/nodejs/community-committee [contributing guidelines]: ./CONTRIBUTING.md [figma design]: https://www.figma.com/file/lOxAGGg5KXb6nwie7zXkz6/NJ---Design-System?node-id=22%3A6086 [meeting notes]: ./meetings diff --git a/content/about/about.en.md b/content/about/about.en.md index a3fdcba346..bb436997d4 100644 --- a/content/about/about.en.md +++ b/content/about/about.en.md @@ -11,7 +11,7 @@ scalable network applications. In the following "hello world" example, many connections can be handled concurrently. Upon each connection, the callback is fired, but if there is no work to be done, Node.js will sleep. -```js +```javascript const http = require('http'); const hostname = '127.0.0.1'; @@ -32,21 +32,22 @@ This is in contrast to today's more common concurrency model, in which OS thread are employed. Thread-based networking is relatively inefficient and very difficult to use. Furthermore, users of Node.js are free from worries of dead-locking the process, since there are no locks. Almost no function in -Node.js directly performs I/O, so the process never blocks. Because nothing blocks, scalable systems are very reasonable to develop in Node.js. +Node.js directly performs I/O, so the process never blocks except when the I/O is performed using +synchronous methods of Node.js standard library. Because nothing blocks, scalable systems are very +reasonable to develop in Node.js. If some of this language is unfamiliar, there is a full article on [Blocking vs. Non-Blocking][]. -*** +--- Node.js is similar in design to, and influenced by, systems like Ruby's [Event Machine][] and Python's [Twisted][]. Node.js takes the event model a bit -further. It presents an [event loop][] as a runtime construct instead of as a library. In other systems, there is always a blocking call to start the -event-loop. +further. It presents an [event loop][] as a runtime construct instead of as a library. In other systems, +there is always a blocking call to start the event-loop. Typically, behavior is defined through callbacks at the beginning of a script, and -at the end a server is started through a blocking call like -`EventMachine::run()`. In Node.js, there is no such start-the-event-loop call. -Node.js simply enters the event loop after executing the input script. Node.js +at the end a server is started through a blocking call like `EventMachine::run()`. +In Node.js, there is no such start-the-event-loop call. Node.js simply enters the event loop after executing the input script. Node.js exits the event loop when there are no more callbacks to perform. This behavior is like browser JavaScript — the event loop is hidden from the user. @@ -61,9 +62,9 @@ communicate with. Built upon that same interface is the [`cluster`][] module, which allows you to share sockets between processes to enable load balancing over your cores. -[Blocking vs. Non-Blocking]: https://nodejs.org/en/docs/guides/blocking-vs-non-blocking/ +[Blocking vs. Non-Blocking]: /learn/overview-of-blocking-vs-non-blocking/ +[`child_process.fork()`]: /api/child_process/ +[`cluster`]: https://nodejs.org/api/cluster.html +[event loop]: /learn/the-nodejs-event-loop/ [Event Machine]: https://github.com/eventmachine/eventmachine [Twisted]: https://twistedmatrix.com/trac/ -[`child_process.fork()`]: https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options -[`cluster`]: https://nodejs.org/api/cluster.html -[event loop]: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/ diff --git a/content/about/governance.en.md b/content/about/governance.en.md index 1ecbb43100..54e3e63947 100644 --- a/content/about/governance.en.md +++ b/content/about/governance.en.md @@ -25,12 +25,9 @@ A guide for Collaborators is maintained at [collaborator-guide.md][]. ## Top Level Committees -The project is governed jointly by the [Technical Steering Committee (TSC)][] -which is responsible for high-level guidance of the project, and the -[Community Committee (CommComm)][] which is responsible for guiding and -extending the Node.js community. +The project is governed by the [Technical Steering Committee (TSC)][] +which is responsible for high-level guidance of the project. -[Community Committee (CommComm)]: https://github.com/nodejs/community-committee/blob/main/Community-Committee-Charter.md [Consensus Seeking]: https://en.wikipedia.org/wiki/Consensus-seeking_decision-making [README.md]: https://github.com/nodejs/node/blob/main/README.md#current-project-team-members [TSC]: https://github.com/nodejs/TSC diff --git a/content/about/governance.fr.md b/content/about/governance.fr.md index 320e056d80..0f9389eb72 100644 --- a/content/about/governance.fr.md +++ b/content/about/governance.fr.md @@ -26,12 +26,9 @@ Un guide pour les collaborateurs est maintenu à [collaborator-guide.md][]. ## Comités de haut niveau -Le projet est dirigé conjointement par le [Comité directeur technique (TSC)][] -qui est responsable de l'orientation de haut niveau du projet, et le -[comité de la communauté (CommComm)][] qui est responsable de l'orientation et de -l'extension de la communauté Node.js. +Le projet est dirigé par le [Comité directeur technique (TSC)][] +qui est responsable de l'orientation de haut niveau du projet -[comité de la communauté (CommComm)]: https://github.com/nodejs/community-committee/blob/main/Community-Committee-Charter.md [recherche de consensus]: https://en.wikipedia.org/wiki/Consensus-seeking_decision-making [README.md]: https://github.com/nodejs/node/blob/main/README.md#current-project-team-members [TSC]: https://github.com/nodejs/TSC diff --git a/content/about/releases.fr.md b/content/about/releases.fr.md index 042addc36e..4d33a95c60 100644 --- a/content/about/releases.fr.md +++ b/content/about/releases.fr.md @@ -3,7 +3,7 @@ title: releases displayTitle: Sorties description: "Sorties | Node.js" authors: ZYSzys, nstanard, mikeal, fhemberger, garybernhardt, piepmatz, boneskull, bjb568, AugustinMauroy -category: releases +category: about --- Les versions majeures de Node.js passent au statut de version _Current_ pendant six mois, ce qui donne aux auteurs de bibliothèques le temps d'ajouter la prise en charge de ces versions. diff --git a/content/about/security.en.md b/content/about/security.en.md index cebff8598e..e9bba22667 100644 --- a/content/about/security.en.md +++ b/content/about/security.en.md @@ -6,12 +6,12 @@ authors: reedloden,XhmikosR,Trott,fhemberger,MaledongGit,yous,sam-github,vdeturc category: about --- -## Reporting a Bug in Node.js +## Reporting a bug in Node.js Report security bugs in Node.js via [HackerOne](https://hackerone.com/nodejs). -Your report will be acknowledged within 24 hours, and you’ll receive a more -detailed response to your report within 48 hours indicating the next steps in +Your report will be acknowledged within 5 days, and you'll receive a more +detailed response to your report within 10 days indicating the next steps in handling your submission. After the initial reply to your report, the security team will endeavor to keep @@ -19,25 +19,18 @@ you informed of the progress being made towards a fix and full announcement, and may ask for additional information or guidance surrounding the reported issue. -### Node.js Bug Bounty Program +### Node.js bug bounty program The Node.js project engages in an official bug bounty program for security -researchers and responsible public disclosures. The program is managed through +researchers and responsible public disclosures. The program is managed through the HackerOne platform. See for further details. -## Reporting a Bug in a third party module +## Reporting a bug in a third party module Security bugs in third party modules should be reported to their respective -maintainers and should also be coordinated through the Node.js Ecosystem -Security Team via [HackerOne](https://hackerone.com/nodejs-ecosystem). +maintainers. -Details regarding this process can be found in the -[Security Working Group repository](https://github.com/nodejs/security-wg/tree/main/processes/vuln_db.md). - -Thank you for improving the security of Node.js and its ecosystem. Your efforts -and responsible disclosure are greatly appreciated and will be acknowledged. - -## Disclosure Policy +## Disclosure policy Here is the security disclosure policy for Node.js @@ -62,19 +55,19 @@ Here is the security disclosure policy for Node.js * This process can take some time, especially when coordination is required with maintainers of other projects. Every effort will be made to handle the - bug in as timely a manner as possible; however, it’s important that we follow + bug in as timely a manner as possible; however, it's important that we follow the release process above to ensure that the disclosure is handled in a consistent manner. -## Receiving Security Updates +## Receiving security updates Security notifications will be distributed via the following methods. * * -## Comments on this Policy +## Comments on this policy If you have suggestions on how this process could be improved please submit a -[pull request](https://github.com/nodejs/nodejs.dev) or +[pull request](https://github.com/nodejs/nodejs.org) or [file an issue](https://github.com/nodejs/security-wg/issues/new) to discuss. diff --git a/content/about/working-groups.en.md b/content/about/working-groups.en.md deleted file mode 100644 index 54d044c196..0000000000 --- a/content/about/working-groups.en.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -title: working-groups -displayTitle: Working Groups -description: "Working Groups | Node.js" -authors: williamkapke,Trott,fhemberger,rxmarbles,mhdawson,XhmikosR,ryanmurakami,outsideris,MaledongGit,vsemozhetbyt,wonderdogone,sotayamashita,richardlau,pierreneter,nschonni,marocchino,stevemao,lpinca,phillipj,jasnell,sejaljain123 -category: about ---- - -Core Working Groups are created by the -[Technical Steering Committee (TSC)](https://github.com/nodejs/TSC/blob/main/TSC-Charter.md). - -## [Addon API](https://github.com/nodejs/nan) - -The Addon API Working Group is responsible for maintaining the NAN project and -corresponding _nan_ package in npm. The NAN project makes available an -abstraction layer for native add-on authors for Node.js, -assisting in the writing of code that is compatible with many actively used -versions of Node.js, V8 and libuv. - -Responsibilities include: - -* Maintaining the [NAN](https://github.com/nodejs/nan) GitHub repository, - including code, issues and documentation. -* Maintaining the [addon-examples](https://github.com/nodejs/node-addon-examples) - GitHub repository, including code, issues and documentation. -* Maintaining the C++ Addon API within the Node.js project, in subordination to - the Node.js TSC. -* Maintaining the Addon documentation within the Node.js project, in - subordination to the Node.js TSC. -* Maintaining the _nan_ package in npm, releasing new versions as appropriate. -* Messaging about the future of the Node.js and NAN interface to give the - community advance notice of changes. - -The current members can be found in their -[README](https://github.com/nodejs/nan#collaborators). - -## [Build](https://github.com/nodejs/build) - -The Build Working Group's purpose is to create and maintain a distributed -automation infrastructure. - -Responsibilities include: - -* Producing packages for all target platforms. -* Running tests. -* Running performance testing and comparisons. -* Creating and managing build-containers. - -## [Diagnostics](https://github.com/nodejs/diagnostics) - -The Diagnostics Working Group's purpose is to surface a set of comprehensive, -documented, and extensible diagnostic interfaces for use by Node.js tools and -JavaScript VMs. - -Responsibilities include: - -* Collaborating with V8 to integrate `v8_inspector` into Node.js. -* Collaborating with V8 to integrate `trace_event` into Node.js. -* Collaborating with Core to refine `async_wrap` and `async_hooks`. -* Maintaining and improving OS trace system integration (e.g. ETW, LTTNG, dtrace). -* Documenting diagnostic capabilities and APIs in Node.js and its components. -* Exploring opportunities and gaps, discussing feature requests, and addressing - conflicts in Node.js diagnostics. -* Fostering an ecosystem of diagnostics tools for Node.js. -* Defining and adding interfaces/APIs in order to allow dumps to be generated - when needed. -* Defining and adding common structures to the dumps generated in order to - support tools that want to introspect those dumps. - -## [Docker](https://github.com/nodejs/docker-node) - -The Docker Working Group's purpose is to build, maintain, and improve official -Docker images for the Node.js project. - -Responsibilities include: - -* Keeping the official Docker images updated in line with new Node.js releases. -* Decide and implement image improvements and/or fixes. -* Maintain and improve the images' documentation. - -## [Evangelism](https://github.com/nodejs/evangelism) - -The Evangelism Working Group promotes the accomplishments -of Node.js and lets the community know how they can get involved. - -Responsibilities include: - -* Facilitating project messaging. -* Managing official project social media. -* Handling the promotion of speakers for meetups and conferences. -* Handling the promotion of community events. -* Publishing regular update summaries and other promotional - content. - -## [i18n](https://github.com/nodejs/i18n) - -The i18n Working Groups handle more than just translations. They -are endpoints for community members to collaborate with each -other in their language of choice. - -Each team is organized around a common spoken language. Each -language community might then produce multiple localizations for -various project resources. - -Responsibilities include: - -* Translating any Node.js materials they believe are relevant to their - community. -* Reviewing processes for keeping translations up to date and of high quality. -* Managing and monitoring social media channels in their language. -* Promoting Node.js speakers for meetups and conferences in their language. - -Each language community maintains its own membership. - -* [nodejs-ar - Arabic (العَرَبِيَّة)](https://github.com/nodejs/nodejs-ar) -* [nodejs-bg - Bulgarian (български)](https://github.com/nodejs/nodejs-bg) -* [nodejs-bn - Bengali (বাংলা)](https://github.com/nodejs/nodejs-bn) -* [nodejs-zh-CN - Chinese (简体中文)](https://github.com/nodejs/nodejs-zh-CN) -* [nodejs-cs - Czech (Čeština)](https://github.com/nodejs/nodejs-cs) -* [nodejs-da - Danish (Dansk)](https://github.com/nodejs/nodejs-da) -* [nodejs-de - German (Deutsch)](https://github.com/nodejs/nodejs-de) -* [nodejs-el - Greek (Ελληνικά)](https://github.com/nodejs/nodejs-el) -* [nodejs-es - Spanish (Español)](https://github.com/nodejs/nodejs-es) -* [nodejs-fa - Persian (فارسی)](https://github.com/nodejs/nodejs-fa) -* [nodejs-fi - Finnish (Suomi)](https://github.com/nodejs/nodejs-fi) -* [nodejs-fr - French (Français)](https://github.com/nodejs/nodejs-fr) -* [nodejs-he - Hebrew (עברית)](https://github.com/nodejs/nodejs-he) -* [nodejs-hi - Hindi (हिन्दी)](https://github.com/nodejs/nodejs-hi) -* [nodejs-hu - Hungarian (Magyar)](https://github.com/nodejs/nodejs-hu) -* [nodejs-id - Indonesian (Bahasa Indonesia)](https://github.com/nodejs/nodejs-id) -* [nodejs-it - Italian (Italiano)](https://github.com/nodejs/nodejs-it) -* [nodejs-ja - Japanese (日本語)](https://github.com/nodejs/nodejs-ja) -* [nodejs-ka - Georgian (ქართული)](https://github.com/nodejs/nodejs-ka) -* [nodejs-ko - Korean (한국어)](https://github.com/nodejs/nodejs-ko) -* [nodejs-mk - Macedonian (Македонски)](https://github.com/nodejs/nodejs-mk) -* [nodejs-ms - Malay (بهاس ملايو‎)](https://github.com/nodejs/nodejs-ms) -* [nodejs-nl - Dutch (Nederlands)](https://github.com/nodejs/nodejs-nl) -* [nodejs-no - Norwegian (Norsk)](https://github.com/nodejs/nodejs-no) -* [nodejs-pl - Polish (Język Polski)](https://github.com/nodejs/nodejs-pl) -* [nodejs-pt - Portuguese (Português)](https://github.com/nodejs/nodejs-pt) -* [nodejs-ro - Romanian (Română)](https://github.com/nodejs/nodejs-ro) -* [nodejs-ru - Russian (Русский)](https://github.com/nodejs/nodejs-ru) -* [nodejs-sv - Swedish (Svenska)](https://github.com/nodejs/nodejs-sv) -* [nodejs-ta - Tamil (தமிழ்)](https://github.com/nodejs/nodejs-ta) -* [nodejs-tr - Turkish (Türkçe)](https://github.com/nodejs/nodejs-tr) -* [nodejs-zh-TW - Taiwanese (繁體中文(台灣))](https://github.com/nodejs/nodejs-zh-TW) -* [nodejs-uk - Ukrainian (Українська)](https://github.com/nodejs/nodejs-uk) -* [nodejs-vi - Vietnamese (Tiếng Việt)](https://github.com/nodejs/nodejs-vi) - -## [Package Maintenance](https://github.com/nodejs/package-maintenance) - -Responsibilities include: - -* Building, documenting and evangelizing guidance, tools and processes that make it easier for maintainers to - maintain packages and accept help from those who depend on their packages. -* Management of repositories within the [pkgjs](https://github.com/pkgjs) - GitHub organization including but not limited to: - * Managing the list of organization owners which supplement the standard - Node.js organization owners as outlined in: - * Overseeing new repositories (creating, moving, removing) - * Managing the maintainer teams for all of the repositories. - * Contribution policy for repositories -* Technical direction for the projects within - the [pkgjs](https://github.com/pkgjs) organization -* Managing the maintainer teams and contribution policies for the - following repositories - `* nodejs/ci-config-travis` - `* nodejs/ci-config-github-actions` - `* nodejs/package-maintenance repository.` - -## [Release](https://github.com/nodejs/Release) - -The Release Working Group manages the release process for Node.js. - -Responsibilities include: - -* Define the release process. -* Define the content of releases. -* Generate and create releases. -* Test Releases. -* Manage the Long Term Support and Current branches including - backporting changes to these branches. -* Define the policy for what gets backported to release streams - -## [Security](https://github.com/nodejs/security-wg) - -The Security Working Group manages all aspects and processes linked to Node.js security. - -Responsibilities include: - -* Define and maintain security policies and procedures for: - * the core Node.js project - * other projects maintained by the Node.js Technical Steering Committee (TSC). -* Work with the Node Security Platform to bring community vulnerability data into - the foundation as a shared asset. -* Ensure the vulnerability data is updated in an efficient and timely manner. - For example, ensuring there are well-documented processes for reporting - vulnerabilities in community modules. -* Review and recommend processes for handling of security reports (but not the - actual administration of security reports, which are reviewed by a group of people - directly delegated to by the TSC). -* Define and maintain policies and procedures for the coordination of security - concerns within the external Node.js open source ecosystem. -* Offer help to npm package maintainers to fix high-impact security bugs. -* Maintain and make available data on disclosed security vulnerabilities in: - * the core Node.js project - * other projects maintained by the Node.js Foundation technical group - * the external Node.js open source ecosystem -* Promote the improvement of security practices within the Node.js ecosystem. -* Recommend security improvements for the core Node.js project. -* Facilitate and promote the expansion of a healthy security service and product - provider ecosystem. - -## [Streams](https://github.com/nodejs/readable-stream) - -The Streams Working Group is dedicated to the support and improvement of the -Streams API as used in Node.js and the npm ecosystem. We seek to create a -composable API that solves the problem of representing multiple occurrences -of an event over time in a humane, low-overhead fashion. Improvements to the -API will be driven by the needs of the ecosystem; interoperability and -backwards compatibility with other solutions and prior versions are paramount -in importance. - -Responsibilities include: - -* Addressing stream issues on the Node.js issue tracker. -* Authoring and editing stream documentation within the Node.js project. -* Reviewing changes to stream subclasses within the Node.js project. -* Redirecting changes to streams from the Node.js project to this project. -* Assisting in the implementation of stream providers within Node.js. -* Recommending versions of `readable-stream` to be included in Node.js. -* Messaging about the future of streams to give the community advance notice of changes. diff --git a/content/about/working-groups.fr.md b/content/about/working-groups.fr.md deleted file mode 100644 index f3a80b2345..0000000000 --- a/content/about/working-groups.fr.md +++ /dev/null @@ -1,215 +0,0 @@ ---- -title: working-groups -displayTitle: Groupes de travail -description: "Groupes de travail | Node.js" -authors: williamkapke,Trott,fhemberger,rxmarbles,mhdawson,XhmikosR,ryanmurakami,outsideris,MaledongGit,vsemozhetbyt,wonderdogone,sotayamashita,richardlau,pierreneter,nschonni,marocchino,stevemao,lpinca,phillipj,jasnell,sejaljain123,AugustinMauroy -category: working-groups ---- - -Les groupes de travail principaux sont créés par le -[Comité directeur technique (TSC)](https://github.com/nodejs/TSC/blob/main/TSC-Charter.md). - -## [API pour les addons](https://github.com/nodejs/nan) - -Le groupe de travail Addon API est chargé de maintenir le projet NAN et le paquet -paquet _nan_ correspondant dans npm. Le projet NAN met à disposition une -couche d'abstraction pour les auteurs de modules complémentaires natifs pour Node.js, -aidant à l'écriture de code qui est compatible avec de nombreuses versions activement utilisées -de Node.js, V8 et libuv. - -Les responsabilités incluent : - -* Maintenir le dépôt GitHub de [NAN](https://github.com/nodejs/nan), - y compris le code, les problèmes et la documentation. -* Maintien du dépôt GitHub [addon-examples](https://github.com/nodejs/node-addon-examples) - Dépôt GitHub, incluant le code, les problèmes et la documentation. -* Maintenir l'API C++ Addon au sein du projet Node.js, en subordination avec le TSC Node.js. -* Maintien de la documentation Addon au sein du projet Node.js, en subordination avec le TSC Node.js. -* Maintenir le paquet _nan_ dans npm, en publiant de nouvelles versions le cas échéant. -* Messagerie sur l'avenir de l'interface Node.js et NAN pour donner à la communauté un préavis de changement. - communauté un préavis des changements. - -Les membres actuels peuvent être trouvés dans leur -[README](https://github.com/nodejs/nan#collaborators). - -## [Build](https://github.com/nodejs/build) - -L'objectif du groupe de travail Build est de créer et de maintenir une infrastructure d'automatisation distribuée. - -Les responsabilités comprennent : - -* Produire des paquets pour toutes les plateformes cibles. -* Exécution des tests. -* Exécution de tests de performance et de comparaisons. -* Création et gestion des conteneurs de construction. - -## [Diagnostics](https://github.com/nodejs/diagnostics) - -L'objectif du groupe de travail sur les diagnostics est de présenter un ensemble d'interfaces de diagnostic complètes, documentées et extensibles pour l'utilisation par les outils Node js et les autres applications, documentées et extensibles à utiliser par les outils Node.js et les VMs JavaScript. -JavaScript VMs. - -Les responsabilités incluent : - -* Collaboration avec V8 pour intégrer `v8_inspector` dans Node.js. -* Collaboration avec V8 pour intégrer `trace_event` dans Node.js. -* Collaboration avec Core pour affiner `async_wrap` et `async_hooks`. -* Maintenir et améliorer l'intégration du système de trace OS (par exemple ETW, LTTNG, dtrace). -* Documenter les capacités de diagnostic et les API de Node.js et de ses composants. -* Explorer les opportunités et les lacunes, discuter des demandes de fonctionnalités et traiter les conflits dans les diagnostics Node.js. -* Encourager un écosystème d'outils de diagnostic pour Node.js. -* Définir et ajouter des interfaces/API afin de permettre la génération de dumps lorsque cela est nécessaire. -* Définir et ajouter des structures communes aux dumps générés afin de supporter les outils qui veulent introspecter ces dumps. - -## [Docker](https://github.com/nodejs/docker-node) - -L'objectif du groupe de travail Docker est de construire, maintenir et améliorer les images Docker officielles pour le projet Node js. - -Les responsabilités comprennent : - -* Maintenir les images Docker officielles à jour en fonction des nouvelles versions de Node.js. -* Décider et mettre en œuvre des améliorations et/ou des corrections de l'image. -* Maintenir et améliorer la documentation des images. - -## [Evangelism](https://github.com/nodejs/evangelism) - -Le groupe de travail sur l'évangélisation promeut les accomplissements -de Node.js et fait savoir à la communauté comment elle peut s'impliquer. - -Les responsabilités comprennent : - -* Faciliter la messagerie du projet. -* Gérer les médias sociaux officiels du projet. -* Gérer la promotion des orateurs pour les réunions et les conférences. -* Gérer la promotion des événements de la communauté. -* Publier des résumés de mise à jour régulière et d'autres contenus promotionnels. - promotionnel. - -## [i18n](https://github.com/nodejs/i18n) - -Les groupes de travail i18n ne se limitent pas aux traductions. -Ils permettent aux membres de la communauté de collaborer entre eux dans la langue de leur choix. -dans la langue de leur choix. - -Chaque équipe est organisée autour d'une langue parlée commune. Chaque communauté linguistique -communauté linguistique peut alors produire plusieurs localisations pour -diverses ressources du projet. - -Les responsabilités comprennent : - -* Traduire tout matériel Node.js qu'ils croient pertinent pour leur communauté. -* Réviser les processus pour maintenir les traductions à jour et de haute qualité. -* Gérer et surveiller les canaux de médias sociaux dans leur langue. -* Promouvoir les intervenants Node.js pour les rencontres et les conférences dans leur langue. - -Chaque communauté linguistique a ses propres membres. - -* [nodejs-ar - Arabic (العَرَبِيَّة)](https://github.com/nodejs/nodejs-ar) -* [nodejs-bg - Bulgarian (български)](https://github.com/nodejs/nodejs-bg) -* [nodejs-bn - Bengali (বাংলা)](https://github.com/nodejs/nodejs-bn) -* [nodejs-zh-CN - Chinese (简体中文)](https://github.com/nodejs/nodejs-zh-CN) -* [nodejs-cs - Czech (Čeština)](https://github.com/nodejs/nodejs-cs) -* [nodejs-da - Danish (Dansk)](https://github.com/nodejs/nodejs-da) -* [nodejs-de - German (Deutsch)](https://github.com/nodejs/nodejs-de) -* [nodejs-el - Greek (Ελληνικά)](https://github.com/nodejs/nodejs-el) -* [nodejs-es - Spanish (Español)](https://github.com/nodejs/nodejs-es) -* [nodejs-fa - Persian (فارسی)](https://github.com/nodejs/nodejs-fa) -* [nodejs-fi - Finnish (Suomi)](https://github.com/nodejs/nodejs-fi) -* [nodejs-fr - French (Français)](https://github.com/nodejs/nodejs-fr) -* [nodejs-he - Hebrew (עברית)](https://github.com/nodejs/nodejs-he) -* [nodejs-hi - Hindi (हिन्दी)](https://github.com/nodejs/nodejs-hi) -* [nodejs-hu - Hungarian (Magyar)](https://github.com/nodejs/nodejs-hu) -* [nodejs-id - Indonesian (Bahasa Indonesia)](https://github.com/nodejs/nodejs-id) -* [nodejs-it - Italian (Italiano)](https://github.com/nodejs/nodejs-it) -* [nodejs-ja - Japanese (日本語)](https://github.com/nodejs/nodejs-ja) -* [nodejs-ka - Georgian (ქართული)](https://github.com/nodejs/nodejs-ka) -* [nodejs-ko - Korean (한국어)](https://github.com/nodejs/nodejs-ko) -* [nodejs-mk - Macedonian (Македонски)](https://github.com/nodejs/nodejs-mk) -* [nodejs-ms - Malay (بهاس ملايو‎)](https://github.com/nodejs/nodejs-ms) -* [nodejs-nl - Dutch (Nederlands)](https://github.com/nodejs/nodejs-nl) -* [nodejs-no - Norwegian (Norsk)](https://github.com/nodejs/nodejs-no) -* [nodejs-pl - Polish (Język Polski)](https://github.com/nodejs/nodejs-pl) -* [nodejs-pt - Portuguese (Português)](https://github.com/nodejs/nodejs-pt) -* [nodejs-ro - Romanian (Română)](https://github.com/nodejs/nodejs-ro) -* [nodejs-ru - Russian (Русский)](https://github.com/nodejs/nodejs-ru) -* [nodejs-sv - Swedish (Svenska)](https://github.com/nodejs/nodejs-sv) -* [nodejs-ta - Tamil (தமிழ்)](https://github.com/nodejs/nodejs-ta) -* [nodejs-tr - Turkish (Türkçe)](https://github.com/nodejs/nodejs-tr) -* [nodejs-zh-TW - Taiwanese (繁體中文(台灣))](https://github.com/nodejs/nodejs-zh-TW) -* [nodejs-uk - Ukrainian (Українська)](https://github.com/nodejs/nodejs-uk) -* [nodejs-vi - Vietnamese (Tiếng Việt)](https://github.com/nodejs/nodejs-vi) - -## [Package Maintenance](https://github.com/nodejs/package-maintenance) - -Les responsabilités comprennent : - -* La construction, la documentation et l'évangélisation de conseils, d'outils et de processus qui facilitent la maintenance des paquets et l'acceptation de l'aide de ceux qui dépendent de leurs paquets. -* Gestion des dépôts au sein de l'organisation GitHub [pkgjs](https://github.com/pkgjs) - * Gestion de la liste des propriétaires de l'organisation qui complète celle des propriétaires standard de l'organisation Node.js comme indiqué dans: - * Supervision des nouveaux dépôts (création, déplacement, suppression) - * Gérer les équipes de mainteneurs pour tous les dépôts. - * Politique de contribution pour les dépôts -* Direction technique pour les projets au sein de l'organisation [pkgjs](https://github.com/pkgjs). -* Gestion des équipes de mainteneurs et des politiques de contribution pour les dépôts suivants dépôts suivants - `* nodejs/ci-config-travis` - `* nodejs/ci-config-github-actions` - `* nodejs/package-maintenance repository.` - -## [Communiqué de presse](https://github.com/nodejs/Release) - -Le groupe de travail de publication gère le processus de publication de Node.js - -Les responsabilités incluent : - -* Définir le processus de publication. -* Définir le contenu des versions. -* Générer et créer des versions. -* Tester les versions. -* Gérer le support à long terme et les branches actuelles, y compris - le backportage des changements dans ces branches. -* Définir la politique pour ce qui est rétroporté dans les flux de versions. - -## [Sécurité](https://github.com/nodejs/security-wg) - -Le groupe de travail sur la sécurité gère tous les aspects et processus liés à la sécurité de Node.js. - -Les responsabilités comprennent : - -* Définir et maintenir les politiques et procédures de sécurité pour : - * le projet Node.js de base - * d'autres projets maintenus par le comité de pilotage technique (TSC) de Node.js. -* Travailler avec la plate-forme de sécurité Node pour consolider dans la fondation les données de vulnérabilité rapportées par la communauté. - la fondation comme un actif partagé. -* S'assurer que les données de vulnérabilité sont mises à jour d'une manière efficace et opportune. - Par exemple, en s'assurant qu'il existe des processus bien documentés pour signaler les vulnérabilités dans les modules communautaires. -* Examiner et recommander des processus pour le traitement des rapports de sécurité (mais pas la - l'administration proprement dite des rapports de sécurité, qui sont examinés par un groupe de personnes - directement déléguées par le TSC). -* Définir et maintenir des politiques et des procédures pour la coordination des problèmes de sécurité au sein de la communauté externe de Node.j. - sécurité au sein de l'écosystème open source externe de Node.js. -* Offrir de l'aide aux mainteneurs de paquets npm pour corriger les bogues de sécurité à fort impact. -* Maintenir et mettre à disposition des données sur les vulnérabilités de sécurité divulguées dans : - * le noyau du projet Node.js - * d'autres projets maintenus par le groupe technique de la Fondation Node.js - * l'écosystème open source externe de Node.js. -* Promouvoir l'amélioration des pratiques de sécurité au sein de l'écosystème Node.js. -* Recommander des améliorations de sécurité pour le projet Node.js de base. -* Faciliter et promouvoir l'expansion d'un écosystème sain de fournisseurs de services et de produits de sécurité. - -## [Streams](https://github.com/nodejs/readable-stream) - -Le groupe de travail Streams est dédié au support et à l'amélioration de l'API -Streams telle qu'utilisée dans Node.js et l'écosystème npm. Nous cherchons à créer une -qui résout le problème de la représentation de multiples occurrences d'un événement dans le temps -d'une manière humaine et peu coûteuse. Les améliorations de l'API -seront déterminées par les besoins de l'écosystème, l'interopérabilité -et la rétrocompatibilité avec d'autres solutions et versions antérieures sont d'une importance capitale. - -Les responsabilités comprennent : - -* Traiter les problèmes liés aux flux sur le gestionnaire de problèmes de Node.js. -* Création et édition de la documentation sur les flux au sein du projet Node.js. -* Examiner les modifications apportées aux sous-classes de flux au sein du projet Node.js. -* Rediriger les modifications apportées aux flux du projet Node.js vers ce projet. -* Aide à l'implémentation des fournisseurs de flux dans Node.js. -* Recommander des versions de `readable-stream` à inclure dans Node.js. -* Messagerie sur l'avenir des flux pour donner à la communauté un préavis sur les changements. diff --git a/content/community/index.fr.md b/content/community/index.fr.md deleted file mode 100644 index 70bf5047de..0000000000 --- a/content/community/index.fr.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: node.js-community -displayTitle: "Communauté NodeJS" -description: "Node.js possède l'une des communautés open source les plus importantes, les plus dynamiques et les plus innovantes au monde. Node.js est construit, utilisé et maintenu par la communauté. Nous croyons que la communauté est au cœur de la popularité de Node.js. Des personnes étonnantes de toutes les parties du monde, avec un intérêt commun, collaborent et façonnent cette communauté." -authors: ahmadawais, maedahbatool, saqibameen, msaaddev, AugustinMauroy -category: community ---- - -## Introduction - -Node.js possède l'une des communautés open source les plus importantes, les plus dynamiques et les plus innovantes au monde. Node.js est construit, utilisé et maintenu par la communauté. Nous croyons que la communauté est au cœur de la popularité de Node.js. Des personnes étonnantes de toutes les parties du monde, avec un intérêt commun, collaborent et façonnent cette communauté. - -## Code de conduite de la convention des contributeurs Node.js - -Afin de favoriser un environnement ouvert et accueillant, nous, contributeurs et responsables, nous engageons à faire de la participation à notre projet et à notre communauté une expérience exempte de harcèlement pour tous, indépendamment de l'âge, de la taille, du handicap, de l'origine ethnique, des caractéristiques sexuelles, de l'identité et de l'expression de genre, du niveau d'expérience, de l'éducation, du statut socio-économique, de la nationalité, de l'apparence personnelle, de la race, de la religion ou de l'identité et de l'orientation sexuelles. - -[Lire le code de conduite complet →](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md) - -## Ways to Contribute - -Nous accueillons toutes sortes de contributions - documentation, rapports de bogues, contribution au noyau. Indépendamment de l'ampleur de la contribution, nous vous encourageons à faire partie de Node.js. Si une fonctionnalité vous manque, demandez-la, ou peut-être aidez-nous à la construire. - -* [Community Discussions](https://nodejs.org/en/get-involved/#community-discussion) -* [Learning Node.js](https://nodejs.org/en/get-involved/#learning) -* [Asking for General Help](https://nodejs.org/en/get-involved/contribute/#asking-for-general-help) -* [Reporting an Issue](https://nodejs.org/en/get-involved/contribute/#reporting-an-issue) -* [Code contributions](https://nodejs.org/en/get-involved/contribute/#code-contributions) -* [Becoming a collaborator](https://nodejs.org/en/get-involved/contribute/#becoming-a-collaborator) -* [Community Committee](https://github.com/nodejs/community-committee) -* [Node.js Meetups](https://nodejs.org/en/get-involved/node-meetups/) -* [Start Contributing to Node.js](https://dev.to/azure/start-contributing-to-nodejs-in-the-new-year-3dlh) - -## Nouveauté de Node.js - -### Restez en contact - -Abonnez vous à[Liste de diffusion mensuelle Node.js](https://us14.campaign-archive.com/home/?u=c7c2e114a827812354112c23b\&id=f006b61f29) pour obtenir toutes les dernières mises à jour liées à Node.js. - -### Twitter - -Pour les mises à jour sociales, [follow @Nodejs on Twitter](https://twitter.com/nodejs). - -## Où trouver de l'aide - -### Dépôt d'aide Node.js - -Node.js dispose d'un [dépôt sur Github](https://github.com/nodejs/help) pour vous aider à résoudre vos problèmes. Si vous êtes confronté à un problème, n'hésitez pas à créer une question, ou à consulter les questions auxquelles il a déjà été répondu pour trouver de l'aide. - -### Chat en temps réel - -Pour une discussion en temps réel sur le développement de Node.js, utilisez l'outil [OpenJS Foundation Slack](https://slack-invite.openjsf.org/) ou IRC -Pour Slack, rejoignez l'espace de travail OpenJSF, puis le groupe de travail [#nodejs](https://openjs-foundation.slack.com/archives/CK9Q4MB53) ou [Node.js Slackers](https://www.nodeslackers.com/) -Pour l'IRC, allez sur irc.libera.chat dans le canal `#node.js` avec un [IRC client](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) ou connectez-vous dans votre navigateur web à la chaîne en utilisant [Libera Chat's WebChat](https://web.libera.chat/#node.js). - -### Stack Overflow - -De nombreux membres de la communauté préfèrent utiliser Stack Overflow pour poser leurs questions. Vous pouvez parcourir la section [existing questions](https://stackoverflow.com/questions/tagged/node.js) tavex le tag `node.js` ou [ask your own](https://stackoverflow.com/questions/ask?tags=node.js). - -### Communauté de dévelopement - -La Communauté dévelopement est une excellente plateforme pour poser des questions et partager vos connaissances de Node.js. Lisez les [questions et messages existants](https://dev.to/t/node) avec les mots-clés `node` ou [ask for help](https://dev.to/new/help). Vous pouvez également [rédiger votre article](https://dev.to/new/node) avec la balise `node`. - -## En savoir plus sur Node.js : - -* [Nodejs.dev](https://nodejs.dev/) -* [Node.js documentation](https://nodejs.org/en/docs/) -* [NodeSchool Workshoppers](https://nodeschool.io/#workshoppers) diff --git a/content/community/index.md b/content/community/index.md deleted file mode 100644 index e114239f1f..0000000000 --- a/content/community/index.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -title: node.js-community -displayTitle: Node.js Community -description: "Node.js has one of the largest, most vibrant and innovative open source communities in the world. Node.js is built, used, and maintained by the community. We believe the community to be at the core of Node.js popularity. Amazing people from every part of the world, with a common interest, collaborate and shape this community." -authors: ahmadawais, maedahbatool, saqibameen, msaaddev -category: community ---- - -## Introduction - -Node.js has one of the largest, most vibrant and innovative open source communities in the world. Node.js is built, used, and maintained by the community. We believe the community to be at the core of Node.js popularity. Amazing people from every part of the world, with a common interest, collaborate and shape this community. - -## Node.js Contributor Covenant Code of Conduct - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. - -[Read the full code of conduct →](https://github.com/nodejs/admin/blob/main/CODE_OF_CONDUCT.md) - -## Ways to Contribute - -We welcome all kinds of contributions — documentation, bugs reporting, core contribution. Irrespective of the extent of the contribution, we encourage you to be a part of Node.js. If you miss a feature, request it, or maybe help build it. - -* [Community Discussions](https://nodejs.org/en/get-involved/#community-discussion) -* [Learning Node.js](https://nodejs.org/en/get-involved/#learning) -* [Asking for General Help](https://nodejs.org/en/get-involved/contribute/#asking-for-general-help) -* [Reporting an Issue](https://nodejs.org/en/get-involved/contribute/#reporting-an-issue) -* [Code contributions](https://nodejs.org/en/get-involved/contribute/#code-contributions) -* [Becoming a collaborator](https://nodejs.org/en/get-involved/contribute/#becoming-a-collaborator) -* [Community Committee](https://github.com/nodejs/community-committee) -* [Node.js Meetups](https://nodejs.org/en/get-involved/node-meetups/) -* [Start Contributing to Node.js](https://dev.to/azure/start-contributing-to-nodejs-in-the-new-year-3dlh) - -## Node.js News - -### Stay in Touch - -Subscribe to the [Node.js monthly mailing list](https://us14.campaign-archive.com/home/?u=c7c2e114a827812354112c23b\&id=f006b61f29) to get all the latest updates related to the Node.js. - -### Twitter - -For social updates, [follow @Nodejs on Twitter](https://twitter.com/nodejs). - -## Where to Get Support - -### Node.js Help Repository - -Node.js has a dedicated [repository on GitHub](https://github.com/nodejs/help) to help you with your issues. If you are facing a problem, feel free to create an issue, or go through the already answered questions to seek help. - -### Real-time Chat - -For real-time chat about Node.js development use the [OpenJS Foundation Slack](https://slack-invite.openjsf.org/) or IRC -For Slack, join the OpenJSF workspace and then join the [#nodejs](https://openjs-foundation.slack.com/archives/CK9Q4MB53) channel or [Node.js Slackers](https://www.nodeslackers.com/) -For IRC, go to irc.libera.chat in the `#node.js` channel with an [IRC client](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) or connect in your web browser to the channel using [Libera Chat's WebChat](https://web.libera.chat/#node.js). - -### Stack Overflow - -Many community members prefer to use Stack Overflow to ask questions. You can browse the [existing questions](https://stackoverflow.com/questions/tagged/node.js) tagged `node.js` or [ask your own](https://stackoverflow.com/questions/ask?tags=node.js). - -### DEV Community - -DEV Community is an excellent platform to ask questions and share your knowledge of Node.js. Read through the [existing questions and posts](https://dev.to/t/node) tagged with `node` or [ask for help](https://dev.to/new/help). You could also [write your post](https://dev.to/new/node) with the `node` tag. - -## Learn More About Node.js: - -* [Nodejs.dev](https://nodejs.dev/) -* [Node.js documentation](https://nodejs.org/en/docs/) -* [NodeSchool Workshoppers](https://nodeschool.io/#workshoppers) diff --git a/content/download/package-manager.en.md b/content/download/package-manager.en.md index 7babcde958..550de6a40f 100644 --- a/content/download/package-manager.en.md +++ b/content/download/package-manager.en.md @@ -6,7 +6,21 @@ authors: fhemberger, XhmikosR, shadowspawn, vsemozhetbyt, nschonni, wildcard, Mr category: download --- -_**Note:**_ The packages on this page are maintained and supported by their respective packagers, **not** the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream. +***Note:*** The packages on this page are maintained and supported by their respective packagers, **not** the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream. + +## Alpine Linux + +Node.js LTS and npm packages are available in the Main Repository. + +```bash +apk add nodejs npm +``` + +Node.js Current can be installed from the Community Repository. + +```bash +apk add nodejs-current +``` ## Android @@ -51,18 +65,17 @@ dnf module install nodejs:12 For CentOS/RHEL 7 Node.js is available via [Software Collections](https://www.softwarecollections.org/en/scls/?search=NodeJS). -### Alternatives +##### Alternatives These resources provide packages compatible with CentOS, Fedora, and RHEL. - -* [Node.js snaps](#snap) maintained and supported at [https://github.com/nodejs/snap]() +* [Node.js snaps](#snap) maintained and supported at https://github.com/nodejs/snap * [Node.js binary distributions](#debian-and-ubuntu-based-linux-distributions) maintained and supported by [NodeSource](https://github.com/nodesource/distributions) ## Debian and Ubuntu based Linux distributions [Node.js binary distributions](https://github.com/nodesource/distributions/blob/master/README.md) are available from NodeSource. -### Alternatives +##### Alternatives Packages compatible with Debian and Ubuntu based Linux distributions are available via [Node.js snaps](#snap). @@ -71,8 +84,8 @@ Packages compatible with Debian and Ubuntu based Linux distributions are availab Fast and simple Node.js version manager built in Rust used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch Node versions automatically based on the current directory, etc. To install fnm, use this [install script](https://github.com/Schniz/fnm#using-a-script-macoslinux). -fnm has cross-platform support (macOS, Windows, Linux) & all popular shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt) -it's built with speed in mind and compatibility support for `.node-version` and `.nvmrc` files. +fnm has cross-platform support (macOS, Windows, Linux) & all popular shells (Bash, Zsh, Fish, PowerShell, Windows Command Line Prompt). +fnm is built with speed in mind and compatibility support for `.node-version` and `.nvmrc` files. ## FreeBSD @@ -120,7 +133,7 @@ _If you want to download the package with bash:_ curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/" ``` -### Alternatives +##### Alternatives Using **[Homebrew](https://brew.sh/)**: @@ -161,7 +174,7 @@ See the [homepage](https://github.com/tj/n) for install methods (boostrap, npm, If you already have `npm` then installing `n` and then the newest LTS `node` version is as simple as: -```bash +``` npm install -g n n lts ``` @@ -187,7 +200,6 @@ pkgin -y install nodejs Nodenv installation instructions are maintained [on its Github page](https://github.com/nodenv/nodenv#installation). Please visit that page to ensure you're following the latest version of the installation steps. ## nvm - Node Version Manager is a bash script used to manage multiple released Node.js versions. It allows you to perform operations like install, uninstall, switch version, etc. To install nvm, use this [install script](https://github.com/nvm-sh/nvm#install--update-script). @@ -217,7 +229,6 @@ nvm uninstall 8 ## nvs #### Windows - The `nvs` version manager is cross-platform and can be used on Windows, macOS, and Unix-like systems To install `nvs` on Windows go to the [release page](https://github.com/jasongin/nvs/releases) here and download the MSI installer file of the latest release. @@ -229,11 +240,9 @@ choco install nvs ``` #### macOS,UnixLike - You can find the documentation regarding the installation steps of `nvs` in macOS/Unix-like systems [here](https://github.com/jasongin/nvs/blob/master/doc/SETUP.md#mac-linux) #### Usage - After this you can use `nvs` to switch between different versions of node. To add the latest version of node: @@ -270,7 +279,7 @@ Node.js is available through the ports system. /usr/ports/lang/node ``` -Using [pkg\_add](https://man.openbsd.org/OpenBSD-current/man1/pkg_add.1) on OpenBSD: +Using [pkg_add](https://man.openbsd.org/OpenBSD-current/man1/pkg_add.1) on OpenBSD: ```bash pkg_add node @@ -333,7 +342,18 @@ xbps-install -Sy nodejs Download the [Windows Installer](https://nodejs.org/en/#home-downloadhead) directly from the [nodejs.org](https://nodejs.org/) web site. -### Alternatives +##### Alternatives + +Using **[Winget](https://aka.ms/winget-cli)**: + +```bash +winget install OpenJS.NodeJS +# or for LTS +winget install OpenJS.NodeJS.LTS +``` + +After running one of the two commands above, it may be necessary to restart the +terminal emulator before the `node` CLI command becomes available. Using **[Chocolatey](https://chocolatey.org/)**: @@ -347,12 +367,13 @@ Using **[Scoop](https://scoop.sh/)**: ```bash scoop install nodejs +# or for LTS +scoop install nodejs-lts ``` ## z/OS -IBM® SDK for Node.js - z/OS® is available in two installation formats, +IBM® SDK for Node.js - z/OS® is available in two installation formats, SMP/E and PAX. Select the installation format that applies to you: - -* [Installing and configuring SMP/E edition of Node.js on z/OS](https://www.ibm.com/support/knowledgecenter/SSTRRS_14.0.0/com.ibm.nodejs.zos.v14.doc/smpe.htm) -* [Installing and configuring PAX edition of Node.js on z/OS](https://www.ibm.com/support/knowledgecenter/SSTRRS_14.0.0/com.ibm.nodejs.zos.v14.doc/paxz.htm) +* [Installing and configuring SMP/E edition of Node.js on z/OS](https://www.ibm.com/docs/en/sdk-nodejs-zos/14.0?topic=configuring-installing-smpe-edition) +* [Installing and configuring PAX edition of Node.js on z/OS](https://www.ibm.com/docs/en/sdk-nodejs-zos/14.0?topic=configuring-installing-pax-edition) diff --git a/content/download/releases.en.md b/content/download/releases.en.md new file mode 100644 index 0000000000..35b91dca96 --- /dev/null +++ b/content/download/releases.en.md @@ -0,0 +1,15 @@ +--- +title: previous-releases +displayTitle: 'Previous Releases' +description: "Previous Releases | Node.js" +--- + +### io.js & Node.js + +Releases 1.x through 3.x were called "io.js" as they were part of the io.js fork. As of Node.js 4.0.0 the former release lines of io.js converged with Node.js 0.12.x into unified Node.js releases. + +### Looking for latest release of a version branch? + + + NODE_MODULE_VERSION refers to the ABI (application binary interface) version number of Node.js, used to determine which versions of Node.js compiled C++ add-on binaries can be loaded in to without needing to be re-compiled. It used to be stored as hex value in earlier versions, but is now represented as an integer. + diff --git a/content/get-involved/code-and-learn.en.md b/content/get-involved/code-and-learn.en.md new file mode 100644 index 0000000000..6b0cb69cea --- /dev/null +++ b/content/get-involved/code-and-learn.en.md @@ -0,0 +1,24 @@ +--- +title: code-learn +displayTitle: 'Code + Learn' +description: "Code + Learn | Node.js" +category: get-involved +--- + +Code & Learn events allow you to get started (or go further) with Node.js core contributions. Experienced contributors help guide you through your first (or second or third or fourth) commit to Node.js core. They also are available to provide impromptu guided tours through specific areas of Node.js core source code. + +* [Moscow, Russia on November 6, 2019](https://medium.com/piterjs/announcement-node-js-code-learn-in-moscow-fd997241c77) +* Shanghai, China at [COSCon](https://bagevent.com/event/5744455): November 3, 2019 +* Medellin, Colombia in June 21st & 22nd [NodeConfCo](https://colombia.nodeconf.com/) +* [Saint-Petersburg, Russia on May 26](https://medium.com/piterjs/code-learn-ce20d330530f) +* Bangalore, India at [Node.js - Code & Learn Meetup](https://www.meetup.com/Polyglot-Languages-Runtimes-Java-JVM-nodejs-Swift/events/256057028/): November 17, 2018 +* Kilkenny, Ireland at [NodeConfEU](https://www.nodeconf.eu/): November 4, 2018 +* Vancouver, BC at [Node Interactive](https://events.linuxfoundation.org/events/node-js-interactive-2018/): October 12, 2018 +* [Oakland on April 22, 2017](https://medium.com/the-node-js-collection/code-learn-learn-how-to-contribute-to-node-js-core-8a2dbdf9be45) +* Shanghai at JSConf.CN: July 2017 +* Vancouver, BC at [Node Interactive](http://events.linuxfoundation.org/events/node-interactive): October 6, 2017 +* Kilkenny, Ireland at [NodeConfEU](http://www.nodeconf.eu/): November 5, 2017 +* Austin in December 2016 +* Tokyo in November 2016 +* Amsterdam in September 2016 +* Dublin and London in September 2015 diff --git a/content/get-involved/collab-summit.en.md b/content/get-involved/collab-summit.en.md new file mode 100644 index 0000000000..a84b84ce89 --- /dev/null +++ b/content/get-involved/collab-summit.en.md @@ -0,0 +1,30 @@ +--- +title: 'collab-summit' +displayTitle: 'Collaborator Summit' +description: "Collaborator Summit | Node.js" +category: get-involved +--- + +Collaboration Summit is an un-conference for bringing current and +potential contributors together to discuss Node.js with lively collaboration, +education, and knowledge sharing. Committees and working groups come together +twice per year to make important decisions while also being able to work on some +exciting efforts they want to push forward in-person. + +## Who attends? + +Anyone is welcome to attend Collab Summit. During the +summit, leaders will help onboard new contributors to groups they'd love to help +prior to integrating them into the working sessions. + +This is your opportunity to learn what is happening within the community to jump +in and contribute with the skills you have and would like to hone. + +Working groups will put together a schedule so that people can +familiarize themselves before folks get onsite, having the general collaborator +discussions, and then dive into breakout sessions. + +We'd love to see you at Collab Summit! Check out the [Summit repo](https://github.com/nodejs/summit) +for upcoming and past Collab Summits and have a look at the +[issues filed](https://github.com/nodejs/summit/issues) that share what +individual working groups and committees are looking to discuss in-person. diff --git a/content/get-involved/contribute.en.md b/content/get-involved/contribute.en.md new file mode 100644 index 0000000000..fb1f23c3fd --- /dev/null +++ b/content/get-involved/contribute.en.md @@ -0,0 +1,47 @@ +--- +title: contributing +displayTitle: 'Contributing' +description: "Contributing | Node.js" +category: get-involved +--- + +Thank you for your interest in contributing to Node.js! There are multiple ways and places you can contribute, and we're here to help facilitate that. + +## Asking for General Help + +Because the level of activity in the `nodejs/node` repository is so high, questions or requests for general help using Node.js should be directed at the [Node.js help repository](https://github.com/nodejs/help/issues). + +## Reporting an Issue + +If you have found what you believe to be an issue with Node.js please do not hesitate to file an issue on the GitHub project. When filing your issue please make sure you can express the issue with a reproducible test case, and that test case should not include any external dependencies. That is to say, the test case can be executed without anything more than Node.js itself. + +When reporting an issue we also need as much information about your environment that you can include. We never know what information will be pertinent when trying narrow down the issue. Please include at least the following information: + +* Version of Node.js +* Platform you're running on (macOS, SmartOS, Linux, Windows) +* Architecture you're running on (32bit or 64bit and x86 or ARM) + +The Node.js project is currently managed across a number of separate GitHub repositories, each with their own separate issues database. If possible, please direct any issues you are reporting to the appropriate repository but don't worry if things happen to get put in the wrong place, the community of contributors will be more than happy to help get you pointed in the right direction. + +* To report issues specific to Node.js, please use [nodejs/node](https://github.com/nodejs/node) +* To report issues specific to this website, please use [nodejs/nodejs.org](https://github.com/nodejs/nodejs.org/issues) + +## Code contributions + +If you'd like to fix bugs or add a new feature to Node.js, please make sure you consult the [Node.js Contribution Guidelines](https://github.com/nodejs/node/blob/main/CONTRIBUTING.md#pull-requests). The review process by existing collaborators for all contributions to the project is explained there as well. + +If you are wondering how to start, you can check [Node Todo](https://www.nodetodo.org/) which may guide you towards your first contribution. + +## Becoming a collaborator + +By becoming a collaborator, contributors can have even more impact on the project. They can help other contributors by reviewing their contributions, triage issues and take an even bigger part in shaping the project's future. Individuals identified by the TSC as making significant and valuable contributions across any Node.js repository may be made Collaborators and given commit access to the project. Activities taken into consideration include (but are not limited to) the quality of: + +* code commits and pull requests +* documentation commits and pull requests +* comments on issues and pull requests +* contributions to the Node.js website +* assistance provided to end users and novice contributors +* participation in Working Groups +* other participation in the wider Node.js community + +If individuals making valuable contributions do not believe they have been considered for commit access, they may [log an issue](https://github.com/nodejs/TSC/issues) or [contact a TSC member](https://github.com/nodejs/node#tsc-technical-steering-committee) directly. diff --git a/content/get-involved/index.en.md b/content/get-involved/index.en.md new file mode 100644 index 0000000000..88fffbafce --- /dev/null +++ b/content/get-involved/index.en.md @@ -0,0 +1,36 @@ +--- +title: get-involved +displayTitle: 'Get Involved' +description: "Get Involved | Node.js" +category: get-involved +--- + +## Community Discussion + +* The [GitHub issues list](https://github.com/nodejs/node/issues) is the place for discussion of Node.js core features. +* For real-time chat about Node.js development use one of the platforms below + * For IRC, go to `irc.libera.chat` in the `#node.js` channel with an [IRC client](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) or connect in your web browser to the channel using [a web client](https://kiwiirc.com/nextclient/) + * For Slack, there are two options: + * [Node Slackers](https://www.nodeslackers.com/) is a Node.js-focused Slack community. Some Working Groups have discussion channels there. + * The [OpenJSF Slack](https://slack-invite.openjsf.org/) is a Foundation run Slack with several Node.js channels (channels prefixed by `#nodejs-` are related to the project). Some Working Groups have discussion channels there. +* The official Node.js Twitter account is [nodejs](https://twitter.com/nodejs). +* The [Node.js Foundation calendar](https://nodejs.org/calendar) with all public team meetings. +* [Node.js Collection](https://medium.com/the-node-js-collection) is a collection of community-curated content on Medium. + +## Learning + +* [Official API reference documentation](https://nodejs.org/api/) details the Node.js API. +* [NodeSchool.io](https://nodeschool.io/) will teach you Node.js concepts via interactive command-line games. +* [Stack Overflow Node.js tag](https://stackoverflow.com/questions/tagged/node.js) collects new information every day. +* [The DEV Community Node.js tag](https://dev.to/t/node) is a place to share Node.js projects, articles and tutorials as well as start discussions and ask for feedback on Node.js-related topics. Developers of all skill-levels are welcome to take part. +* [Nodeiflux](https://discordapp.com/invite/vUsrbjd) is a friendly community of Node.js backend developers supporting each other on Discord. + +## International community sites and projects + +* [Chinese community](https://cnodejs.org/) +* [Hungarian (Magyar) community](https://nodehun.blogspot.com/) +* [Israeli Facebook group for Node.js](https://www.facebook.com/groups/node.il/) +* [Japanese user group](https://nodejs.jp/) +* [Spanish language Facebook group for Node.js](https://www.facebook.com/groups/node.es/) +* [Vietnamese Node.js community](https://www.facebook.com/nodejs.vn/) +* [Uzbekistan group for Node.js](https://t.me/nodejs_uz) diff --git a/content/learn/blocking-vs-non-blocking.en.md b/content/learn/blocking-vs-non-blocking.en.md new file mode 100644 index 0000000000..c93010e1ed --- /dev/null +++ b/content/learn/blocking-vs-non-blocking.en.md @@ -0,0 +1,146 @@ +--- +title: 'Overview of Blocking vs Non-Blocking' +category: learn +--- + +This overview covers the difference between **blocking** and **non-blocking** +calls in Node.js. This overview will refer to the event loop and libuv but no +prior knowledge of those topics is required. Readers are assumed to have a +basic understanding of the JavaScript language and Node.js [callback pattern](/en/knowledge/getting-started/control-flow/what-are-callbacks/). + +> "I/O" refers primarily to interaction with the system's disk and +> network supported by [libuv](https://libuv.org/). + +## Blocking + +**Blocking** is when the execution of additional JavaScript in the Node.js +process must wait until a non-JavaScript operation completes. This happens +because the event loop is unable to continue running JavaScript while a +**blocking** operation is occurring. + +In Node.js, JavaScript that exhibits poor performance due to being CPU intensive +rather than waiting on a non-JavaScript operation, such as I/O, isn't typically +referred to as **blocking**. Synchronous methods in the Node.js standard library +that use libuv are the most commonly used **blocking** operations. Native +modules may also have **blocking** methods. + +All of the I/O methods in the Node.js standard library provide asynchronous +versions, which are **non-blocking**, and accept callback functions. Some +methods also have **blocking** counterparts, which have names that end with +`Sync`. + +## Comparing Code + +**Blocking** methods execute **synchronously** and **non-blocking** methods +execute **asynchronously**. + +Using the File System module as an example, this is a **synchronous** file read: + +```js +const fs = require('fs'); + +const data = fs.readFileSync('/file.md'); // blocks here until file is read +``` + +And here is an equivalent **asynchronous** example: + +```js +const fs = require('fs'); + +fs.readFile('/file.md', (err, data) => { + if (err) throw err; +}); +``` + +The first example appears simpler than the second but has the disadvantage of +the second line **blocking** the execution of any additional JavaScript until +the entire file is read. Note that in the synchronous version if an error is +thrown it will need to be caught or the process will crash. In the asynchronous +version, it is up to the author to decide whether an error should throw as +shown. + +Let's expand our example a little bit: + +```js +const fs = require('fs'); + +const data = fs.readFileSync('/file.md'); // blocks here until file is read +console.log(data); +moreWork(); // will run after console.log +``` + +And here is a similar, but not equivalent asynchronous example: + +```js +const fs = require('fs'); + +fs.readFile('/file.md', (err, data) => { + if (err) throw err; + console.log(data); +}); +moreWork(); // will run before console.log +``` + +In the first example above, `console.log` will be called before `moreWork()`. In +the second example `fs.readFile()` is **non-blocking** so JavaScript execution +can continue and `moreWork()` will be called first. The ability to run +`moreWork()` without waiting for the file read to complete is a key design +choice that allows for higher throughput. + +## Concurrency and Throughput + +JavaScript execution in Node.js is single threaded, so concurrency refers to the +event loop's capacity to execute JavaScript callback functions after completing +other work. Any code that is expected to run in a concurrent manner must allow +the event loop to continue running as non-JavaScript operations, like I/O, are +occurring. + +As an example, let's consider a case where each request to a web server takes +50ms to complete and 45ms of that 50ms is database I/O that can be done +asynchronously. Choosing **non-blocking** asynchronous operations frees up that +45ms per request to handle other requests. This is a significant difference in +capacity just by choosing to use **non-blocking** methods instead of +**blocking** methods. + +The event loop is different than models in many other languages where additional +threads may be created to handle concurrent work. + +## Dangers of Mixing Blocking and Non-Blocking Code + +There are some patterns that should be avoided when dealing with I/O. Let's look +at an example: + +```js +const fs = require('fs'); + +fs.readFile('/file.md', (err, data) => { + if (err) throw err; + console.log(data); +}); +fs.unlinkSync('/file.md'); +``` + +In the above example, `fs.unlinkSync()` is likely to be run before +`fs.readFile()`, which would delete `file.md` before it is actually read. A +better way to write this, which is completely **non-blocking** and guaranteed to +execute in the correct order is: + +```js +const fs = require('fs'); + +fs.readFile('/file.md', (readFileErr, data) => { + if (readFileErr) throw readFileErr; + console.log(data); + fs.unlink('/file.md', (unlinkErr) => { + if (unlinkErr) throw unlinkErr; + }); +}); +``` + +The above places a **non-blocking** call to `fs.unlink()` within the callback of +`fs.readFile()` which guarantees the correct order of operations. + +## Additional Resources + +* [libuv](https://libuv.org/) +* [About Node.js](/en/about/) diff --git a/content/learn/how-to-use-npm-package/index.en.md b/content/learn/how-to-use-npm-package/index.en.md index 2a4b7758a4..dbc6dae88f 100644 --- a/content/learn/how-to-use-npm-package/index.en.md +++ b/content/learn/how-to-use-npm-package/index.en.md @@ -2,7 +2,6 @@ title: How to use or execute a package installed using npm description: 'How to include and use in your code a package installed in your node_modules folder' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/javascript-async-await.en.md b/content/learn/javascript-async-await.en.md index 51ccee1e90..aeaa1475d5 100644 --- a/content/learn/javascript-async-await.en.md +++ b/content/learn/javascript-async-await.en.md @@ -2,7 +2,6 @@ title: 'Modern Asynchronous JavaScript with Async and Await' description: 'Discover the modern approach to asynchronous functions in JavaScript. JavaScript evolved in a very short time from callbacks to Promises, and since ES2017 asynchronous JavaScript is even simpler with the async/await syntax' authors: flaviocopes, potch, MylesBorins, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/javascript-callbacks.en.md b/content/learn/javascript-callbacks.en.md index aadd2fca9a..f92e93cdaa 100644 --- a/content/learn/javascript-callbacks.en.md +++ b/content/learn/javascript-callbacks.en.md @@ -2,7 +2,6 @@ title: 'JavaScript Asynchronous Programming and Callbacks' description: 'JavaScript is synchronous by default, and is single threaded. This means that code cannot create new threads and run in parallel. Find out what asynchronous code means and how it looks like' authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/javascript-promises.en.md b/content/learn/javascript-promises.en.md index a0c1a23f8d..137397097a 100644 --- a/content/learn/javascript-promises.en.md +++ b/content/learn/javascript-promises.en.md @@ -2,7 +2,6 @@ title: Understanding JavaScript Promises description: 'Promises are one way to deal with asynchronous code in JavaScript, without writing too many callbacks in your code.' authors: flaviocopes, potch, MylesBorins, LaRuaNa, bdharrington7, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/javascript-timers/index.en.md b/content/learn/javascript-timers/index.en.md index 604f95e91a..55d70066b7 100644 --- a/content/learn/javascript-timers/index.en.md +++ b/content/learn/javascript-timers/index.en.md @@ -2,7 +2,6 @@ title: Discover JavaScript Timers description: 'When writing JavaScript code, you might want to delay the execution of a function. Learn how to use setTimeout and setInterval to schedule functions in the future' authors: flaviocopes, MylesBorins, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-buffers.en.md b/content/learn/node-buffers.en.md index 121e72ece9..c16783d975 100644 --- a/content/learn/node-buffers.en.md +++ b/content/learn/node-buffers.en.md @@ -2,7 +2,6 @@ title: Node.js Buffers description: 'Learn what Node.js buffers are, what they are used for, how to use them' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, 19shubham11, addaleax -section: Getting Started category: learn --- diff --git a/content/learn/node-cli-args.en.md b/content/learn/node-cli-args.en.md index ff2eb2a3ae..cee905de37 100644 --- a/content/learn/node-cli-args.en.md +++ b/content/learn/node-cli-args.en.md @@ -2,7 +2,6 @@ title: Node.js, accept arguments from the command line description: 'How to accept arguments in a Node.js program passed from the command line' authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-control-flow.en.md b/content/learn/node-control-flow.en.md index 87899bea68..93190b0055 100644 --- a/content/learn/node-control-flow.en.md +++ b/content/learn/node-control-flow.en.md @@ -2,7 +2,6 @@ title: Asynchronous flow control description: 'JavaScript control flow is all about callback handling. Here are strategies to help your development.' authors: aug2uag -section: Getting Started category: learn --- diff --git a/content/learn/node-difference-dev-prod.en.md b/content/learn/node-difference-dev-prod.en.md index 4ab0db3eab..e43a8997c0 100644 --- a/content/learn/node-difference-dev-prod.en.md +++ b/content/learn/node-difference-dev-prod.en.md @@ -2,7 +2,6 @@ title: Node.js, the difference between development and production description: 'Learn how to set up different configurations for production and development environments' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, RenanTKN -section: Getting Started category: learn --- diff --git a/content/learn/node-environment-variables.en.md b/content/learn/node-environment-variables.en.md index 905d028582..858ee4a85a 100644 --- a/content/learn/node-environment-variables.en.md +++ b/content/learn/node-environment-variables.en.md @@ -2,7 +2,6 @@ title: How to read environment variables from Node.js description: 'Learn how to read and make use of environment variables in a Node.js program' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, manishprivet -section: Getting Started category: learn --- diff --git a/content/learn/node-es6.en.md b/content/learn/node-es6.en.md new file mode 100644 index 0000000000..bb9a8a9ceb --- /dev/null +++ b/content/learn/node-es6.en.md @@ -0,0 +1,38 @@ +--- +title: ECMAScript 2015 (ES6) and beyond +category: learn +--- + +Node.js is built against modern versions of [V8](https://v8.dev/). By keeping up-to-date with the latest releases of this engine, we ensure new features from the [JavaScript ECMA-262 specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm) are brought to Node.js developers in a timely manner, as well as continued performance and stability improvements. + +All ECMAScript 2015 (ES6) features are split into three groups for **shipping**, **staged**, and **in progress** features: + +* All **shipping** features, which V8 considers stable, are turned **on by default on Node.js** and do **NOT** require any kind of runtime flag. +* **Staged** features, which are almost-completed features that are not considered stable by the V8 team, require a runtime flag: `--harmony`. +* **In progress** features can be activated individually by their respective harmony flag, although this is highly discouraged unless for testing purposes. Note: these flags are exposed by V8 and will potentially change without any deprecation notice. + +## Which features ship with which Node.js version by default? + +The website [node.green](https://node.green/) provides an excellent overview over supported ECMAScript features in various versions of Node.js, based on kangax's compat-table. + +## Which features are in progress? + +New features are constantly being added to the V8 engine. Generally speaking, expect them to land on a future Node.js release, although timing is unknown. + +You may list all the *in progress* features available on each Node.js release by grepping through the `--v8-options` argument. Please note that these are incomplete and possibly broken features of V8, so use them at your own risk: + +```bash +node --v8-options | grep "in progress" +``` + +## I have my infrastructure set up to leverage the --harmony flag. Should I remove it? + +The current behavior of the `--harmony` flag on Node.js is to enable **staged** features only. After all, it is now a synonym of `--es_staging`. As mentioned above, these are completed features that have not been considered stable yet. If you want to play safe, especially on production environments, consider removing this runtime flag until it ships by default on V8 and, consequently, on Node.js. If you keep this enabled, you should be prepared for further Node.js upgrades to break your code if V8 changes their semantics to more closely follow the standard. + +## How do I find which version of V8 ships with a particular version of Node.js? + +Node.js provides a simple way to list all dependencies and respective versions that ship with a specific binary through the `process` global object. In case of the V8 engine, type the following in your terminal to retrieve its version: + +```bash +node -p process.versions.v8 +``` diff --git a/content/learn/node-event-emitter.en.md b/content/learn/node-event-emitter.en.md index 687fb126cb..39e831bd2e 100644 --- a/content/learn/node-event-emitter.en.md +++ b/content/learn/node-event-emitter.en.md @@ -2,7 +2,6 @@ title: The Node.js Event emitter description: 'How to work with custom events in Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-event-loop/index.en.md b/content/learn/node-event-loop/index.en.md index 5c66c5ab3a..ec0a11e593 100644 --- a/content/learn/node-event-loop/index.en.md +++ b/content/learn/node-event-loop/index.en.md @@ -2,7 +2,6 @@ title: 'The Node.js Event Loop' description: 'The Event Loop is one of the most important aspects to understand about Node.js' authors: flaviocopes, potch, ZYSzys, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-exceptions.en.md b/content/learn/node-exceptions.en.md index 37f021604b..384e2d2b60 100644 --- a/content/learn/node-exceptions.en.md +++ b/content/learn/node-exceptions.en.md @@ -2,7 +2,6 @@ title: Error handling in Node.js description: 'How to handle errors during the execution of a Node.js application' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-export-module.en.md b/content/learn/node-export-module.en.md index 013c1ad1ae..010f0edaa1 100644 --- a/content/learn/node-export-module.en.md +++ b/content/learn/node-export-module.en.md @@ -2,7 +2,6 @@ title: Expose functionality from a Node.js file using exports description: 'How to use the module.exports API to expose data to other files in your application, or to other applications as well' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-file-descriptors.en.md b/content/learn/node-file-descriptors.en.md index 589fb98913..87839f42ce 100644 --- a/content/learn/node-file-descriptors.en.md +++ b/content/learn/node-file-descriptors.en.md @@ -2,7 +2,6 @@ title: 'Working with file descriptors in Node.js' description: 'How to interact with file descriptors using Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-file-paths.en.md b/content/learn/node-file-paths.en.md index bfa2639b05..491eec5c62 100644 --- a/content/learn/node-file-paths.en.md +++ b/content/learn/node-file-paths.en.md @@ -2,7 +2,6 @@ title: 'Node.js File Paths' description: 'How to interact with file paths and manipulate them in Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-file-stats.en.md b/content/learn/node-file-stats.en.md index 2f4d52605f..cc5045deaf 100644 --- a/content/learn/node-file-stats.en.md +++ b/content/learn/node-file-stats.en.md @@ -2,7 +2,6 @@ title: 'Node.js file stats' description: 'How to get the details of a file using Node.js' authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-folders.en.md b/content/learn/node-folders.en.md index 4acd7a034d..9607d8199e 100644 --- a/content/learn/node-folders.en.md +++ b/content/learn/node-folders.en.md @@ -2,7 +2,6 @@ title: 'Working with folders in Node.js' description: 'How to interact with folders using Node.js' authors: flaviocopes, MylesBorins, fhemberger, liangpeili, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-http-server.en.md b/content/learn/node-http-server.en.md index 113bdb2669..6fc8eabe26 100644 --- a/content/learn/node-http-server.en.md +++ b/content/learn/node-http-server.en.md @@ -2,7 +2,6 @@ title: 'Build an HTTP Server' description: 'How to build an HTTP server with Node.js' authors: flaviocopes, potch, MylesBorins, LaRuaNa, ahmadawais, dogafincan -section: Getting Started category: learn --- diff --git a/content/learn/node-input-from-cli.en.md b/content/learn/node-input-from-cli.en.md index 70a0fc6320..65a9c9bc35 100644 --- a/content/learn/node-input-from-cli.en.md +++ b/content/learn/node-input-from-cli.en.md @@ -2,7 +2,6 @@ title: Accept input from the command line in Node.js description: 'How to make a Node.js CLI program interactive using the built-in readline Node.js module' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-inspect-object/index.en.md b/content/learn/node-inspect-object/index.en.md index 688f5ebd33..7471c6f092 100644 --- a/content/learn/node-inspect-object/index.en.md +++ b/content/learn/node-inspect-object/index.en.md @@ -2,7 +2,6 @@ title: How to log an object in Node.js description: 'Logging objects in Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-make-http-requests.en.md b/content/learn/node-make-http-requests.en.md index 35b8acb4e2..93893a93d5 100644 --- a/content/learn/node-make-http-requests.en.md +++ b/content/learn/node-make-http-requests.en.md @@ -2,7 +2,6 @@ title: 'Making HTTP requests with Node.js' description: 'How to perform HTTP requests with Node.js using GET, POST, PUT and DELETE' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-module-events.en.md b/content/learn/node-module-events.en.md index 6b58296147..08ed72edba 100644 --- a/content/learn/node-module-events.en.md +++ b/content/learn/node-module-events.en.md @@ -2,7 +2,6 @@ title: 'The Node.js events module' description: 'The events module of Node.js provides the EventEmitter class' authors: flaviocopes, ZYSzys, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-module-fs.en.md b/content/learn/node-module-fs.en.md index ecd943aecc..89fd77ea3f 100644 --- a/content/learn/node-module-fs.en.md +++ b/content/learn/node-module-fs.en.md @@ -2,7 +2,6 @@ title: 'The Node.js fs module' description: 'The fs module of Node.js provides useful functions to interact with the file system' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-module-http.en.md b/content/learn/node-module-http.en.md index 614777ad38..e1c3be5727 100644 --- a/content/learn/node-module-http.en.md +++ b/content/learn/node-module-http.en.md @@ -2,7 +2,6 @@ title: 'The Node.js http module' description: 'The http module of Node.js provides useful functions and classes to build an HTTP server' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, BeniCheni, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-module-os.en.md b/content/learn/node-module-os.en.md index 41f15d3c63..741b38feb0 100644 --- a/content/learn/node-module-os.en.md +++ b/content/learn/node-module-os.en.md @@ -2,7 +2,6 @@ title: 'The Node.js os module' description: 'The os module of Node.js provides useful functions to interact with underlying system' authors: flaviocopes, potch, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-module-path.en.md b/content/learn/node-module-path.en.md index ae912a2da5..113ce3f2f0 100644 --- a/content/learn/node-module-path.en.md +++ b/content/learn/node-module-path.en.md @@ -2,7 +2,6 @@ title: 'The Node.js path module' description: 'The path module of Node.js provides useful functions to interact with file paths' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais, 19shubham11 -section: Getting Started category: learn --- diff --git a/content/learn/node-output-to-cli.en.md b/content/learn/node-output-to-cli.en.md index dd84e70e32..87c076d82c 100644 --- a/content/learn/node-output-to-cli.en.md +++ b/content/learn/node-output-to-cli.en.md @@ -2,7 +2,6 @@ title: Output to the command line using Node.js description: 'How to print to the command line console using Node.js, from the basic console.log to more complex scenarios' authors: flaviocopes, potch, MylesBorins, fhemberger, LaRuaNa, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-process-nexttick.en.md b/content/learn/node-process-nexttick.en.md index fe68fa89c2..0346c89369 100644 --- a/content/learn/node-process-nexttick.en.md +++ b/content/learn/node-process-nexttick.en.md @@ -2,7 +2,6 @@ title: 'Understanding process.nextTick()' description: 'The Node.js process.nextTick function interacts with the event loop in a special way' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-reading-files.en.md b/content/learn/node-reading-files.en.md index 318bfa4220..f05ac3998f 100644 --- a/content/learn/node-reading-files.en.md +++ b/content/learn/node-reading-files.en.md @@ -2,7 +2,6 @@ title: 'Reading files with Node.js' description: 'How to read files using Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-repl/index.en.md b/content/learn/node-repl/index.en.md index f27e0be897..4f179cb9a6 100644 --- a/content/learn/node-repl/index.en.md +++ b/content/learn/node-repl/index.en.md @@ -2,7 +2,6 @@ title: How to use the Node.js REPL description: "REPL stands for Read-Evaluate-Print-Loop, and it's a great way to explore the Node.js features in a quick way" authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-request-data.en.md b/content/learn/node-request-data.en.md index 72503fcd81..fa85b5334f 100644 --- a/content/learn/node-request-data.en.md +++ b/content/learn/node-request-data.en.md @@ -2,7 +2,6 @@ title: Get HTTP request body data using Node.js description: 'Find out how to extract the data sent as JSON through an HTTP request body using Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, rodion-arr -section: Getting Started category: learn --- diff --git a/content/learn/node-run-cli.en.md b/content/learn/node-run-cli.en.md index beb1d0fdf3..b52b2f9c07 100644 --- a/content/learn/node-run-cli.en.md +++ b/content/learn/node-run-cli.en.md @@ -2,7 +2,6 @@ title: Run Node.js scripts from the command line description: 'How to run any Node.js script from the CLI' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, akazyti -section: Getting Started category: learn --- diff --git a/content/learn/node-setimmediate.en.md b/content/learn/node-setimmediate.en.md index 99ecb4ded5..126fb63b5d 100644 --- a/content/learn/node-setimmediate.en.md +++ b/content/learn/node-setimmediate.en.md @@ -2,7 +2,6 @@ title: 'Understanding setImmediate()' description: 'The Node.js setImmediate function interacts with the event loop in a special way' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/node-terminate-program.en.md b/content/learn/node-terminate-program.en.md index 84a08aa91f..a82421d26b 100644 --- a/content/learn/node-terminate-program.en.md +++ b/content/learn/node-terminate-program.en.md @@ -2,7 +2,6 @@ title: How to exit from a Node.js program description: 'Learn how to terminate a Node.js app in the best possible way' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, jgb-solutions, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/node-with-typescript.en.md b/content/learn/node-with-typescript.en.md index c423735be2..5b585e2dd5 100644 --- a/content/learn/node-with-typescript.en.md +++ b/content/learn/node-with-typescript.en.md @@ -2,7 +2,6 @@ title: 'Node.js with TypeScript' description: 'Find out why TypeScript is an awesome tool and learn to use it by yourself.' authors: sbielenica -section: Getting Started category: learn --- diff --git a/content/learn/node-with-web-assembly.en.md b/content/learn/node-with-web-assembly.en.md index a818e09606..568c007611 100644 --- a/content/learn/node-with-web-assembly.en.md +++ b/content/learn/node-with-web-assembly.en.md @@ -2,7 +2,6 @@ title: 'Node.js with WebAssembly' description: 'Find out why WebAssembly is an awesome tool and learn to use it by yourself.' authors: lancemccluskey -section: Getting Started category: learn --- diff --git a/content/learn/node-writing-files.en.md b/content/learn/node-writing-files.en.md index 6a6128ca6e..fc96d089a6 100644 --- a/content/learn/node-writing-files.en.md +++ b/content/learn/node-writing-files.en.md @@ -2,7 +2,6 @@ title: 'Writing files with Node.js' description: 'How to write files using Node.js' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, clean99 -section: Getting Started category: learn --- diff --git a/content/learn/nodejs-streams.en.md b/content/learn/nodejs-streams.en.md index 0b9d25cdcb..5e931aa2e1 100644 --- a/content/learn/nodejs-streams.en.md +++ b/content/learn/nodejs-streams.en.md @@ -2,7 +2,6 @@ title: Node.js Streams description: 'Learn what streams are for, why are they so important, and how to use them.' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, amiller-gh, r0mflip, ahmadawais, 19shubham11 -section: Getting Started category: learn --- diff --git a/content/learn/npm-dependencies-devdependencies.en.md b/content/learn/npm-dependencies-devdependencies.en.md index f60556d2a4..c080096b0f 100644 --- a/content/learn/npm-dependencies-devdependencies.en.md +++ b/content/learn/npm-dependencies-devdependencies.en.md @@ -2,7 +2,6 @@ title: npm dependencies and devDependencies description: 'When is a package a dependency, and when is it a dev dependency?' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npm-install-previous-package-version.en.md b/content/learn/npm-install-previous-package-version.en.md index 99264532d2..1e86cefae0 100644 --- a/content/learn/npm-install-previous-package-version.en.md +++ b/content/learn/npm-install-previous-package-version.en.md @@ -2,7 +2,6 @@ title: Install an older version of an npm package description: 'Learn how to install an older version of an npm package, something that might be useful to solve a compatibility problem' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npm-know-version-installed.en.md b/content/learn/npm-know-version-installed.en.md index ee33b8e1d9..4faafbe0be 100644 --- a/content/learn/npm-know-version-installed.en.md +++ b/content/learn/npm-know-version-installed.en.md @@ -2,7 +2,6 @@ title: Find the installed version of an npm package description: 'How to find out which version of a particular package you have installed in your app' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npm-packages-local-global.en.md b/content/learn/npm-packages-local-global.en.md index f543e801e5..43a1cd97ac 100644 --- a/content/learn/npm-packages-local-global.en.md +++ b/content/learn/npm-packages-local-global.en.md @@ -2,7 +2,6 @@ title: npm global or local packages description: 'When is a package best installed globally? Why?' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npm-semantic-versioning.en.md b/content/learn/npm-semantic-versioning.en.md index 5d85f19547..117edc7dcb 100644 --- a/content/learn/npm-semantic-versioning.en.md +++ b/content/learn/npm-semantic-versioning.en.md @@ -2,7 +2,6 @@ title: Semantic Versioning using npm description: 'Semantic Versioning is a convention used to provide a meaning to versions' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npm-uninstall-packages.en.md b/content/learn/npm-uninstall-packages.en.md index 0babfa6169..fddd0d0661 100644 --- a/content/learn/npm-uninstall-packages.en.md +++ b/content/learn/npm-uninstall-packages.en.md @@ -2,7 +2,6 @@ title: Uninstalling npm packages description: 'How to uninstall an npm Node.js package, locally or globally' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, shajanjp -section: Getting Started category: learn --- diff --git a/content/learn/npm.en.md b/content/learn/npm.en.md index 4eedb56c9f..052cac756c 100644 --- a/content/learn/npm.en.md +++ b/content/learn/npm.en.md @@ -2,7 +2,6 @@ title: An introduction to the npm package manager description: 'A quick guide to npm, the powerful package manager key to the success of Node.js. In January 2017 over 350000 packages were reported being listed in the npm registry, making it the biggest single language code repository on Earth, and you can be sure there is a package for (almost!) everything.' authors: flaviocopes, MylesBorins, LaRuaNa, jgb-solutions, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/npx.en.md b/content/learn/npx.en.md index e5ce23183b..1393947ad5 100644 --- a/content/learn/npx.en.md +++ b/content/learn/npx.en.md @@ -2,7 +2,6 @@ title: The npx Node.js Package Runner description: 'npx is a very cool way to run Node.js code, and provides many useful features' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, jgb-solutions, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/package-json.en.md b/content/learn/package-json.en.md index b2de161f91..87916c1ca8 100644 --- a/content/learn/package-json.en.md +++ b/content/learn/package-json.en.md @@ -2,7 +2,6 @@ title: The package.json guide description: 'The package.json file is a key element in lots of app codebases based on the Node.js ecosystem.' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, jgb-solutions, amiller-gh, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/package-lock-json.en.md b/content/learn/package-lock-json.en.md index 85c343e95c..c2c2d0cf30 100644 --- a/content/learn/package-lock-json.en.md +++ b/content/learn/package-lock-json.en.md @@ -2,7 +2,6 @@ title: The package-lock.json file description: "The package-lock.json file is automatically generated when installing node packages. Learn what it's about" authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/update-npm-dependencies/index.en.md b/content/learn/update-npm-dependencies/index.en.md index 6833808bc2..cca0028b91 100644 --- a/content/learn/update-npm-dependencies/index.en.md +++ b/content/learn/update-npm-dependencies/index.en.md @@ -2,7 +2,6 @@ title: Update all the Node.js dependencies to their latest version description: 'How do you update all the npm dependencies store in the package.json file, to their latest version available?' authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/content/learn/v8-engine.en.md b/content/learn/v8-engine.en.md index c385bb79d9..8679417f3f 100644 --- a/content/learn/v8-engine.en.md +++ b/content/learn/v8-engine.en.md @@ -2,7 +2,6 @@ title: The V8 JavaScript Engine description: "V8 is the name of the JavaScript engine that powers Google Chrome. It's the thing that takes our JavaScript and executes it while browsing with Chrome. V8 provides the runtime environment in which JavaScript executes. The DOM and the other Web Platform APIs are provided by the browser." authors: flaviocopes, smfoote, co16353sidak, MylesBorins, LaRuaNa, andys8, ahmadawais, karlhorky, aymen94 -section: Getting Started category: learn --- diff --git a/content/learn/where-npm-install-packages.en.md b/content/learn/where-npm-install-packages.en.md index 2c3ff1b807..349de7035b 100644 --- a/content/learn/where-npm-install-packages.en.md +++ b/content/learn/where-npm-install-packages.en.md @@ -2,7 +2,6 @@ title: Where does npm install the packages? description: 'How to find out where npm installs the packages' authors: flaviocopes, MylesBorins, LaRuaNa, ahmadawais -section: Getting Started category: learn --- diff --git a/firebase.json b/firebase.json index 1eca9c9001..911e47033b 100644 --- a/firebase.json +++ b/firebase.json @@ -56,11 +56,6 @@ ] }, "redirects": [ - { - "source": "/get-involved/", - "destination": "/community/", - "type": "301" - }, { "source": "/governance/", "destination": "/about/governance/", diff --git a/gatsby-config.js b/gatsby-config.js index a6791ee894..814b34f795 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -8,7 +8,7 @@ const { localesAsString, defaultLanguage } = require('./locales'); const markdownSources = [ 'about', 'api', - 'community', + 'get-involved', 'download', 'homepage', 'learn', diff --git a/redirects.js b/redirects.js index d033b30472..3f39f9ad0c 100644 --- a/redirects.js +++ b/redirects.js @@ -1,8 +1,6 @@ // This file is used to define all the changed slugs from original nodejs.org site to our new site. // Note.: Gatsby requires trailing slashes on the path names module.exports = { - // Redirects Node.js Get Involved to Community - '/get-involved/': '/community/', // Redirects old About pages path to the new ones '/governance/': '/about/governance/', '/working-groups/': '/about/working-groups/', diff --git a/src/components/ApiComponents/Components/VersionSelector/index.module.scss b/src/components/ApiComponents/Components/VersionSelector/index.module.scss index 0cd759c2f0..06a94fd524 100644 --- a/src/components/ApiComponents/Components/VersionSelector/index.module.scss +++ b/src/components/ApiComponents/Components/VersionSelector/index.module.scss @@ -6,7 +6,7 @@ margin-bottom: -20px; padding-top: var(--space-24); - @media (max-width: 800px) { + @media (max-width: 900px) { display: none; } diff --git a/src/components/Article/index.module.scss b/src/components/Article/index.module.scss index 46a864cb79..db048922a4 100644 --- a/src/components/Article/index.module.scss +++ b/src/components/Article/index.module.scss @@ -1,30 +1,35 @@ .article { max-width: 768px; overflow-wrap: break-word; - padding: var(--space-48) var(--space-32) 0 var(--space-32); + padding: var(--space-48) var(--space-32) var(--space-48) var(--space-32); width: calc(100vw - 36rem); - @media (min-width: 1400px) { - max-width: 980px; - padding: var(--space-80) var(--space-32) var(--space-24) var(--space-128); - } - .headline { margin: 0 0 var(--space-40) 0; padding: 0; text-transform: capitalize; - @media (max-width: 800px) { + @media (max-width: 600px) { font-size: var(--font-size-display3); line-height: 1.2; margin: 6rem 0 2rem 0; } } - @media (max-width: 800px) { + @media (min-width: 1400px) { + max-width: 980px; + padding: var(--space-80) var(--space-32) var(--space-48) var(--space-128); + } + + @media (max-width: 900px) { + padding: var(--space-80) var(--space-32) var(--space-48) var(--space-32); + width: auto; + } + + @media (max-width: 600px) { box-sizing: border-box; max-width: 100vw; - padding: 0 3rem; + padding: var(--space-24) 3rem; width: 100%; } diff --git a/src/components/Article/index.tsx b/src/components/Article/index.tsx index 76f0f28526..5ece530652 100644 --- a/src/components/Article/index.tsx +++ b/src/components/Article/index.tsx @@ -79,7 +79,7 @@ const Article = ({ {childrenPosition === 'after' && children &&
{children}
} - {!blog && authors.length > 0 && ( + {!blog && authors && authors.length > 0 && ( )} {!blog && ( @@ -87,6 +87,7 @@ const Article = ({ absolutePath={absolutePath} relativePath={relativePath} editPath={editPath} + hasNoAuthors={!authors || !authors.length} /> )} {!blog && } diff --git a/src/components/BlogCard/index.module.scss b/src/components/BlogCard/index.module.scss index 6ce2268643..11dc363f10 100644 --- a/src/components/BlogCard/index.module.scss +++ b/src/components/BlogCard/index.module.scss @@ -3,7 +3,7 @@ flex-direction: column; padding: 40px 30px 40px 0; - @media (max-width: 800px) { + @media (max-width: 900px) { padding: 10px 20px; } diff --git a/src/components/Codebox/index.tsx b/src/components/Codebox/index.tsx index ec8328704c..2a54d5585f 100644 --- a/src/components/Codebox/index.tsx +++ b/src/components/Codebox/index.tsx @@ -14,7 +14,7 @@ interface Props { } const replaceLanguages = (language: string) => - language.replace(/mjs|cjs/, 'js').replace('console', 'bash'); + language.replace(/mjs|cjs|javascript/i, 'js').replace('console', 'bash'); const Codebox = ({ children: { props } }: Props): JSX.Element => { const [copied, setCopied] = useState(false); @@ -66,7 +66,7 @@ const Codebox = ({ children: { props } }: Props): JSX.Element => { return (
       
- {language.toUpperCase()} + {replaceLanguages(language).toUpperCase()} diff --git a/src/components/DownloadAdditional/index.module.scss b/src/components/DownloadAdditional/index.module.scss index b4833eb58d..9cf03659f0 100644 --- a/src/components/DownloadAdditional/index.module.scss +++ b/src/components/DownloadAdditional/index.module.scss @@ -8,7 +8,7 @@ display: flex; justify-content: space-between; - @media (max-width: 800px) { + @media (max-width: 900px) { align-items: center; flex-direction: column; } @@ -21,7 +21,7 @@ .title { margin: 0; - @media (max-width: 800px) { + @media (max-width: 900px) { padding-bottom: var(--space-12); } } diff --git a/src/components/DownloadReleases/index.module.scss b/src/components/DownloadReleases/index.module.scss index 2fd396dae0..5ae8ada9f5 100644 --- a/src/components/DownloadReleases/index.module.scss +++ b/src/components/DownloadReleases/index.module.scss @@ -7,7 +7,7 @@ line-height: var(--line-height-display4); margin: 126px 0 50px; - @media (max-width: 800px) { + @media (max-width: 900px) { margin: 50px 0 20px 0; text-align: center; } diff --git a/src/components/EditLink/index.module.scss b/src/components/EditLink/index.module.scss index 8a6c419055..4fbf557814 100644 --- a/src/components/EditLink/index.module.scss +++ b/src/components/EditLink/index.module.scss @@ -2,6 +2,10 @@ display: flex; flex-wrap: wrap; + &--no-authors { + margin-top: var(--space-24); + } + a { color: var(--color-text-secondary); font-family: var(--sans-serif); diff --git a/src/components/EditLink/index.tsx b/src/components/EditLink/index.tsx index 8eed404065..ae5b701ba6 100644 --- a/src/components/EditLink/index.tsx +++ b/src/components/EditLink/index.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; +import classnames from 'classnames'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faPencil } from '@fortawesome/free-solid-svg-icons'; import styles from './index.module.scss'; @@ -8,6 +9,7 @@ interface Props { relativePath?: string; editPath?: string; absolutePath?: string; + hasNoAuthors?: boolean; } const baseURL = `https://github.com/nodejs/nodejs.dev/edit/main`; @@ -16,6 +18,7 @@ const EditLink = ({ relativePath, editPath, absolutePath, + hasNoAuthors = false, }: Props): JSX.Element | null => { if (!relativePath && !editPath && !absolutePath) return null; @@ -25,8 +28,12 @@ const EditLink = ({ ? `${baseURL}/content/learn/${relativePath}` : `${baseURL}/${editPath}`); + const classNames = classnames(styles.edit, { + [styles.editNoAuthors]: hasNoAuthors, + }); + return ( -
+
diff --git a/src/components/Footer/__tests__/__snapshots__/index.test.tsx.snap b/src/components/Footer/__tests__/__snapshots__/index.test.tsx.snap index 0c5679391c..8f747f4655 100644 --- a/src/components/Footer/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/components/Footer/__tests__/__snapshots__/index.test.tsx.snap @@ -40,7 +40,7 @@ exports[`Tests for Footer component renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/components/Footer/index.module.scss b/src/components/Footer/index.module.scss index 7b90ed0c0f..05d815f153 100644 --- a/src/components/Footer/index.module.scss +++ b/src/components/Footer/index.module.scss @@ -5,7 +5,7 @@ margin: 0; margin-top: auto; - @media (max-width: 800px) { + @media (max-width: 900px) { flex-direction: column; } @@ -31,7 +31,7 @@ padding-top: 0; } - @media (max-width: 800px) { + @media (max-width: 900px) { align-items: center; flex-direction: column; height: 10rem; @@ -58,7 +58,7 @@ width: 1.8rem; } - @media (max-width: 800px) { + @media (max-width: 900px) { margin: 0; > li:first-of-type { @@ -79,13 +79,13 @@ height: 24px; margin-right: 32px; - @media (max-width: 800px) { + @media (max-width: 900px) { margin-right: 0; padding: 6px 0; } } - @media (max-width: 800px) { + @media (max-width: 900px) { padding: 6px 18px; } } diff --git a/src/components/Header/__tests__/__snapshots__/index.test.tsx.snap b/src/components/Header/__tests__/__snapshots__/index.test.tsx.snap index be4fb90ecb..e80fd40833 100644 --- a/src/components/Header/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/components/Header/__tests__/__snapshots__/index.test.tsx.snap @@ -38,6 +38,13 @@ exports[`Tests for Header component Theme color switcher skips rendering in case Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -220,6 +227,13 @@ exports[`Tests for Header component renders correctly 1`] = ` Learn +
  • + + About + +
  • - Community + Certification
  • @@ -402,6 +416,13 @@ exports[`Tests for Header component renders shorter menu items for mobile 1`] = Learn +
  • + + About + +
  • - Community + Certification
  • diff --git a/src/components/Header/index.module.scss b/src/components/Header/index.module.scss index a022f4fc1a..96cb78b19c 100644 --- a/src/components/Header/index.module.scss +++ b/src/components/Header/index.module.scss @@ -4,7 +4,7 @@ display: flex; margin-left: var(--space-16); - @media (max-width: 800px) { + @media (max-width: 900px) { display: flex; height: 42px; margin-left: 0; @@ -38,7 +38,7 @@ justify-content: space-between; padding: 0 var(--space-08) 0 var(--space-24); - @media (max-width: 800px) { + @media (max-width: 900px) { align-items: start; flex-flow: wrap; min-height: calc(1 * var(--nav-height)); @@ -59,7 +59,7 @@ } .logo { - @media (max-width: 800px) { + @media (max-width: 900px) { align-items: center; display: flex; height: var(--nav-height); @@ -68,7 +68,7 @@ svg { height: var(--space-32); - @media (max-width: 800px) { + @media (max-width: 900px) { height: 2.4rem; } } @@ -86,7 +86,7 @@ margin: 0; } - @media (max-width: 800px) { + @media (max-width: 900px) { background: var(--color-fill-app); height: var(--nav-height); justify-content: center; @@ -103,7 +103,7 @@ padding: calc(var(--space-32) + var(--space-04)) var(--space-16); text-decoration: none; - @media (max-width: 800px) { + @media (max-width: 900px) { padding: var(--space-08); } @@ -131,7 +131,7 @@ margin: 0; padding-left: 0; - @media (max-width: 800px) { + @media (max-width: 900px) { padding: 0; width: 100%; } diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 2d2fb0f3c2..c18bc4c9a3 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -32,6 +32,11 @@ const Header = (): JSX.Element => { +
  • + + + +
  • @@ -47,13 +52,9 @@ const Header = (): JSX.Element => {
  • - - - + + +
  • diff --git a/src/components/Hero/index.module.scss b/src/components/Hero/index.module.scss index d08853b908..f2cee409f4 100644 --- a/src/components/Hero/index.module.scss +++ b/src/components/Hero/index.module.scss @@ -16,7 +16,7 @@ h1 { max-width: 840px; - @media (max-width: 800px) { + @media (max-width: 900px) { font-size: var(--font-size-display2); line-height: 48px; max-width: 90vw; @@ -31,7 +31,7 @@ margin: var(--space-32) 0 var(--space-32) 0; max-width: 780px; - @media (max-width: 800px) { + @media (max-width: 900px) { max-width: 90vw; } } diff --git a/src/components/Layout/__tests__/__snapshots__/index.test.tsx.snap b/src/components/Layout/__tests__/__snapshots__/index.test.tsx.snap index 92962fe833..bf942e8bc5 100644 --- a/src/components/Layout/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/components/Layout/__tests__/__snapshots__/index.test.tsx.snap @@ -41,6 +41,13 @@ exports[`Layout component renders correctly with data 1`] = ` Learn +
  • + + About + +
  • - Community + Certification
  • diff --git a/src/components/Layout/__tests__/__snapshots__/page.test.tsx.snap b/src/components/Layout/__tests__/__snapshots__/page.test.tsx.snap index 3bf5e8bbc8..9594a61840 100644 --- a/src/components/Layout/__tests__/__snapshots__/page.test.tsx.snap +++ b/src/components/Layout/__tests__/__snapshots__/page.test.tsx.snap @@ -41,6 +41,13 @@ exports[`PageLayout component renders correctly with data 1`] = ` Learn +
  • + + About + +
  • - Community + Certification
  • @@ -354,7 +361,7 @@ exports[`PageLayout component renders correctly with data 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/components/Layout/article.tsx b/src/components/Layout/article.tsx index 71f7a7ccc9..be1f933736 100644 --- a/src/components/Layout/article.tsx +++ b/src/components/Layout/article.tsx @@ -31,9 +31,7 @@ const ArticleLayout = ({ }: ArticleLayoutProps): JSX.Element => (
    - {sidenavKey && ( - - )} + {sidenavKey && }
  • diff --git a/src/components/SideNavBar/__tests__/index.test.tsx b/src/components/SideNavBar/__tests__/index.test.tsx index 9174d51e67..2521e36d74 100644 --- a/src/components/SideNavBar/__tests__/index.test.tsx +++ b/src/components/SideNavBar/__tests__/index.test.tsx @@ -11,7 +11,7 @@ describe('SideNavBar', () => { it('should contain a href to `~/about`', () => { render(); - const aboutNavBarElement = screen.getByText('About'); + const aboutNavBarElement = screen.getByText('About Node.js'); expect(aboutNavBarElement.getAttribute('href')).toBe('/about/'); }); @@ -23,20 +23,6 @@ describe('SideNavBar', () => { ); }); - it('should contain a href to `~/community`', () => { - render(); - const communityNavBarElement = screen.getByText('Community'); - expect(communityNavBarElement.getAttribute('href')).toBe('/community/'); - }); - - it('should contain a href to `~/about/working-groups`', () => { - render(); - const workingGroupsNavBarElement = screen.getByText('Working Groups'); - expect(workingGroupsNavBarElement.getAttribute('href')).toBe( - '/about/working-groups/' - ); - }); - it('should contain a href to `~/about/releases`', () => { render(); const releasesNavBarElement = screen.getByText('Releases'); diff --git a/src/components/SideNavBar/index.module.scss b/src/components/SideNavBar/index.module.scss index be7aba0b3f..76cfa991b2 100644 --- a/src/components/SideNavBar/index.module.scss +++ b/src/components/SideNavBar/index.module.scss @@ -31,16 +31,15 @@ &__title { @extend .t-body2; @extend %navigation-section__pure-title; - - svg { - padding: 0; - } + color: var(--color-brand-primary); + font-weight: var(--font-weight-bold); margin-left: 0; + text-decoration: none; - b { - color: var(--color-brand-primary); - font-weight: var(--font-weight-semibold); + svg { + color: var(--color-text-primary); + padding: 0; } } diff --git a/src/components/SideNavBar/index.tsx b/src/components/SideNavBar/index.tsx index d65c8bae6d..563b94a24e 100644 --- a/src/components/SideNavBar/index.tsx +++ b/src/components/SideNavBar/index.tsx @@ -1,6 +1,9 @@ import React, { useRef, useState, useMemo, useEffect } from 'react'; +import { LocalizedLink as Link } from 'gatsby-theme-i18n'; import { FormattedMessage, useIntl } from 'react-intl'; -import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; +import GroupsIcon from '@mui/icons-material/Groups'; +import InfoIcon from '@mui/icons-material/Info'; +import CloudDownloadIcon from '@mui/icons-material/CloudDownload'; import classnames from 'classnames'; import { SideNavBarItem } from '../../types'; import NavigationItem from '../NavigationItem'; @@ -10,32 +13,31 @@ import styles from './index.module.scss'; export enum SideNavBarKeys { about = '/about/', governance = '/about/governance/', - community = '/community/', - workingGroups = '/about/working-groups/', releases = '/about/releases/', resources = '/about/resources/', privacy = '/about/privacy/', security = '/about/security/', + getInvolved = '/get-involved/', + codeLearn = '/get-involved/code-learn', + collabSummit = '/get-involved/collab-summit', + contribute = '/get-involved/contribute', + download = '/download/', packageManager = '/download/package-manager/', + previousReleases = '/download/releases/', + codeOfConduct = 'https://github.com/nodejs/node/blob/main/doc/contributing/code-of-conduct.md', } const sideNavBarItems: SideNavBarItem[] = [ { - title: 'components.sideBar.items.about', + title: 'components.sideBar.section.about', slug: SideNavBarKeys.about, + icon: InfoIcon, + isTitle: true, }, { title: 'components.sideBar.items.governance', slug: SideNavBarKeys.governance, }, - { - title: 'components.sideBar.items.community', - slug: SideNavBarKeys.community, - }, - { - title: 'components.sideBar.items.workingGroups', - slug: SideNavBarKeys.workingGroups, - }, { title: 'components.sideBar.items.releases', slug: SideNavBarKeys.releases, @@ -52,10 +54,42 @@ const sideNavBarItems: SideNavBarItem[] = [ title: 'components.sideBar.items.security', slug: SideNavBarKeys.security, }, + { + title: 'components.sideBar.section.getInvolved', + slug: SideNavBarKeys.getInvolved, + icon: GroupsIcon, + isTitle: true, + }, + { + title: 'components.sideBar.items.codeLearn', + slug: SideNavBarKeys.codeLearn, + }, + { + title: 'components.sideBar.items.collabSummit', + slug: SideNavBarKeys.collabSummit, + }, + { + title: 'components.sideBar.items.contribute', + slug: SideNavBarKeys.contribute, + }, + { + title: 'components.sideBar.items.codeOfConduct', + slug: SideNavBarKeys.codeOfConduct, + }, + { + title: 'components.sideBar.section.download', + slug: SideNavBarKeys.download, + icon: CloudDownloadIcon, + isTitle: true, + }, { title: 'components.sideBar.items.packageManager', slug: SideNavBarKeys.packageManager, }, + { + title: 'components.sideBar.items.previousReleases', + slug: SideNavBarKeys.previousReleases, + }, ]; // eslint-disable-next-line no-shadow @@ -67,14 +101,9 @@ export enum OverflowTypes { interface NavBarProps { pageKey?: string; items?: SideNavBarItem[]; - title?: string; } -const SideNavBar = ({ - pageKey, - items = sideNavBarItems, - title, -}: NavBarProps): JSX.Element => { +const SideNavBar = ({ pageKey, items = sideNavBarItems }: NavBarProps) => { const [navOpen, setNavOpen] = useState(false); const toggle = (): void => setNavOpen(!navOpen); const intl = useIntl(); @@ -93,19 +122,39 @@ const SideNavBar = ({ const navElement = useRef(null); - const renderNavTitle = () => { - if (title) { + const renderTitle = ({ title, slug, icon: Icon }: SideNavBarItem) => { + const titleContent = ( + <> + {title} + {Icon && } + + ); + + if (slug.startsWith('https')) { return ( -
    - {title} - -
    + + {titleContent} + ); } - return null; + return ( + + {titleContent} + + ); }; + const renderItem = ({ title, slug }: SideNavBarItem) => ( + + ); + const translatedSidebar = useMemo( () => items.map(item => ({ @@ -125,18 +174,9 @@ const SideNavBar = ({
    - {renderNavTitle()} - {translatedSidebar - .sort((a, b) => a.title.localeCompare(b.title)) - .map(({ title: commTitle, slug }) => ( - - ))} + {translatedSidebar.map(({ isTitle, ...props }) => + isTitle ? renderTitle(props) : renderItem(props) + )}
    ); diff --git a/src/components/TableOfContents/index.tsx b/src/components/TableOfContents/index.tsx index a1a7e4430b..6c066dc0b3 100644 --- a/src/components/TableOfContents/index.tsx +++ b/src/components/TableOfContents/index.tsx @@ -34,18 +34,29 @@ const removeApiSpanTagFromItem = (item: TableOfContentsItem) => ({ const traverseTableOfContents = ( items: TableOfContentsItem[], depth: number -) => ( -
      - {items.map(removeApiSpanTagFromItem).map(item => ( -
    • - {item.url && item.title && {item.title}} - {item.items && depth < 2 - ? traverseTableOfContents(item.items, depth + 1) - : null} -
    • - ))} -
    -); +) => { + const filterItems = (subItems: TableOfContentsItem[]) => + subItems.filter(item => item && item.title && item.url); + + const currentItems = filterItems(items); + + if (currentItems) { + return ( +
      + {currentItems.map(removeApiSpanTagFromItem).map(item => ( +
    • + {item.url && item.title && {item.title}} + {item.items && depth < 2 && filterItems(item.items).length > 0 + ? traverseTableOfContents(item.items, depth + 1) + : null} +
    • + ))} +
    + ); + } + + return null; +}; const TableOfContents = ({ tableOfContents }: Props): null | JSX.Element => { if (tableOfContents?.items) { diff --git a/src/containers/BlogContainer/index.module.scss b/src/containers/BlogContainer/index.module.scss index 14d63c39b4..101e576d54 100644 --- a/src/containers/BlogContainer/index.module.scss +++ b/src/containers/BlogContainer/index.module.scss @@ -4,12 +4,12 @@ max-width: 840px; padding: var(--space-80) 0 0 var(--space-128); - @media (max-width: 800px) { + @media (max-width: 900px) { padding: 0 3rem; } .blog-category-header { - @media (max-width: 800px) { + @media (max-width: 900px) { padding: 80px 0 0 20px; } @@ -22,7 +22,7 @@ display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); - @media (max-width: 800px) { + @media (max-width: 900px) { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); } } diff --git a/src/containers/BlogContainer/index.tsx b/src/containers/BlogContainer/index.tsx index bab78f19c3..d12223994a 100644 --- a/src/containers/BlogContainer/index.tsx +++ b/src/containers/BlogContainer/index.tsx @@ -1,9 +1,17 @@ import React from 'react'; +import FeedIcon from '@mui/icons-material/Feed'; import BlogCard from '../../components/BlogCard'; import SideNavBar from '../../components/SideNavBar'; import { BlogPost, BlogCategory } from '../../types'; import styles from './index.module.scss'; +const blogSectionTitle = { + title: 'components.sideBar.section.blog', + slug: '/blog/', + icon: FeedIcon, + isTitle: true, +}; + const parseNavigationData = (categories: BlogCategory[]) => { return categories.map(({ node }) => ({ title: node.slug, @@ -20,9 +28,8 @@ type Props = { const BlogContainer = ({ categories, posts, currentCategory }: Props) => ( <>
    diff --git a/src/containers/Navigation/__tests__/__snapshots__/navigation.test.tsx.snap b/src/containers/Navigation/__tests__/__snapshots__/navigation.test.tsx.snap index 53c9667ed0..c48077c921 100644 --- a/src/containers/Navigation/__tests__/__snapshots__/navigation.test.tsx.snap +++ b/src/containers/Navigation/__tests__/__snapshots__/navigation.test.tsx.snap @@ -43,7 +43,6 @@ exports[`Navigation component renders correctly 1`] = ` aria-current="page" class="t-body2 navigationItem navigationItemActive" href="intro" - id="link-intro" > Section 1 diff --git a/src/containers/Navigation/index.module.scss b/src/containers/Navigation/index.module.scss index 37a4c0e329..3eae8a374d 100644 --- a/src/containers/Navigation/index.module.scss +++ b/src/containers/Navigation/index.module.scss @@ -13,7 +13,7 @@ width: 100%; z-index: 998; - @media (max-width: 800px) { + @media (max-width: 900px) { height: auto; left: 0; max-height: 42px; @@ -61,7 +61,7 @@ width: 20px; z-index: 9999; - @media (max-width: 800px) { + @media (max-width: 900px) { display: unset; } @@ -92,7 +92,7 @@ &--fixed, &%--fixed { - @media (max-width: 800px) { + @media (max-width: 900px) { height: auto; max-height: calc(100% - var(--nav-height)); overflow: visible; diff --git a/src/data/learn.yaml b/src/data/learn.yaml index 50e52f7e5e..0cbe343355 100644 --- a/src/data/learn.yaml +++ b/src/data/learn.yaml @@ -12,6 +12,7 @@ - node-javascript-language - node-difference-browser - node-difference-dev-prod + - node-es6 - section: 'Basics & Built-ins' items: - node-export-module @@ -39,6 +40,7 @@ - node-process-nexttick - node-setimmediate - node-event-emitter + - blocking-vs-non-blocking - section: 'Manipulating Files' items: - node-file-descriptors diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 33a7134323..99893147f6 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -24,7 +24,7 @@ "components.footer.links.trademark": "Trademark Policy", "components.footer.links.privacy": "Privacy Policy", "components.footer.links.codeOfConduct": "Code of Conduct", - "components.footer.links.security": "Security Reporting", + "components.footer.links.security": "Security", "components.footer.links.about": "About", "components.footer.links.blog": "Blog", "components.footer.links.openJsFoundation": "© OpenJS Foundation", @@ -32,7 +32,6 @@ "components.header.links.learn": "Learn", "components.header.links.docs": "API Docs", "components.header.links.download": "Download", - "components.header.links.community": "Community", "components.hero.downloadLts": "Download Node (LTS)", "components.hero.currentVersion": "Version {version}", "components.hero.getCurrent": "Download Latest ({version})", @@ -46,10 +45,7 @@ "components.searchBar.search.title": "Start typing to Search", "components.searchBar.search.noResults": "No results match your query.", "components.sideBar.title": "Menu", - "components.sideBar.items.about": "About", "components.sideBar.items.governance": "Project Governance", - "components.sideBar.items.community": "Community", - "components.sideBar.items.workingGroups": "Working Groups", "components.sideBar.items.releases": "Releases", "components.sideBar.items.resources": "Resources", "components.sideBar.items.privacy": "Privacy Policy", @@ -79,5 +75,16 @@ "docs.api.sourceLink": "Source Code:", "docs.api.history.version": "Version", "docs.api.history.changes": "Changes", - "docs.api.stability": "Stability: {level}{text}" + "docs.api.stability": "Stability: {level}{text}", + "components.header.links.about": "About", + "components.header.links.certification": "Certification", + "components.sideBar.section.about": "About Node.js", + "components.sideBar.section.getInvolved": "Get Involved", + "components.sideBar.items.codeLearn": "Code + Learn", + "components.sideBar.items.collabSummit": "Collab Summit", + "components.sideBar.items.contribute": "Contribute", + "components.sideBar.section.download": "Download", + "components.sideBar.items.previousReleases": "Previous Releases", + "components.sideBar.items.codeOfConduct": "Code of Conduct", + "components.sideBar.section.blog": "Node.js Blog" } diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 33a7134323..99893147f6 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -24,7 +24,7 @@ "components.footer.links.trademark": "Trademark Policy", "components.footer.links.privacy": "Privacy Policy", "components.footer.links.codeOfConduct": "Code of Conduct", - "components.footer.links.security": "Security Reporting", + "components.footer.links.security": "Security", "components.footer.links.about": "About", "components.footer.links.blog": "Blog", "components.footer.links.openJsFoundation": "© OpenJS Foundation", @@ -32,7 +32,6 @@ "components.header.links.learn": "Learn", "components.header.links.docs": "API Docs", "components.header.links.download": "Download", - "components.header.links.community": "Community", "components.hero.downloadLts": "Download Node (LTS)", "components.hero.currentVersion": "Version {version}", "components.hero.getCurrent": "Download Latest ({version})", @@ -46,10 +45,7 @@ "components.searchBar.search.title": "Start typing to Search", "components.searchBar.search.noResults": "No results match your query.", "components.sideBar.title": "Menu", - "components.sideBar.items.about": "About", "components.sideBar.items.governance": "Project Governance", - "components.sideBar.items.community": "Community", - "components.sideBar.items.workingGroups": "Working Groups", "components.sideBar.items.releases": "Releases", "components.sideBar.items.resources": "Resources", "components.sideBar.items.privacy": "Privacy Policy", @@ -79,5 +75,16 @@ "docs.api.sourceLink": "Source Code:", "docs.api.history.version": "Version", "docs.api.history.changes": "Changes", - "docs.api.stability": "Stability: {level}{text}" + "docs.api.stability": "Stability: {level}{text}", + "components.header.links.about": "About", + "components.header.links.certification": "Certification", + "components.sideBar.section.about": "About Node.js", + "components.sideBar.section.getInvolved": "Get Involved", + "components.sideBar.items.codeLearn": "Code + Learn", + "components.sideBar.items.collabSummit": "Collab Summit", + "components.sideBar.items.contribute": "Contribute", + "components.sideBar.section.download": "Download", + "components.sideBar.items.previousReleases": "Previous Releases", + "components.sideBar.items.codeOfConduct": "Code of Conduct", + "components.sideBar.section.blog": "Node.js Blog" } diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index e5117a2a37..4046080361 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -24,7 +24,7 @@ "components.footer.links.trademark": "Politique en matière de marques", "components.footer.links.privacy": "Politique de confidentialité", "components.footer.links.codeOfConduct": "Code de conduite", - "components.footer.links.security": "Rapports de sécurité", + "components.footer.links.security": "Sécurité", "components.footer.links.about": "À propos", "components.footer.links.blog": "Blog", "components.footer.links.openJsFoundation": "©Fondation OpenJS", @@ -32,9 +32,8 @@ "components.header.links.learn": "Apprendre", "components.header.links.docs": "Docs API", "components.header.links.download": "Télécharger", - "components.header.links.community": "Communauté", "components.hero.downloadLts": "Télécharger Node(LTS)", - "components.hero.currentVersion": "{isLts, select, true {Version {currentVersion} - }other {}}", + "components.hero.currentVersion": "Version {version}", "components.hero.getCurrent": "Obtenir la version courante", "components.hero.learn": "Apprendre Node", "components.installTabs.readDocs": "Lire la documentation", @@ -46,10 +45,7 @@ "components.searchBar.search.title": "Commencez à taper pour rechercher", "components.searchBar.search.noResults": "Aucun résultat ne correspond à votre requête.", "components.sideBar.title": "Menu", - "components.sideBar.items.about": "À propos de", "components.sideBar.items.governance": "Gouvernance de projet", - "components.sideBar.items.community": "Communauté", - "components.sideBar.items.workingGroups": "Groupes de travail", "components.sideBar.items.releases": "Sorties", "components.sideBar.items.resources": "Ressources", "components.sideBar.items.privacy": "Politique de confidentialité", @@ -79,5 +75,16 @@ "docs.api.sourceLink": "Code source:", "docs.api.history.version": "Version", "docs.api.history.changes": "Changements", - "docs.api.stability": "Stabilité: {level}{text}" + "docs.api.stability": "Stabilité: {level}{text}", + "components.header.links.about": "About", + "components.header.links.certification": "Certification", + "components.sideBar.section.about": "About Node.js", + "components.sideBar.section.getInvolved": "Get Involved", + "components.sideBar.items.codeLearn": "Code + Learn", + "components.sideBar.items.collabSummit": "Collab Summit", + "components.sideBar.items.contribute": "Contribute", + "components.sideBar.section.download": "Download", + "components.sideBar.items.previousReleases": "Previous Releases", + "components.sideBar.items.codeOfConduct": "Code of Conduct", + "components.sideBar.section.blog": "Node.js Blog" } diff --git a/src/pages/__tests__/__snapshots__/community.test.tsx.snap b/src/pages/__tests__/__snapshots__/community.test.tsx.snap deleted file mode 100644 index 49dde3f120..0000000000 --- a/src/pages/__tests__/__snapshots__/community.test.tsx.snap +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Community Page renders correctly 1`] = ` -
    - -
    -

    - Mock Title -

    -
    - - - Table of Contents - - - -
    -
    -

    - Node.js can be installed in different ways. This post highlights the most common and convenient ones. -

    -

    - Official packages for all the major platforms are available at - - https://nodejs.dev/download/ - - . -

    -

    - One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own. -

    -

    - Other package managers for MacOS, Linux, and Windows are listed in - - https://nodejs.dev/download/package-manager/ - -

    -

    - - nvm - - is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example. -

    -

    - It is also very useful to test your code with old Node.js versions. -

    -

    - See - - https://github.com/nvm-sh/nvm - - for more information about this option. -

    -

    - In any case, when Node.js is installed you'll have access to the - - node - - executable program in the command line. -

    -
    -
    - Contributors - -
    - -
    -
    -`; diff --git a/src/pages/__tests__/community.test.tsx b/src/pages/__tests__/community.test.tsx deleted file mode 100644 index 77e9e7d984..0000000000 --- a/src/pages/__tests__/community.test.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import { axe, toHaveNoViolations } from 'jest-axe'; -import CommunityPage from '../community'; -import { createGeneralPageData } from '../../__fixtures__/page'; - -const mockData = createGeneralPageData(); -expect.extend(toHaveNoViolations); - -describe('Community Page', () => { - it('renders correctly', () => { - const { container } = render(); - // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access - const pageContent = container.querySelector('main'); - - expect(pageContent).toMatchSnapshot(); - }); - - it('should have no accessibility violations', async () => { - const { container } = render(); - const results = await axe(container); - expect(results).toHaveNoViolations(); - }); -}); diff --git a/src/pages/about/__tests__/__snapshots__/governance.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/governance.test.tsx.snap index 4f1ae2f1e4..f39806597f 100644 --- a/src/pages/about/__tests__/__snapshots__/governance.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/governance.test.tsx.snap @@ -16,87 +16,123 @@ exports[`Governance Page renders correctly 1`] = ` diff --git a/src/pages/about/__tests__/__snapshots__/index.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/index.test.tsx.snap index 9c53668ade..7b29deb0f6 100644 --- a/src/pages/about/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/index.test.tsx.snap @@ -16,87 +16,122 @@ exports[`About page renders correctly 1`] = ` diff --git a/src/pages/about/__tests__/__snapshots__/privacy.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/privacy.test.tsx.snap index e48d58f3ac..0592f79ad9 100644 --- a/src/pages/about/__tests__/__snapshots__/privacy.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/privacy.test.tsx.snap @@ -16,87 +16,123 @@ exports[`Privacy Page renders correctly 1`] = ` diff --git a/src/pages/about/__tests__/__snapshots__/releases.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/releases.test.tsx.snap index 4a1d9594e2..44c7867c81 100644 --- a/src/pages/about/__tests__/__snapshots__/releases.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/releases.test.tsx.snap @@ -16,87 +16,123 @@ exports[`Releases page renders correctly 1`] = ` diff --git a/src/pages/about/__tests__/__snapshots__/resources.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/resources.test.tsx.snap index 0f353b14cb..1edba94515 100644 --- a/src/pages/about/__tests__/__snapshots__/resources.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/resources.test.tsx.snap @@ -41,6 +41,13 @@ exports[`Resources page renders correctly 1`] = ` Learn +
  • + + About + +
  • - Community + Certification
  • @@ -197,87 +204,122 @@ exports[`Resources page renders correctly 1`] = ` @@ -450,7 +492,7 @@ exports[`Resources page renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/pages/about/__tests__/__snapshots__/security.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/security.test.tsx.snap index 323422e9eb..26d8a8e3b3 100644 --- a/src/pages/about/__tests__/__snapshots__/security.test.tsx.snap +++ b/src/pages/about/__tests__/__snapshots__/security.test.tsx.snap @@ -16,87 +16,123 @@ exports[`Security page renders correctly 1`] = ` diff --git a/src/pages/about/__tests__/__snapshots__/working-groups.test.tsx.snap b/src/pages/about/__tests__/__snapshots__/working-groups.test.tsx.snap deleted file mode 100644 index 246cb83616..0000000000 --- a/src/pages/about/__tests__/__snapshots__/working-groups.test.tsx.snap +++ /dev/null @@ -1,234 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Working Groups page renders correctly 1`] = ` -
    - -
    -

    - Mock Title -

    -
    - - - Table of Contents - - - -
    -
    -

    - Node.js can be installed in different ways. This post highlights the most common and convenient ones. -

    -

    - Official packages for all the major platforms are available at - - https://nodejs.dev/download/ - - . -

    -

    - One very convenient way to install Node.js is through a package manager. In this case, every operating system has its own. -

    -

    - Other package managers for MacOS, Linux, and Windows are listed in - - https://nodejs.dev/download/package-manager/ - -

    -

    - - nvm - - is a popular way to run Node.js. It allows you to easily switch the Node.js version, and install new versions to try and easily rollback if something breaks, for example. -

    -

    - It is also very useful to test your code with old Node.js versions. -

    -

    - See - - https://github.com/nvm-sh/nvm - - for more information about this option. -

    -

    - In any case, when Node.js is installed you'll have access to the - - node - - executable program in the command line. -

    -
    -
    - Contributors - -
    - -
    -
    -`; diff --git a/src/pages/about/__tests__/working-groups.test.tsx b/src/pages/about/__tests__/working-groups.test.tsx deleted file mode 100644 index 2218e230a4..0000000000 --- a/src/pages/about/__tests__/working-groups.test.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import WorkingGroupsPage from '../working-groups'; -import { createGeneralPageData } from '../../../__fixtures__/page'; - -const mockData = createGeneralPageData(); - -describe('Working Groups page', () => { - it('renders correctly', () => { - const { container } = render(); - // eslint-disable-next-line testing-library/no-container, testing-library/no-node-access - const pageContent = container.querySelector('main'); - - expect(pageContent).toMatchSnapshot(); - }); -}); diff --git a/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap b/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap index ce560e9956..35efdaf8a4 100644 --- a/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap +++ b/src/pages/download/__tests__/__snapshots__/index.test.tsx.snap @@ -41,6 +41,13 @@ exports[`Download page renders correctly 1`] = ` Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -824,7 +831,7 @@ exports[`Download page renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • @@ -977,6 +984,13 @@ exports[`Download page should handle LTS to Current switch 1`] = ` Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -1760,7 +1774,7 @@ exports[`Download page should handle LTS to Current switch 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/pages/download/__tests__/__snapshots__/package-manager.test.tsx.snap b/src/pages/download/__tests__/__snapshots__/package-manager.test.tsx.snap index bcc923d108..c53484c722 100644 --- a/src/pages/download/__tests__/__snapshots__/package-manager.test.tsx.snap +++ b/src/pages/download/__tests__/__snapshots__/package-manager.test.tsx.snap @@ -41,6 +41,13 @@ exports[`Package Manager Page renders correctly 1`] = ` Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -197,87 +204,123 @@ exports[`Package Manager Page renders correctly 1`] = ` @@ -450,7 +493,7 @@ exports[`Package Manager Page renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/pages/download/releases.tsx b/src/pages/download/releases.tsx new file mode 100644 index 0000000000..76cf9ad4eb --- /dev/null +++ b/src/pages/download/releases.tsx @@ -0,0 +1,74 @@ +import React from 'react'; +import { graphql } from 'gatsby'; +import ArticleLayout from '../../components/Layout/article'; +import { NodeReleaseData } from '../../types'; +import { SideNavBarKeys } from '../../components/SideNavBar'; +import DownloadTable from '../../components/DownloadReleases/DownloadTable'; +import connectGraphQlArticle from '../../components/connectGraphQlArticle'; + +export interface ReleasesNodeReleases { + nodeReleases: { + nodeReleasesData: NodeReleaseData[]; + }; +} + +export default connectGraphQlArticle(ArticleLayout, { + editPath: 'content/download/releases.md', + sidenavKey: SideNavBarKeys.previousReleases, + articleContent: (props: ReleasesNodeReleases) => ( + release.status !== 'Pending' + )} + /> + ), +}); + +export const query = graphql` + query ($locale: String!, $defaultLocale: String!) { + articleCurrentLanguage: mdx( + fields: { slug: { eq: "previous-releases" }, locale: { eq: $locale } } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + articleDefaultLanguage: mdx( + fields: { + slug: { eq: "previous-releases" } + locale: { eq: $defaultLocale } + } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + nodeReleases { + nodeReleasesData { + fullVersion + version + codename + isLts + status + initialRelease + ltsStart + maintenanceStart + endOfLife + } + } + } +`; diff --git a/src/pages/about/working-groups.tsx b/src/pages/get-involved/code-learn.tsx similarity index 76% rename from src/pages/about/working-groups.tsx rename to src/pages/get-involved/code-learn.tsx index 0db105c3a9..d8ca657c77 100644 --- a/src/pages/about/working-groups.tsx +++ b/src/pages/get-involved/code-learn.tsx @@ -4,14 +4,14 @@ import { SideNavBarKeys } from '../../components/SideNavBar'; import connectGraphQlArticle from '../../components/connectGraphQlArticle'; export default connectGraphQlArticle(ArticleLayout, { - editPath: 'content/about/working-groups.md', - sidenavKey: SideNavBarKeys.workingGroups, + editPath: 'content/get-involved/code-learn.md', + sidenavKey: SideNavBarKeys.codeLearn, }); export const query = graphql` query ($locale: String!, $defaultLocale: String!) { articleCurrentLanguage: mdx( - fields: { slug: { eq: "working-groups" }, locale: { eq: $locale } } + fields: { slug: { eq: "code-learn" }, locale: { eq: $locale } } ) { body tableOfContents @@ -25,7 +25,7 @@ export const query = graphql` } } articleDefaultLanguage: mdx( - fields: { slug: { eq: "working-groups" }, locale: { eq: $defaultLocale } } + fields: { slug: { eq: "code-learn" }, locale: { eq: $defaultLocale } } ) { body tableOfContents diff --git a/src/pages/community.tsx b/src/pages/get-involved/collab-summit.tsx similarity index 56% rename from src/pages/community.tsx rename to src/pages/get-involved/collab-summit.tsx index 0e8a4c71bc..bd2375c4f6 100644 --- a/src/pages/community.tsx +++ b/src/pages/get-involved/collab-summit.tsx @@ -1,17 +1,17 @@ import { graphql } from 'gatsby'; -import ArticleLayout from '../components/Layout/article'; -import { SideNavBarKeys } from '../components/SideNavBar'; -import connectGraphQlArticle from '../components/connectGraphQlArticle'; +import ArticleLayout from '../../components/Layout/article'; +import { SideNavBarKeys } from '../../components/SideNavBar'; +import connectGraphQlArticle from '../../components/connectGraphQlArticle'; export default connectGraphQlArticle(ArticleLayout, { - editPath: 'content/community/index.md', - sidenavKey: SideNavBarKeys.community, + editPath: 'content/get-involved/collab-summit.md', + sidenavKey: SideNavBarKeys.collabSummit, }); export const query = graphql` query ($locale: String!, $defaultLocale: String!) { articleCurrentLanguage: mdx( - fields: { slug: { eq: "nodejs-community" }, locale: { eq: $locale } } + fields: { slug: { eq: "collab-summit" }, locale: { eq: $locale } } ) { body tableOfContents @@ -25,10 +25,7 @@ export const query = graphql` } } articleDefaultLanguage: mdx( - fields: { - slug: { eq: "nodejs-community" } - locale: { eq: $defaultLocale } - } + fields: { slug: { eq: "collab-summit" }, locale: { eq: $defaultLocale } } ) { body tableOfContents diff --git a/src/pages/get-involved/contribute.tsx b/src/pages/get-involved/contribute.tsx new file mode 100644 index 0000000000..5fce7530fd --- /dev/null +++ b/src/pages/get-involved/contribute.tsx @@ -0,0 +1,42 @@ +import { graphql } from 'gatsby'; +import ArticleLayout from '../../components/Layout/article'; +import { SideNavBarKeys } from '../../components/SideNavBar'; +import connectGraphQlArticle from '../../components/connectGraphQlArticle'; + +export default connectGraphQlArticle(ArticleLayout, { + editPath: 'content/get-involved/contribute.md', + sidenavKey: SideNavBarKeys.contribute, +}); + +export const query = graphql` + query ($locale: String!, $defaultLocale: String!) { + articleCurrentLanguage: mdx( + fields: { slug: { eq: "contributing" }, locale: { eq: $locale } } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + articleDefaultLanguage: mdx( + fields: { slug: { eq: "contributing" }, locale: { eq: $defaultLocale } } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + } +`; diff --git a/src/pages/get-involved/index.tsx b/src/pages/get-involved/index.tsx new file mode 100644 index 0000000000..9a36fc2fd0 --- /dev/null +++ b/src/pages/get-involved/index.tsx @@ -0,0 +1,42 @@ +import { graphql } from 'gatsby'; +import ArticleLayout from '../../components/Layout/article'; +import { SideNavBarKeys } from '../../components/SideNavBar'; +import connectGraphQlArticle from '../../components/connectGraphQlArticle'; + +export default connectGraphQlArticle(ArticleLayout, { + editPath: 'content/get-involved/index.md', + sidenavKey: SideNavBarKeys.getInvolved, +}); + +export const query = graphql` + query ($locale: String!, $defaultLocale: String!) { + articleCurrentLanguage: mdx( + fields: { slug: { eq: "get-involved" }, locale: { eq: $locale } } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + articleDefaultLanguage: mdx( + fields: { slug: { eq: "get-involved" }, locale: { eq: $defaultLocale } } + ) { + body + tableOfContents + frontmatter { + title + description + displayTitle + } + fields { + authors + } + } + } +`; diff --git a/src/styles/base.scss b/src/styles/base.scss index 84454ad096..7edc70ee69 100644 --- a/src/styles/base.scss +++ b/src/styles/base.scss @@ -9,7 +9,7 @@ html { height: 100%; margin: 0; - @media (max-width: 800px) { + @media (max-width: 900px) { font-size: 0.5625rem; } } @@ -32,11 +32,11 @@ body { --brand: var(--brand5); --brand-dark: var(--brand7); - @media (max-width: 1262px) and (min-width: 800px) { + @media (max-width: 1262px) and (min-width: 900px) { --banner-clip: polygon(0 0, 100% 0, 100% calc(100% - 52px), 0 100%); } - @media (max-width: 800px) { + @media (max-width: 900px) { --nav-height: 42px; --banner-clip: polygon( 0 0, @@ -48,7 +48,7 @@ body { } main { - @media (max-width: 800px) { + @media (max-width: 900px) { display: flex; flex-flow: column; } @@ -83,7 +83,7 @@ table { width: 100%; } -@media (max-width: 800px) { +@media (max-width: 900px) { thead { tr { th { diff --git a/src/styles/containers.scss b/src/styles/containers.scss index e52e24f3e6..b5b42d076f 100644 --- a/src/styles/containers.scss +++ b/src/styles/containers.scss @@ -9,7 +9,7 @@ max-width: 800px; } - @media (max-width: 800px) { + @media (max-width: 900px) { --section-margin-bottom: 40px; margin: 0 auto; margin-bottom: var(--space-80); @@ -31,7 +31,7 @@ .grid-container { display: grid; - @media (min-width: 800px) { + @media (min-width: 900px) { grid-template-columns: 28.8rem auto; } } diff --git a/src/templates/__tests__/__snapshots__/learn.test.tsx.snap b/src/templates/__tests__/__snapshots__/learn.test.tsx.snap index abe4a65dd8..b50904cf63 100644 --- a/src/templates/__tests__/__snapshots__/learn.test.tsx.snap +++ b/src/templates/__tests__/__snapshots__/learn.test.tsx.snap @@ -41,6 +41,13 @@ exports[`Learn Template renders correctly 1`] = ` Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -431,7 +438,7 @@ exports[`Learn Template renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/templates/__tests__/__snapshots__/post.test.tsx.snap b/src/templates/__tests__/__snapshots__/post.test.tsx.snap index d43745a4e7..d0591def8d 100644 --- a/src/templates/__tests__/__snapshots__/post.test.tsx.snap +++ b/src/templates/__tests__/__snapshots__/post.test.tsx.snap @@ -41,6 +41,13 @@ exports[`LearnLayout Template renders correctly 1`] = ` Learn
  • +
  • + + About + +
  • - Community + Certification
  • @@ -316,7 +323,7 @@ exports[`LearnLayout Template renders correctly 1`] = ` class="link" href="/about/security" > - Security Reporting + Security
  • diff --git a/src/types/navigation.ts b/src/types/navigation.ts index 524621eb83..dc91ee65cf 100644 --- a/src/types/navigation.ts +++ b/src/types/navigation.ts @@ -1,3 +1,5 @@ +import type SvgIcon from '@mui/material/SvgIcon'; + export interface NavigationSectionItem { slug: string; title: string; @@ -11,4 +13,6 @@ export interface NavigationSectionData { export interface SideNavBarItem { title: string; slug: string; + icon?: typeof SvgIcon; + isTitle?: boolean; }