From ab5d7ea1cc573d82fdff1207321ff24e7e29b5df Mon Sep 17 00:00:00 2001 From: Crowdin Bot Date: Sun, 15 Dec 2024 19:56:49 +0000 Subject: [PATCH 1/3] chore: synced translations from crowdin --- apps/site/pages/es/about/branding.mdx | 74 ++++ .../es/about/get-involved/collab-summit.md | 17 + .../pages/es/about/get-involved/events.mdx | 16 + .../site/pages/es/about/get-involved/index.md | 36 ++ apps/site/pages/es/about/governance.md | 31 ++ apps/site/pages/es/about/index.mdx | 63 +++ .../site/pages/es/about/previous-releases.mdx | 25 ++ .../pages/es/about/security-reporting.mdx | 60 +++ .../pages/es/download/package-manager/all.md | 393 ++++++++++++++++++ .../es/download/package-manager/current.mdx | 23 + .../es/download/package-manager/index.mdx | 23 + .../es/download/prebuilt-binaries/current.mdx | 23 + .../es/download/prebuilt-binaries/index.mdx | 23 + .../download/prebuilt-installer/current.mdx | 25 ++ .../es/download/prebuilt-installer/index.mdx | 25 ++ .../pages/es/download/source-code/current.mdx | 23 + .../pages/es/download/source-code/index.mdx | 23 + apps/site/pages/es/index.mdx | 242 ++++++----- apps/site/pages/fa/about/index.mdx | 16 +- .../pages/fa/about/security-reporting.mdx | 11 +- apps/site/pages/fr/about/branding.mdx | 12 +- apps/site/pages/fr/about/index.mdx | 16 +- .../pages/fr/about/security-reporting.mdx | 11 +- .../fr/download/package-manager/current.mdx | 1 - .../fr/download/package-manager/index.mdx | 1 - .../fr/download/prebuilt-binaries/current.mdx | 1 - .../fr/download/prebuilt-binaries/index.mdx | 1 - .../download/prebuilt-installer/current.mdx | 1 - .../fr/download/prebuilt-installer/index.mdx | 1 - .../pages/fr/download/source-code/current.mdx | 1 - .../pages/fr/download/source-code/index.mdx | 1 - apps/site/pages/fr/index.mdx | 169 ++++---- apps/site/pages/id/about/branding.mdx | 12 +- apps/site/pages/id/about/index.mdx | 18 +- .../pages/id/about/security-reporting.mdx | 6 +- .../id/download/package-manager/current.mdx | 1 - .../id/download/package-manager/index.mdx | 1 - .../id/download/prebuilt-binaries/current.mdx | 1 - .../id/download/prebuilt-binaries/index.mdx | 1 - .../download/prebuilt-installer/current.mdx | 1 - .../id/download/prebuilt-installer/index.mdx | 1 - .../pages/id/download/source-code/current.mdx | 1 - .../pages/id/download/source-code/index.mdx | 1 - apps/site/pages/id/index.mdx | 173 ++++---- apps/site/pages/ja/about/index.mdx | 16 +- apps/site/pages/ko/about/branding.mdx | 12 +- apps/site/pages/ko/about/index.mdx | 16 +- .../pages/ko/about/security-reporting.mdx | 11 +- .../ko/download/package-manager/current.mdx | 4 +- .../ko/download/package-manager/index.mdx | 4 +- .../ko/download/prebuilt-binaries/current.mdx | 3 +- .../ko/download/prebuilt-binaries/index.mdx | 3 +- .../download/prebuilt-installer/current.mdx | 3 +- .../ko/download/prebuilt-installer/index.mdx | 3 +- .../pages/ko/download/source-code/current.mdx | 4 +- .../pages/ko/download/source-code/index.mdx | 4 +- apps/site/pages/ko/index.mdx | 169 ++++---- apps/site/pages/pt/about/index.mdx | 16 +- .../pages/pt/about/security-reporting.mdx | 11 +- apps/site/pages/tr/about/index.mdx | 16 +- .../pages/tr/about/security-reporting.mdx | 11 +- apps/site/pages/uk/about/branding.mdx | 12 +- apps/site/pages/uk/about/index.mdx | 16 +- .../pages/uk/about/security-reporting.mdx | 11 +- .../uk/download/package-manager/current.mdx | 1 - .../uk/download/package-manager/index.mdx | 1 - .../uk/download/prebuilt-binaries/current.mdx | 1 - .../uk/download/prebuilt-binaries/index.mdx | 1 - .../download/prebuilt-installer/current.mdx | 1 - .../uk/download/prebuilt-installer/index.mdx | 1 - .../pages/uk/download/source-code/current.mdx | 1 - .../pages/uk/download/source-code/index.mdx | 1 - apps/site/pages/uk/index.mdx | 171 ++++---- apps/site/pages/zh-cn/about/index.mdx | 18 +- .../pages/zh-cn/about/security-reporting.mdx | 11 +- apps/site/pages/zh-tw/about/index.mdx | 16 +- .../pages/zh-tw/about/security-reporting.mdx | 11 +- packages/i18n/locales/es.json | 327 +++++++++++++++ 78 files changed, 1788 insertions(+), 724 deletions(-) create mode 100644 apps/site/pages/es/about/branding.mdx create mode 100644 apps/site/pages/es/about/get-involved/collab-summit.md create mode 100644 apps/site/pages/es/about/get-involved/events.mdx create mode 100644 apps/site/pages/es/about/get-involved/index.md create mode 100644 apps/site/pages/es/about/governance.md create mode 100644 apps/site/pages/es/about/index.mdx create mode 100644 apps/site/pages/es/about/previous-releases.mdx create mode 100644 apps/site/pages/es/about/security-reporting.mdx create mode 100644 apps/site/pages/es/download/package-manager/all.md create mode 100644 apps/site/pages/es/download/package-manager/current.mdx create mode 100644 apps/site/pages/es/download/package-manager/index.mdx create mode 100644 apps/site/pages/es/download/prebuilt-binaries/current.mdx create mode 100644 apps/site/pages/es/download/prebuilt-binaries/index.mdx create mode 100644 apps/site/pages/es/download/prebuilt-installer/current.mdx create mode 100644 apps/site/pages/es/download/prebuilt-installer/index.mdx create mode 100644 apps/site/pages/es/download/source-code/current.mdx create mode 100644 apps/site/pages/es/download/source-code/index.mdx create mode 100644 packages/i18n/locales/es.json diff --git a/apps/site/pages/es/about/branding.mdx b/apps/site/pages/es/about/branding.mdx new file mode 100644 index 0000000000000..36ceead6ad870 --- /dev/null +++ b/apps/site/pages/es/about/branding.mdx @@ -0,0 +1,74 @@ +--- +title: Marca de Node.js +layout: about +--- + +Marca de Node.js + +Por favor revise la [política de la marca comercial](https://trademark-policy.openjsf.org/) para información desde el uso de logos y marcas de Node.js®. + +## Mascota de Node.js® + +Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por diseñar y contribuir con la Tortuga Cohete. + +Mascota de Node.js + +## Logo de Node.js® + +### Logo Horizontal de Node.js® + + + + + + + + + +
+ Logo Horizontal Oscuro de Node.js + + Logo Horizontal Claro de Node.js +
+ +### Logo Apilado de Node.js® + + + + + + + + + + + + + + + +
+ Logo Apilado Oscuro de Node.js + + Logo Apilado Claro de Node.js +
+ Logo Apilado Negro de Node.js + + Logo Apilado Blanco de Node.js +
+ +### Iconos de JS + + + + + + + + + +
+ Iconos Verde de JS + + Iconos Blanco de JS +
diff --git a/apps/site/pages/es/about/get-involved/collab-summit.md b/apps/site/pages/es/about/get-involved/collab-summit.md new file mode 100644 index 0000000000000..ec5410c19d26a --- /dev/null +++ b/apps/site/pages/es/about/get-involved/collab-summit.md @@ -0,0 +1,17 @@ +--- +title: Cumbre de Colaboradores +layout: about +--- + +# Cumbre de Colaboradores + +La Cumbre de Colaboración de Node.js es una no-conferencia que reúne a contribuyentes actuales y potenciales para discutir sobre Node.js con una colaboración activa, educación y intercambio de conocimientos. Equipos, grupos de trabajo y contribuyentes de la comunidad se reúnen dos veces al año para tener discusiones que ayuden en la toma de decisiones, además de trabajar en esfuerzos emocionantes que desean impulsar en persona. + +## ¿Quién asiste? + +A la Cumbre de Colaboración asisten principalmente contribuyentes existentes y miembros de la comunidad, pero también da la bienvenida a aquellos que aún no son contribuyentes y desean unirse. Si eres nuevo o nueva contribuyendo a Node.js, la Cumbre de Colaboración puede ser una buena oportunidad para ayudarle a aprender lo que está sucediendo dentro de la comunidad y contribuir con las habilidades que tiene y le gustaría perfeccionar. + +Antes de la cumbre, los contribuyentes y miembros de la comunidad envían propuestas de sesiones para +crear una agenda. Los asistentes pueden familiarizarse con la sesión antes llegar al sitio, tener conversaciones generales con los colaboradores y luego introducirse en sesiones. También habrá muchas oportunidades para charlas de pasillo y lluvias de ideas. + +Para obtener información sobre las próximas y pasadas Cumbres de Colaboración, consulta el [repositorio de la Cumbre](https://github.com/openjs-foundation/summit). Echa un vistazo a los [issues creadas](https://github.com/nodejs/summit/issues) donde se comparte lo que los contribuidores y miembros de la comunidad proponen discutir en persona. diff --git a/apps/site/pages/es/about/get-involved/events.mdx b/apps/site/pages/es/about/get-involved/events.mdx new file mode 100644 index 0000000000000..e41d8fad2b28f --- /dev/null +++ b/apps/site/pages/es/about/get-involved/events.mdx @@ -0,0 +1,16 @@ +--- +title: Próximos Eventos +layout: about +--- + +## Próximos Eventos + +Los eventos de Node.js son abiertos y están disponibles a todo el público. Todo el mundo es bienvenido para unirse y participar. + +### Próximos Eventos de Node.js® + +El proyecto Node.js celebra numerosas reuniones a lo largo del año para discutir y planificar aspectos del proyecto. + +Los siguientes eventos se celebrarán en los próximos 7 días. + + diff --git a/apps/site/pages/es/about/get-involved/index.md b/apps/site/pages/es/about/get-involved/index.md new file mode 100644 index 0000000000000..b54e635612ce6 --- /dev/null +++ b/apps/site/pages/es/about/get-involved/index.md @@ -0,0 +1,36 @@ +--- +title: Participar +layout: about +--- + +# Participar + +Si estás interesado en colaborar con la comunidad de Node.js, hay muchas maneras de hacerlo. El proyecto de Node.js es una comunidad grande y diversa, y hay muchas formas de contribuir, más allá de solo escribir código. + +## Discusión de la Comunidad + +- La [lista de issues de GitHub](https://github.com/nodejs/node/issues) es el lugar para discutir las características centrales de Node.js, y si tienes preguntas sobre Node.js, puedes usar las [discusiones de GitHub](https://github.com/orgs/nodejs/discussions). +- El repositorio [`nodejs/help`](https://github.com/nodejs/help/issues) es el lugar para hacer preguntas sobre Node.js. +- La cuenta oficial de Node.js en Twitter es [nodejs](https://twitter.com/nodejs). +- El [calendario del proyecto Node.js](https://nodejs.org/calendar) con todos los encuentros públicos. + +## Material de Aprendizaje + +Si estás buscando aprender más sobre Node.js, hay muchos recursos disponibles para ti. + +- [Sección oficial de aprendizaje](https://nodejs.org/es/learn/) de la web de Node.js. +- [Documentación oficial de referencia de la API](https://nodejs.org/api/). +- [NodeSchool.io](https://nodeschool.io/) te enseñará conceptos de Node.js a través de juegos interactivos en la línea de comandos. +- [La etiqueta de Node.js en Stack Overflow](https://stackoverflow.com/questions/tagged/node.js) recopila nueva información a diario. +- [La etiqueta de Node.js en la comunidad de DEV](https://dev.to/t/node) es un lugar donde compartir proyectos de Node.js, artículos y tutoriales, así como comenzar debates y pedir opinión sobre temas relacionados con Node.js. Desarrolladores y desarrolladoras de todos los niveles son bienvenidos para formar parte. +- La [comunidad de Node.js en Reddit](https://www.reddit.com/r/node) es un lugar para compartir proyectos, artículos y tutoriales de Node.js, así como para iniciar discusiones y pedir retroalimentación sobre temas relacionados con Node.js. Desarrolladores de todos los niveles de habilidad son bienvenidos a participar. + +## Áreas de Discusión No Oficiales + +Si estás buscando un lugar más informal para discutir sobre Node.js, hay varias áreas de discusión no oficiales. Ten en cuenta que estas no son respaldadas oficialmente por el proyecto de Node.js. También sigue su respectivo código de conducta/reglas. + +- [Node Slackers](https://www.nodeslackers.com/) es una comunidad de slack enfocada en Node.js. +- [OpenJSF Slack](https://slack-invite.openjsf.org/) es un espacio de trabajo en Slack para la Fundación OpenJS. Hay varios canales relacionados con Node.js. _(los canales con el prefijo `#nodejs-` están relacionados con el proyecto)_ +- [Nodeiflux](https://discordapp.com/invite/vUsrbjd) es una comunidad amistosa de desarrolladores y desarrolladoras backend de Node.js que se ayudan mutuamente en Discord. +- [ES Community](https://discord.gg/zJsuc6vvhn) es una comunidad de Discord para desarrolladores de JavaScript que hablan francés. +- `irc.libera.chat` en el canal `#node.js` con un [cliente IRC](https://es.wikipedia.org/wiki/Comparaci%C3%B3n_de_clientes_de_Internet_Relay_Chat) o conéctate en tu navegador web al canal usando [un cliente web](https://kiwiirc.com/nextclient/). diff --git a/apps/site/pages/es/about/governance.md b/apps/site/pages/es/about/governance.md new file mode 100644 index 0000000000000..92eca9e99ac0e --- /dev/null +++ b/apps/site/pages/es/about/governance.md @@ -0,0 +1,31 @@ +--- +title: Gobernanza del Proyecto +layout: about +--- + +# Gobernanza del Proyecto + +## Proceso de Búsqueda de Consenso + +El proyecto Node.js sigue un modelo de toma de decisiones basado en la [Búsqueda de Consenso][]. + +## Colaboradores + +El repositorio principal de GitHub [nodejs/node][] es mantenido por los Colaboradores, quienes son nominados por otros Colaboradores existentes de manera continua. + +Las personas que realizan contribuciones significativas y valiosas se convierten en Colaboradores y se les otorga permisos de escritura al proyecto. Estas personas son identificadas por otros Colaboradores y su nominación es discutida con los Colaboradores existentes. + +Para ver el listado actual de Colaboradores/as, revisa el [README.md][] del proyecto. + +La guía para Colaboraciones es mantenida en [collaborator-guide.md][]. + +## Comité Directivo Técnico + +El proyecto está gobernado por el [Comité Técnico de Dirección (TSC)][] que es responsable de la orientación de alto nivel del proyecto. El TSC es un subconjunto de Colaboradores activos que son nominados por otros miembros existentes del TSC. + +[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 +[technical steering committee (tsc)]: https://github.com/nodejs/TSC/blob/main/TSC-Charter.md +[collaborator-guide.md]: https://github.com/nodejs/node/blob/main/doc/contributing/collaborator-guide.md +[nodejs/node]: https://github.com/nodejs/node diff --git a/apps/site/pages/es/about/index.mdx b/apps/site/pages/es/about/index.mdx new file mode 100644 index 0000000000000..b9f211b01e657 --- /dev/null +++ b/apps/site/pages/es/about/index.mdx @@ -0,0 +1,63 @@ +--- +title: Sobre Node.js® +layout: about +--- + +Sobre Node.js® + +Concebido como un entorno de ejecución JavaScript asíncrono basado en eventos, Node.js está diseñado para construir aplicaciones de red escalables. En el siguiente ejemplo de 'hola mundo', se pueden manejar muchas conexiones de manera concurrente. Por cada conexión el callback sera ejecutado, sin embargo si no hay trabajo que hacer, Node.js entrará en reposo. + +```cjs +const { createServer } = require('node:http'); + +const hostname = '127.0.0.1'; +const port = 3000; + +const server = createServer((req, res) => { +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); +}); + +server.listen(port, hostname, () => { +console.log(`Server running at http://${hostname}:${port}/`); +}); +``` + +```mjs +import { createServer } from 'node:http'; + +const hostname = '127.0.0.1'; +const port = 3000; + +const server = createServer((req, res) => { +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); +}); + +server.listen(port, hostname, () => { +console.log(`Server running at http://${hostname}:${port}/`); +}); +``` + +Esto contrasta con el modelo de concurrencia más común de hoy en día, en el que se emplean hilos del Sistema Operativo. Las redes basadas en hilos son relativamente ineficientes y muy difíciles de usar. Además, los usuarios de Node.js están libres de preocuparse por el bloqueo del proceso, ya que no existe. Casi ninguna función en Node.js realiza I/O directamente, por lo que el proceso nunca se bloquea. Por ello, es muy propicio desarrollar sistemas escalables en Node.js. + +Si algo de esta explicación le resulta poco familiar, aquí hay un artículo completo sobre ello [Bloqueante vs. No-Bloqueante][]. + +--- + +Node.js es similar en diseño a sistemas como Ruby y está influenciado por ellos. +[Máquina de eventos][] y [Twisted][] de Python. Node.js lleva el modelo de eventos un poco más allá. Presenta un bucle de eventos como una construcción en tiempo de ejecución en lugar de una biblioteca. En otros sistemas, siempre hay una llamada de bloqueo para iniciar el ciclo de eventos. +Normalmente, el comportamiento se define mediante devoluciones de llamada al principio de un script y, al final, se inicia un servidor mediante una llamada de bloqueo como `EventMachine::run()`. +En Node.js, no existe tal llamada de inicio del ciclo de eventos. Node.js simplemente ingresa al bucle de eventos después de ejecutar el script de entrada. Node.js sale del bucle de eventos cuando no hay más devoluciones de llamada para realizar. Este comportamiento es similar al JavaScript del navegador: El bucle de eventos está oculto para el usuario. + +HTTP es un ciudadano de primera clase en Node.js, diseñado teniendo en cuenta la transmisión y la baja latencia. Esto hace que Node.js sea muy adecuado para la base de una biblioteca o framework web. + +El hecho de que Node.js esté diseñado sin hilos no significa que no puedas aceptar la ventaja de múltiples núcleos en su entorno. Los procesos secundarios se pueden generar utilizando nuestra API [`child_process.fork()`][] y están diseñados para que sea fácil comunicarse con ellos. Construido sobre esa misma interfaz se encuentra el módulo [`cluster`][], que le permite compartir sockets entre procesos para permitir el equilibrio de carga en sus núcleos. + +[bloqueante vs no-bloqueante]: /learn/asynchronous-work/overview-of-blocking-vs-non-blocking +[`child_process.fork()`]: https://nodejs.org/api/child_process.html +[`cluster`]: https://nodejs.org/api/cluster.html +[máquina de eventos]: https://github.com/eventmachine/eventmachine +[torcido]: https://twisted.org/ diff --git a/apps/site/pages/es/about/previous-releases.mdx b/apps/site/pages/es/about/previous-releases.mdx new file mode 100644 index 0000000000000..d13f8b51ac065 --- /dev/null +++ b/apps/site/pages/es/about/previous-releases.mdx @@ -0,0 +1,25 @@ +--- +title: Versiones de Node.js +layout: about +--- + +Versiones de Node.js + +Las versiones principales de Node.js entran en estado de lanzamiento _Actual_ durante seis meses, lo que les da a los autores de bibliotecas tiempo para agregarles manutención. +Después de seis meses, las versiones impares (9, 11, etc.) dejan de ser compatibles y las versiones pares (10, 12, etc.) pasan al estado _LTS Activo_ y están listas para uso general. +El estado de la versión _LTS_ es "soporte a largo plazo", que normalmente garantiza que los errores críticos se corregirán durante un total de 30 meses. +Las aplicaciones de producción solo deben usar versiones _LTS Activo_ o _LTS en Mantenimiento_. + +## Calendario de Lanzamiento + +![Lanzamientos](https://raw.githubusercontent.com/nodejs/Release/main/schedule.svg?sanitize=true) + +Los detalles completos sobre el calendario de lanzamiento de Node.js están disponibles [en GitHub](https://github.com/nodejs/release#release-schedule). + +### Soporte Comercial + +El soporte comercial para versiones posteriores a la fase de Mantenimiento está disponible a través de nuestro socio del Programa de Sostenibilidad del Ecosistema OpenJS, [HeroDevs.](https://herodevs.com/). + +## ¿Buscando las últimas versiones de una rama específica? + + diff --git a/apps/site/pages/es/about/security-reporting.mdx b/apps/site/pages/es/about/security-reporting.mdx new file mode 100644 index 0000000000000..0cc5351ce5d68 --- /dev/null +++ b/apps/site/pages/es/about/security-reporting.mdx @@ -0,0 +1,60 @@ +--- +title: Reportes de Seguridad +layout: about +--- + +Reportes de Seguridad + +Para más detalles de las Políticas de Seguridad activas, revise esta [página](https://github.com/nodejs/node/security/policy). + +## Reportando errores en Node.js + +Reporta errores de seguridad de Node.js atreves de [HackerOne](https://hackerone.com/nodejs). + +Su informe será reconocido dentro de 5 días, y recibirás una respuesta más detallada a tu informe dentro de 10 días donde indicara los próximos pasos para manejar su entrega. + +Después de la respuesta inicial a tu informe, el equipo de seguridad se esforzará por mantenerte informado sobre el progreso hacia una solución y el anuncio completo, y puede solicitar información adicional u orientación sobre el problema reportado. + +### Programa de recompensas por errores de Node.js + +El proyecto Node.js participa en un programa oficial de recompensas por errores para investigadores de seguridad y divulgaciones públicas responsables. El programa se gestiona a través de la plataforma HackerOne. Consulte [https://hackerone.com/nodejs](https://hackerone.com/nodejs) por más detalles. + +## Reportar un error en un módulo de terceros + +Los errores de seguridad dentro de módulos de terceros deben ser reportados a sus respectivos +mantenedores. + +## Política de divulgación + +Aquí está la política de divulgación de seguridad para Node.js: + +El informe de seguridad es recibido y se asigna a un responsable principal. Esta persona coordinará el proceso de corrección y lanzamiento. El problema es confirmado y se determina una lista de todas las versiones afectadas. Se audita el código para encontrar posibles problemas similares. Se preparan correcciones para todas las versiones que aún están en mantenimiento. Estas correcciones no se comprometen al repositorio público, sino que se mantienen localmente a la espera del anuncio. + +Se elige una fecha de embargo sugerida para esta vulnerabilidad y un CVE (Vulnerabilidades y Exposiciones Comunes (CVE®)) será solicitado para la vulnerabilidad. + +En la fecha de embargo, se envía una copia del anuncio a la lista de correo de seguridad de Node.js. Los cambios se suben al repositorio público y se despliegan nuevas versiones en nodejs.org. Dentro de las 6 horas posteriores a que se notifique a la lista de correo, se publicará una copia del aviso en el blog de Node.js. + +Típicamente la fecha de embargo será fijada 72 horas desde la creación del CVE. Sin embargo, esto puede variar dependiendo de la severidad del error o la dificultad en aplicar la solución. + +Este proceso puede tomar algún tiempo, especialmente cuando se requiere coordinación con los mantenedores de otros proyectos. Cada esfuerzo posible se hará para encargarse del error en la forma más oportuna posible, sin embargo, es importante que sigamos el proceso descrito arriba, para asegurarse que la divulgación sea manejada de una manera consistente. + +## Recibiendo actualizaciones de seguridad + +Las notificaciones de seguridad se distribuirán mediante los siguientes métodos. + +[Grupo de Google](https://groups.google.com/group/nodejs-sec) +[Blog de Node.js](/blog) + +## Comentarios sobre esta política + +Si tienes sugerencias sobre cómo podría mejorarse este proceso, por favor, envía una +[pull request](https://github.com/nodejs/nodejs.org) o +[rellena un issue](https://github.com/nodejs/security-wg/issues/new) para discutirlo. + +## Mejores Prácticas de la OpenSSF + + +Insignia OpenSSF + + +La [Insignia de Buenas Prácticas](https://github.com/coreinfrastructure/best-practices-badge) de la Fundación de Seguridad del Software Abierto (OpenSSF) es una manera en que los proyectos de Software Libre y de Código Abierto (FLOSS) pueden mostrar que siguen las mejores prácticas. Los proyectos pueden auto-certificarse voluntariamente sobre cómo siguen cada buena práctica. Los consumidores de la insignia pueden evaluar rápidamente qué proyectos FLOSS siguen las mejores prácticas y, como resultado, tienen más probabilidades de producir software seguro de alta calidad. diff --git a/apps/site/pages/es/download/package-manager/all.md b/apps/site/pages/es/download/package-manager/all.md new file mode 100644 index 0000000000000..e3d87b3af2a9d --- /dev/null +++ b/apps/site/pages/es/download/package-manager/all.md @@ -0,0 +1,393 @@ +--- +layout: article +title: Instalando Node.js mediante un gestor de paquetes +--- + +# Instalando Node.js mediante un Gestor de Paquetes + +> Los paquetes de esta página son mantenidos y respaldados por sus respectivos empaquetadores, **no** por el equipo central de Node.js. Informe cualquier problema que encuentre al responsable del paquete. Si resulta que su problema es un error en el propio Node.js, el responsable del mantenimiento informará el problema al equipo principal. + +## Alpine Linux + +Las versiones LTS de Node.js y los paquetes de npm están disponibles en el Repositorio Principal. + +```bash +apk add nodejs npm +``` + +La versión actual de Node.js puede ser instalada desde el Repositorio de la Comunidad. + +```bash +apk add nodejs-current +``` + +## Android + +El soporte para Android todavía es experimental en Node.js, por lo que los desarrolladores de Node.js aún no proporcionan los binarios precompilados. + +Sin embargo, hay algunas soluciones de terceros. Por ejemplo, la comunidad [Termux](https://termux.com/) que proporciona un emulador de terminal y un entorno Linux para Android, así como un administrador de paquetes propio y una [amplia colección](https://github.com/termux/termux-packages) de aplicaciones precompiladas. Este comando en la aplicación Termux instalará la última versión disponible de Node.js: + +```bash +pkg install nodejs +``` + +Actualmente, los binarios de Node.js para Termux están enlazados contra `system-icu` (dependiente del paquete `libicu`). + +## Arch Linux + +Los paquetes para Node.js y npm están disponibles en el repositorio de la comunidad. + +```bash +pacman -S nodejs npm +``` + +## CentOS, Fedora y Red Hat Enterprise Linux + +Node.js está disponible como módulo llamado `nodejs` en CentOS/RHEL 8 y Fedora. + +```bash +dnf module install nodejs: +``` + +donde `` corresponde a la versión mayor de Node.js. +Para ver una lista de las versiones disponibles: + +```bash +dnf module list nodejs +``` + +Por ejemplo, para instalar Node.js 18: + +```bash +dnf module install nodejs:18/common +``` + +### Alternativas + +Estos recursos proporcionan paquetes compatibles con CentOS, Fedora, y RHEL. + +- [Node.js snaps](#snap) mantenido y soportado en https://github.com/nodejs/snap +- [Distribuciones de binarios de Node.js](#debian-and-ubuntu-based-linux-distributions) son mantenidas y soportadas por [NodeSource](https://github.com/nodesource/distributions) + +## Distribuciones Linux basadas en Debian y Ubuntu + +Las [distribuciones de binarios Node.js](https://github.com/nodesource/distributions) están disponibles desde NodeSource. + +### Alternativas + +Los paquetes compatibles con distribuciones Linux basadas en Debian y Ubuntu están disponibles a través de [Node.js snaps](#snap). + +## Exherbo Linux + +Los paquetes de Node.js y npm están disponibles en el [repositorio arbor](https://gitlab.exherbo.org/exherbo/arbor/-/tree/master/packages/dev-lang/node). + +```bash +cave resolve -x node +``` + +## fnm + +Un gestor de versiones de Node.js rápido y simple, construido en Rust, utilizado para gestionar múltiples versiones de Node.js lanzadas. Te permite realizar operaciones como instalar, desinstalar, cambiar versiones de Node automáticamente según el directorio actual, etc. +Para instalar fnm, utiliza este [script de instalación](https://github.com/Schniz/fnm#using-a-script-macoslinux). + +fnm tiene soporte multiplataforma (macOS, Windows, Linux) y todas las shells populares (Bash, Zsh, Fish, PowerShell, símbolo de la línea de comandos de Windows). +fnm está diseñado teniendo en cuenta la velocidad y la compatibilidad con archivos `.node-version` y `.nvmrc`. + +## FreeBSD + +La versión más reciente de Node.js está disponible a través del puerto [www/node](https://www.freshports.org/www/node). + +Instala el paquete de binarios con [pkg](https://www.freebsd.org/cgi/man.cgi?pkg): + +```bash +pkg install node +``` + +O compílalo por tu cuenta utilizando [ports](https://www.freebsd.org/cgi/man.cgi?ports): + +```bash +cd /usr/ports/www/node && make install +``` + +## Gentoo + +Node.js está disponible en el árbol de portage. + +```bash +emerge nodejs +``` + +## IBM i + +Las versiones LTS de Node.js están disponibles en IBM y están disponibles a través de [el administrador de paquetes 'yum'](https://ibm.biz/ibmi-rpms). El nombre del paquete es `nodejs` seguido del número de versión principal (por ejemplo, `nodejs18`, `nodejs20`, etc.) + +Para instalar Node.js 20.x desde la línea de comandos, ejecute lo siguiente como usuario con autoridad especial: + +```bash +yum install nodejs20 +``` + +Node.js también se puede instalar con el producto IBM i Access Client Solutions. Consulte [este documento de soporte](http://www-01.ibm.com/support/docview.wss?uid=nas8N1022619) para obtener más detalles + +## macOS + +Descarga el [Instalador de macOS](/#home-downloadhead) directamente desde la web de [nodejs.org](https://nodejs.org/). + +_Si quieres descargar el paquete con bash:_ + +```bash +curl "https://nodejs.org/dist/latest/$(curl -s https://nodejs.org/dist/latest/ | grep "pkg" | cut -d'"' -f 2)" -o "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/" +``` + +### Alternativas + +Utiliza **[Homebrew](https://brew.sh/)**: + +```bash +brew install node +``` + +Utilizando **[MacPorts](https://www.macports.org/)**: + +```bash +port install nodejs + +# Example +port install nodejs7 +``` + +Utilizando **[pkgsrc](https://pkgsrc.joyent.com/install-on-macos/)**: + +Instala el paquete de binarios: + +```bash +pkgin -y install nodejs +``` + +O construye manualmente desde pkgsrc: + +```bash +cd pkgsrc/lang/nodejs && bmake install +``` + +## n + +`n` es un administrador de versiones de Node.js fácil de usar para Mac y Linux. Especifique la versión de destino para instalar utilizando una sintaxis enriquecida o selecciónela de un menú de versiones descargadas previamente. Las versiones se instalan en todo el sistema o en todo el usuario y, para un uso más específico, puede ejecutar una versión directamente desde las descargas en caché. + +Visita la [página principal](https://github.com/tj/n) para ver los métodos de instalación (bootstrap, npm, Homebrew, third-party), y todos los detalles de uso. + +Si ya tienes `npm`, entonces instala `n` y a continuación obtener la última versión LTS de `node` es tan simple como: + +``` +npm install -g n +n lts +``` + +## NetBSD + +Node.js está disponible en el árbol de pkgsrc: + +```bash +cd /usr/pkgsrc/lang/nodejs && make install +``` + +O instala un paquete binario (si está disponible para tu plataforma) utilizando pkgin: + +```bash +pkgin -y install nodejs +``` + +## Nodenv + +`nodenv` es un administrador de versiones de node liviano, similar a `nvm`. Es simple y predecible. Un rico ecosistema de complementos le permite adaptarlo a sus necesidades. Utilice `nodenv` para elegir una versión de Node para su aplicación y garantizar que su entorno de desarrollo coincida con la producción. + +Las instrucciones de instalación de Nodenv están mantenidas [en su página de Github](https://github.com/nodenv/nodenv#installation). Por favor, visita esta página para asegurarte de que sigues los pasos de instalación de la última versión. + +## nvm + +Node Version Manager es un script de bash que se utiliza para administrar múltiples versiones publicadas de Node.js. Eso permite realizar operaciones como instalar, desinstalar, cambiar de versión, etc. +Para instalar nvm, utilice este [script de instalación](https://github.com/nvm-sh/nvm#install--update-script). + +En sistemas Unix / OS X, Node.js compilado desde el código fuente puede instalarse usando [nvm](https://github.com/creationix/nvm) instalándolo en la ubicación que nvm espera: + +```bash +env VERSION=`python tools/getnodeversion.py` make install DESTDIR=`nvm_version_path v$VERSION` PREFIX="" +``` + +Después de esto, puedes usar `nvm` para cambiar entre versiones publicadas y versiones +compiladas desde la fuente. +Por ejemplo, si la versión de Node.js es v8.0.0-pre: + +```bash +nvm use 8 +``` + +Una vez que salga el lanzamiento oficial, querrás desinstalar la versión creada desde la fuente: + +```bash +nvm uninstall 8 +``` + +## nvs + +#### Windows + +El administrador de versiones `nvs` es multiplataforma y se puede usar en sistemas Windows, macOS y tipo Unix + +Para instalar `nvs` en Windows, vaya a la [página de lanzamiento](https://github.com/jasongin/nvs/releases) aquí y descargue el archivo de instalación MSI de la última versión. + +También puedes utilizar `chocolatey` para instalarlo: + +```bash +choco install nvs +``` + +#### macOS,UnixLike + +Puede encontrar la documentación sobre los pasos de instalación de `nvs` en sistemas tipo macOS/Unix [aquí](https://github.com/jasongin/nvs/blob/master/doc/SETUP.md#mac-linux) + +#### Uso + +Después de esto, puedes usar `nvs` para cambiar entre diferentes versiones de node. + +Para añadir la última versión de node: + +```bash +nvs add latest +``` + +O para añadir la última versión LTS de node: + +```bash +nvs add lts +``` + +Después ejecuta el comando `nvs use` para añadir una versión de node a tu `PATH` en la shell actual: + +```bash +$ nvs use lts +PATH -= %LOCALAPPDATA%\nvs\default +PATH += %LOCALAPPDATA%\nvs\node\14.17.0\x64 +``` + +Para añadirlo al `PATH` permanentemente, utiliza `nvs link`: + +```bash +nvs link lts +``` + +## OpenBSD + +Node.js está disponible a través del sistema de puertos. + +```bash +/usr/ports/lang/node +``` + +Utilizando [pkg_add](https://man.openbsd.org/OpenBSD-current/man1/pkg_add.1) en OpenBSD: + +```bash +pkg_add node +``` + +## openSUSE y SLE + +Node.js está disponible en los repositorios principales en los siguientes paquetes: + +- **openSUSE Leap 15.2**: `nodejs10`, `nodejs12`, `nodejs14` +- **openSUSE Tumbleweed**: `nodejs20` +- **SUSE Linux Enterprise Server (SLES) 12**: `nodejs10`, `nodejs12`, and `nodejs14` + (El módulo de Web y Scripting debe estar [habilitado](https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12-SP5/#intro-modulesExtensionsRelated).) +- **SUSE Linux Enterprise Server (SLES) 15 SP2**: `nodejs10`, `nodejs12`, and `nodejs14` + (El módulo de Web y Scripting debe estar [habilitado](https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/#Intro.Module).) + +Por ejemplo, para instalar Node.js 14.x en openSUSE Leap 15.2, ejecute lo siguiente como root: + +```bash +zypper install nodejs14 +``` + +Diferentes versiones mayores de Node pueden ser instaladas y utilizadas de forma concurrente. + +## SmartOS e illumos + +Las imágenes de SmartOS vienen con pkgsrc preinstalado. En otras distribuciones de illusmos, primero instale **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**, luego podrá instalar el paquete binario normalmente: + +```bash +pkgin -y install nodejs +``` + +O construye manualmente desde pkgsrc: + +```bash +cd pkgsrc/lang/nodejs && bmake install +``` + +## Snap + +[Node.js snaps](https://github.com/nodejs/snap) están disponibles como [`node`](https://snapcraft.io/node) en la tienda Snap. + +## Solus + +Solus proporciona Node.js en su repositorio principal. + +```bash +sudo eopkg install nodejs +``` + +## vfox + +Un gestor de versiones multi-plataforma(Windows, macOS, Linux) y **extensible**. + +Te permite tener **diferentes versiones para diferentes proyectos**, **diferentes versiones para diferentes shells**, y cambiar automáticamente las versiones de Node según el directorio actual, etc. + +Soporta todas las shells populares (Bash, Zsh, Fish, PowerShell, Clink, Cmder). + +Consulta el [inicio rápido](https://vfox.lhan.me/guides/quick-start.html) para usar vfox rápidamente y todos los detalles de uso. + +## Void Linux + +Void Linux incluye la versión estable de Node.js en el repositorio principal. + +```bash +xbps-install -Sy nodejs +``` + +## Windows + +Descarga el [Instalador de Windows](/#home-downloadhead) directamente desde la web de [nodejs.org](https://nodejs.org/). + +### Alternativas + +Usando **[Winget](https://aka.ms/winget-cli)**: + +```bash +winget install OpenJS.NodeJS +# or for LTS +winget install OpenJS.NodeJS.LTS +``` + +Después de ejecutar uno de los dos comandos anteriores, puede ser necesario reiniciar el emulador de terminal antes de que el comando CLI `node` esté disponible. + +Usando **[Chocolatey](https://chocolatey.org/)**: + +```bash +cinst nodejs +# or for full install with npm +cinst nodejs.install +``` + +Usando **[Scoop](https://scoop.sh/)**: + +```bash +scoop install nodejs +# or for LTS +scoop install nodejs-lts +``` + +## z/OS + +IBM® SDK para Node.js - z/OS® Está disponible en dos formatos de instalación, SMP/E y PAX. Seleccione el formato de instalación que le corresponda: + +- [Instalando y configurando la edición SMP/E de Node.js en z/OS](https://www.ibm.com/docs/en/sdk-nodejs-zos/14.0?topic=configuring-installing-smpe-edition) +- [Instalando y configurando la edición PAX de Node.js en z/OS](https://www.ibm.com/docs/en/sdk-nodejs-zos/14.0?topic=configuring-installing-pax-edition) diff --git a/apps/site/pages/es/download/package-manager/current.mdx b/apps/site/pages/es/download/package-manager/current.mdx new file mode 100644 index 0000000000000..15c29b9f1968a --- /dev/null +++ b/apps/site/pages/es/download/package-manager/current.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Instalar Node.js en utilizando + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión. + +Lee el artículo del blog para esta versión. + +Aprende a cómo verificar la firma SHASUMS + +Comprueba otros gestores de paquetes soportados por la comunidad +
diff --git a/apps/site/pages/es/download/package-manager/index.mdx b/apps/site/pages/es/download/package-manager/index.mdx new file mode 100644 index 0000000000000..9c401161c32f0 --- /dev/null +++ b/apps/site/pages/es/download/package-manager/index.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Instala Node.js en utilizando + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión + +Lee el artículo del blog para esta versión + +Aprende a cómo verificar la firma SHASUMS + +Comprueba otros gestores de paquetes soportados por la comunidad +
diff --git a/apps/site/pages/es/download/prebuilt-binaries/current.mdx b/apps/site/pages/es/download/prebuilt-binaries/current.mdx new file mode 100644 index 0000000000000..a6b14bba71c70 --- /dev/null +++ b/apps/site/pages/es/download/prebuilt-binaries/current.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión de Node.js para corriendo + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión + +Lee el artículo del blog para esta versión + +Aprende a cómo verificar la firma SHASUMS + +Comprueba los binarios pre construidos de Nightly o las Construcciones no oficiales para otras plataformas +
diff --git a/apps/site/pages/es/download/prebuilt-binaries/index.mdx b/apps/site/pages/es/download/prebuilt-binaries/index.mdx new file mode 100644 index 0000000000000..aebd6b490159a --- /dev/null +++ b/apps/site/pages/es/download/prebuilt-binaries/index.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión de Node.js para corriendo + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión. + +Lee el artículo del blog para esta versión. + +Aprende a cómo verificar la firma SHASUMS. + +Échale un vistazo a los binarios precompilados Nightly, todos los binarios precompilados de los Lanzamiento, o las versiones no oficiales para otras plataformas. +
diff --git a/apps/site/pages/es/download/prebuilt-installer/current.mdx b/apps/site/pages/es/download/prebuilt-installer/current.mdx new file mode 100644 index 0000000000000..d6a9735ee9328 --- /dev/null +++ b/apps/site/pages/es/download/prebuilt-installer/current.mdx @@ -0,0 +1,25 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión de Node.js para ejecutada en + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión + +Lee el artículo del blog para esta versión + +Aprende a cómo verificar la firma SHASUMS + +Vea todas las opciones de descarga de Node.js disponibles + +Aprende sobre Versiones de Node.js +
diff --git a/apps/site/pages/es/download/prebuilt-installer/index.mdx b/apps/site/pages/es/download/prebuilt-installer/index.mdx new file mode 100644 index 0000000000000..de341374dd88c --- /dev/null +++ b/apps/site/pages/es/download/prebuilt-installer/index.mdx @@ -0,0 +1,25 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión de Node.js para ejecutar en + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión. + +Lee el artículo del blog para esta versión. + +Aprende a cómo verificar la firma SHASUMS + +Vea todas las opciones de descarga de Node.js disponibles + +Aprende sobre Versiones de Node.js +
diff --git a/apps/site/pages/es/download/source-code/current.mdx b/apps/site/pages/es/download/source-code/current.mdx new file mode 100644 index 0000000000000..168ca24032753 --- /dev/null +++ b/apps/site/pages/es/download/source-code/current.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión del código fuente de Node.js. + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión. + +Lee el artículo del blog para esta versión. + +Aprende a cómo verificar la firma SHASUMS + +Consulta cómo construir Node.js desde el código fuente. +
diff --git a/apps/site/pages/es/download/source-code/index.mdx b/apps/site/pages/es/download/source-code/index.mdx new file mode 100644 index 0000000000000..6715c69cb2f78 --- /dev/null +++ b/apps/site/pages/es/download/source-code/index.mdx @@ -0,0 +1,23 @@ +--- +layout: download +title: Descargar Node.js® +subtitle: Descarga Node.js de la forma que quieras. +--- + +
+Quiero la versión del código fuente de Node.js. + + +
+ +
+Node.js incluye . + +Lee el historial para esta versión. + +Lee el artículo del blog para esta versión. + +Aprende a cómo verificar la firma SHASUMS + +Verifica cómo construir Node.js desde el código fuente. +
diff --git a/apps/site/pages/es/index.mdx b/apps/site/pages/es/index.mdx index ad0b661117331..933f6fd7a1bfc 100644 --- a/apps/site/pages/es/index.mdx +++ b/apps/site/pages/es/index.mdx @@ -4,131 +4,129 @@ layout: home ---
- - -
-

Ejecuta JavaScript en cualquier parte

- - Node.js® es un entorno de ejecución de JavaScript multiplataforma, - de código abierto y gratuito que permite a los desarrolladores crear servidores, - aplicaciones web, herramientas de línea de comando y scripts. - -
- -
- - {({ release }) => ( - <> - Descargar Node.js (LTS) - - Descarga Node.js {release.versionWithPrefix} - 1 con soporte a largo plazo. - Node.js también puede ser instalado a través de gestores de paquetes. - - - )} - - - - {({ release }) => ( + + +
+

Ejecuta JavaScript en cualquier parte

+ + Node.js® es un entorno de ejecución de JavaScript multiplataforma, + de código abierto y gratuito que permite a los desarrolladores crear servidores, + aplicaciones web, herramientas de línea de comando y scripts. +
+ +
+ + {({ release }) => ( + <> + Descargar Node.js (LTS) - ¿Quieres nuevas funciones más pronto? - ConsigueNode.js {release.versionWithPrefix} - 1 en vez. + Descarga Node.js {release.versionWithPrefix} + 1 con soporte a largo plazo. + Node.js también puede ser instalado a través de gestores de paquetes. - )} - - -
+ + )} +
+ + + {({ release }) => ( + + ¿Quieres nuevas funciones más pronto? + ConsigueNode.js {release.versionWithPrefix} + 1 en vez. + + )} + +
-
- ```js displayName="Create an HTTP Server" - // server.mjs - import { createServer } from 'node:http'; - - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` - -
- Aprenda más sobre lo que Node.js puede ofrecer con nuestros [Materiales de aprendizaje](/learn). +
+ ```js displayName="Create an HTTP Server" + // server.mjs + import { createServer } from 'node:http'; + + const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World!\n'); + }); + + // starts a simple http server locally on port 3000 + server.listen(3000, '127.0.0.1', () => { + console.log('Listening on 127.0.0.1:3000'); + }); + + // run with `node server.mjs` + ``` + + ```js displayName="Write Tests" + // tests.mjs + import assert from 'node:assert'; + import test from 'node:test'; + + test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); + }); + + test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); + }); + + // run with `node tests.mjs` + ``` + + ```js displayName="Read and Hash a File" + // crypto.mjs + import { createHash } from 'node:crypto'; + import { readFile } from 'node:fs/promises'; + + const hasher = createHash('sha1'); + + hasher.setEncoding('hex'); + // ensure you have a `package.json` file for this test! + hasher.write(await readFile('package.json')); + hasher.end(); + + const fileHash = hasher.read(); + + // run with `node crypto.mjs` + ``` + + ```js displayName="Streams Pipeline" + // streams.mjs + import { pipeline } from 'node:stream/promises'; + import { createReadStream, createWriteStream } from 'node:fs'; + import { createGzip } from 'node:zlib'; + + // ensure you have a `package.json` file for this test! + await pipeline + ( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') + ); + + // run with `node streams.mjs` + ``` + + ```js displayName="Work with Threads" + // threads.mjs + import { Worker, isMainThread, + workerData, parentPort } from 'node:worker_threads'; + + if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); + } else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); + } + + // run with `node threads.mjs` + ``` +
+ +Aprenda más sobre lo que Node.js puede ofrecer con nuestros [Materiales de aprendizaje](/learn).
diff --git a/apps/site/pages/fa/about/index.mdx b/apps/site/pages/fa/about/index.mdx index 1bc8bbe99714b..2d344a52bed70 100644 --- a/apps/site/pages/fa/about/index.mdx +++ b/apps/site/pages/fa/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/fa/about/security-reporting.mdx b/apps/site/pages/fa/about/security-reporting.mdx index ab8dafdc590ec..5060752c1d758 100644 --- a/apps/site/pages/fa/about/security-reporting.mdx +++ b/apps/site/pages/fa/about/security-reporting.mdx @@ -50,15 +50,8 @@ layout: about ## رویه‌های بهینه OpenSSF - - نشان OpenSSF + +نشان OpenSSF [نشان بهترین شیوه ها](https://github.com/coreinfrastructure/best-practices-badge) بنیاد امنیت متن باز (OpenSSF) راهی است برای پروژه‌های نرم‌افزار آزاد/رایگان و متن باز (FLOSS) تا نشان دهند که از رویه‌های بهینه پیروی می‌کنند. پروژه‌ها می‌توانند به صورت داوطلبانه خود تأیید کنند که چگونه از هر رویه بهینه پیروی می‌کنند. مصرف‌کنندگان این نشان می‌توانند به سرعت ارزیابی کنند که کدام پروژه‌های FLOSS از رویه‌های بهینه پیروی می‌کنند و در نتیجه احتمال بیشتری دارد که نرم‌افزارهای امن با کیفیت بالاتر تولید کنند. diff --git a/apps/site/pages/fr/about/branding.mdx b/apps/site/pages/fr/about/branding.mdx index bd7fe749280d8..7b1c241923000 100644 --- a/apps/site/pages/fr/about/branding.mdx +++ b/apps/site/pages/fr/about/branding.mdx @@ -11,13 +11,7 @@ Veuillez consulter la [politique en matière de marques](https://trademark-polic Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la conception et la contribution de la tortue-fusée. -Mascotte de Node.js +Mascotte de Node.js ## Logo Node.js® @@ -33,7 +27,6 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo horizontal clair de Node.js - @@ -50,7 +43,6 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo empilé clair de Node.js - @@ -61,7 +53,6 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo empilé blanc de Node.js - @@ -78,7 +69,6 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Icons JS Blanc - diff --git a/apps/site/pages/fr/about/index.mdx b/apps/site/pages/fr/about/index.mdx index c08e7bff80aa4..89ec644e63ba1 100644 --- a/apps/site/pages/fr/about/index.mdx +++ b/apps/site/pages/fr/about/index.mdx @@ -17,13 +17,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -34,13 +34,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/fr/about/security-reporting.mdx b/apps/site/pages/fr/about/security-reporting.mdx index b17332a3543ac..d811ded7a3dde 100644 --- a/apps/site/pages/fr/about/security-reporting.mdx +++ b/apps/site/pages/fr/about/security-reporting.mdx @@ -74,15 +74,8 @@ Si vous avez des suggestions sur la façon dont ce processus pourrait être amé ## OpenSSF Best Practices - - Badge OpenSSF + +Badge OpenSSF Le [badge des meilleures pratiques] de l'Open Source Security Foundation (OpenSSF) (https://github.com/coreinfrastructure/best-practices-badge) est un moyen pour les projets de logiciels libres et open source (FLOSS) de montrer qu'ils suivent les meilleures pratiques. Les projets peuvent volontairement auto-certifier la manière dont ils suivent chaque meilleure pratique. Les utilisateurs du badge peuvent rapidement déterminer quels sont les projets FLOSS qui suivent les meilleures pratiques et qui sont donc plus susceptibles de produire des logiciels sécurisés de meilleure qualité. diff --git a/apps/site/pages/fr/download/package-manager/current.mdx b/apps/site/pages/fr/download/package-manager/current.mdx index a7b2f9969b4f7..b0076bba81413 100644 --- a/apps/site/pages/fr/download/package-manager/current.mdx +++ b/apps/site/pages/fr/download/package-manager/current.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez d'autres gestionnaires de paquets soutenus par la communauté - diff --git a/apps/site/pages/fr/download/package-manager/index.mdx b/apps/site/pages/fr/download/package-manager/index.mdx index b9b4197b0960c..03287f36f11d7 100644 --- a/apps/site/pages/fr/download/package-manager/index.mdx +++ b/apps/site/pages/fr/download/package-manager/index.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez d'autres gestionnaires de paquets soutenus par la communauté - diff --git a/apps/site/pages/fr/download/prebuilt-binaries/current.mdx b/apps/site/pages/fr/download/prebuilt-binaries/current.mdx index dcdad7cc77e90..216c348100248 100644 --- a/apps/site/pages/fr/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/fr/download/prebuilt-binaries/current.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez les binaires préconstruits Nightly ou les Unofficial Builds pour d'autres plateformes. - diff --git a/apps/site/pages/fr/download/prebuilt-binaries/index.mdx b/apps/site/pages/fr/download/prebuilt-binaries/index.mdx index 4bed42857cf5d..6cd5fcaca7565 100644 --- a/apps/site/pages/fr/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/fr/download/prebuilt-binaries/index.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés. Consultez les binaires préconstruits Nightly, tous les binaires préconstruits Release ou Builds Non Officiels pour les autres plateformes. - diff --git a/apps/site/pages/fr/download/prebuilt-installer/current.mdx b/apps/site/pages/fr/download/prebuilt-installer/current.mdx index 1a51285899b70..d18e2db9e03f8 100644 --- a/apps/site/pages/fr/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/fr/download/prebuilt-installer/current.mdx @@ -22,5 +22,4 @@ Apprenez à vérifier les SHASUMSoptions de téléchargement de Node.js. En savoir plus sur les Versions Node.js - diff --git a/apps/site/pages/fr/download/prebuilt-installer/index.mdx b/apps/site/pages/fr/download/prebuilt-installer/index.mdx index b28ec06f8e16a..17233c160eaad 100644 --- a/apps/site/pages/fr/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/fr/download/prebuilt-installer/index.mdx @@ -22,5 +22,4 @@ Apprenez à vérifier les SHASUMSoptions de téléchargement de Node.js. En savoir plus sur les Versions Node.js - diff --git a/apps/site/pages/fr/download/source-code/current.mdx b/apps/site/pages/fr/download/source-code/current.mdx index d4fbc07f30be7..b4a6c1c8170eb 100644 --- a/apps/site/pages/fr/download/source-code/current.mdx +++ b/apps/site/pages/fr/download/source-code/current.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Découvrez comment compiler Node.js à partir des sources. - diff --git a/apps/site/pages/fr/download/source-code/index.mdx b/apps/site/pages/fr/download/source-code/index.mdx index d4fbc07f30be7..b4a6c1c8170eb 100644 --- a/apps/site/pages/fr/download/source-code/index.mdx +++ b/apps/site/pages/fr/download/source-code/index.mdx @@ -20,5 +20,4 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Découvrez comment compiler Node.js à partir des sources. - diff --git a/apps/site/pages/fr/index.mdx b/apps/site/pages/fr/index.mdx index 2cd1371107d46..e7ff5e8f88325 100644 --- a/apps/site/pages/fr/index.mdx +++ b/apps/site/pages/fr/index.mdx @@ -9,8 +9,7 @@ layout: home

Exécuter du JavaScript partout

-Node.js® est un environnement d'exécution JavaScript gratuit, open-source et multiplateforme qui permet aux développeurs de créer des serveurs, des applications web, des outils en ligne de commande et des scripts. - + Node.js® est un environnement d'exécution JavaScript gratuit, open-source et multiplateforme qui permet aux développeurs de créer des serveurs, des applications web, des outils en ligne de commande et des scripts.
@@ -45,93 +44,87 @@ Node.js® est un environnement d'exécution JavaScript gratuit, open-source et m // server.mjs import { createServer } from 'node:http'; -const server = createServer((req, res) => { -res.writeHead(200, { 'Content-Type': 'text/plain' }); -res.end('Hello World!\n'); -}); - -// starts a simple http server locally on port 3000 -server.listen(3000, '127.0.0.1', () => { -console.log('Listening on 127.0.0.1:3000'); -}); - -// run with `node server.mjs` - -```` - -```js displayName="Write Tests" -// tests.mjs -import assert from 'node:assert'; -import test from 'node:test'; - -test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); -}); - -test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); -}); - -// run with `node tests.mjs` -```` - -```js displayName="Read and Hash a File" -// crypto.mjs -import { createHash } from 'node:crypto'; -import { readFile } from 'node:fs/promises'; - -const hasher = createHash('sha1'); - -hasher.setEncoding('hex'); -// ensure you have a `package.json` file for this test! -hasher.write(await readFile('package.json')); -hasher.end(); - -const fileHash = hasher.read(); - -// run with `node crypto.mjs` -``` - -```js displayName="Streams Pipeline" -// streams.mjs -import { pipeline } from 'node:stream/promises'; -import { createReadStream, createWriteStream } from 'node:fs'; -import { createGzip } from 'node:zlib'; - -// ensure you have a `package.json` file for this test! -await pipeline( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') -); - -// run with `node streams.mjs` -``` - -```js displayName="Work with Threads" -// threads.mjs -import { - Worker, - isMainThread, - workerData, - parentPort, -} from 'node:worker_threads'; - -if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); -} else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); -} - -// run with `node threads.mjs` -``` - + const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World!\n'); + }); + + // starts a simple http server locally on port 3000 + server.listen(3000, '127.0.0.1', () => { + console.log('Listening on 127.0.0.1:3000'); + }); + + // run with `node server.mjs` + ``` + + ```js displayName="Write Tests" + // tests.mjs + import assert from 'node:assert'; + import test from 'node:test'; + + test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); + }); + + test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); + }); + + // run with `node tests.mjs` + ``` + + ```js displayName="Read and Hash a File" + // crypto.mjs + import { createHash } from 'node:crypto'; + import { readFile } from 'node:fs/promises'; + + const hasher = createHash('sha1'); + + hasher.setEncoding('hex'); + // ensure you have a `package.json` file for this test! + hasher.write(await readFile('package.json')); + hasher.end(); + + const fileHash = hasher.read(); + + // run with `node crypto.mjs` + ``` + + ```js displayName="Streams Pipeline" + // streams.mjs + import { pipeline } from 'node:stream/promises'; + import { createReadStream, createWriteStream } from 'node:fs'; + import { createGzip } from 'node:zlib'; + + // ensure you have a `package.json` file for this test! + await pipeline + ( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') + ); + + // run with `node streams.mjs` + ``` + + ```js displayName="Work with Threads" + // threads.mjs + import { Worker, isMainThread, + workerData, parentPort } from 'node:worker_threads'; + + if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); + } else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); + } + + // run with `node threads.mjs` + ```
Apprenez-en plus sur ce que Node.js est capable d'offrir avec notre [Matériel d'apprentissage](/learn). - diff --git a/apps/site/pages/id/about/branding.mdx b/apps/site/pages/id/about/branding.mdx index 503745304067a..58c108b838b20 100644 --- a/apps/site/pages/id/about/branding.mdx +++ b/apps/site/pages/id/about/branding.mdx @@ -11,13 +11,7 @@ Harap tinjau [kebijakan merek dagang](https://trademark-policy.openjsf.org/) unt Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) atas desain dan kontribusinya terhadap Rocket Turtle. -Node.js mascot +Node.js mascot ## Logo Node.js® @@ -33,7 +27,6 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Terang Horizontal Node.js® - @@ -50,7 +43,6 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Terang Bertumpuk Node.js® - @@ -61,7 +53,6 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Bertumpuk Putih Node.js - @@ -78,7 +69,6 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Ikon JS Putih - diff --git a/apps/site/pages/id/about/index.mdx b/apps/site/pages/id/about/index.mdx index 623a5c9777f81..4b81588bbf2f6 100644 --- a/apps/site/pages/id/about/index.mdx +++ b/apps/site/pages/id/about/index.mdx @@ -17,13 +17,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -34,13 +34,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -62,7 +62,7 @@ HTTP adalah warga negara kelas satu di Node.js, dirancang dengan streaming dan r latensi dalam pikiran. Ini membuat Node.js sangat cocok untuk fondasi web perpustakaan atau kerangka kerja. -Node.js dirancang tanpa thread bukan berarti Anda tidak dapat memanfaatkan banyak inti di lingkungan Anda. Proses anak dapat dihasilkan dengan menggunakan API child_process.fork() kami, dan dirancang agar mudah untuk berkomunikasi. Dibangun di atas antarmuka yang sama adalah modul cluster, yang memungkinkan Anda berbagi soket antar proses untuk mengaktifkan penyeimbangan beban pada inti Anda. +Node.js dirancang tanpa thread bukan berarti Anda tidak dapat memanfaatkan banyak inti di lingkungan Anda. Proses anak dapat dihasilkan dengan menggunakan API child\_process.fork() kami, dan dirancang agar mudah untuk berkomunikasi. Dibangun di atas antarmuka yang sama adalah modul cluster, yang memungkinkan Anda berbagi soket antar proses untuk mengaktifkan penyeimbangan beban pada inti Anda. [blocking vs. non-blocking]: /learn/asynchronous-work/overview-of-blocking-vs-non-blocking [`child_process.fork()`]: https://nodejs.org/api/child_process.html diff --git a/apps/site/pages/id/about/security-reporting.mdx b/apps/site/pages/id/about/security-reporting.mdx index d2808fcb4b6bd..eec7c6747e8cd 100644 --- a/apps/site/pages/id/about/security-reporting.mdx +++ b/apps/site/pages/id/about/security-reporting.mdx @@ -51,11 +51,7 @@ Jika Anda memiliki saran tentang bagaimana proses ini dapat ditingkatkan, silaka ## Praktik Terbaik OpenSSF - OpenSSF Badge +OpenSSF Badge [Best Practices badge](https://github.com/coreinfrastructure/best-practices-badge) Open Source Security Foundation (OpenSSF) adalah cara bagi proyek Free/Libre dan Open Source Software (FLOSS) untuk menunjukkan bahwa mereka mengikuti praktik terbaik. Proyek dapat secara sukarela melakukan sertifikasi sendiri bagaimana mereka mengikuti setiap praktik terbaik. Konsumen yang tersertifikasi dapat dengan cepat menilai proyek FLOSS mana yang mengikuti praktik terbaik dan sebagai hasilnya, mereka lebih cenderung menghasilkan perangkat lunak aman berkualitas lebih tinggi. diff --git a/apps/site/pages/id/download/package-manager/current.mdx b/apps/site/pages/id/download/package-manager/current.mdx index 34202cba92cd1..1f4c80e5b450a 100644 --- a/apps/site/pages/id/download/package-manager/current.mdx +++ b/apps/site/pages/id/download/package-manager/current.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat pengelola paket yang didukung komunitas lainnya - diff --git a/apps/site/pages/id/download/package-manager/index.mdx b/apps/site/pages/id/download/package-manager/index.mdx index 0e8e32f0ae34e..c2821b321849c 100644 --- a/apps/site/pages/id/download/package-manager/index.mdx +++ b/apps/site/pages/id/download/package-manager/index.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat pengelola paket yang didukung komunitas lainnya - diff --git a/apps/site/pages/id/download/prebuilt-binaries/current.mdx b/apps/site/pages/id/download/prebuilt-binaries/current.mdx index f9063133c81d7..ecdab946b0480 100644 --- a/apps/site/pages/id/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/id/download/prebuilt-binaries/current.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat biner pra-dibangun secara Nightly atau Bangunan Tidak Resmi untuk platform lain - diff --git a/apps/site/pages/id/download/prebuilt-binaries/index.mdx b/apps/site/pages/id/download/prebuilt-binaries/index.mdx index a3620eb74aa01..9ea085550ce16 100644 --- a/apps/site/pages/id/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/id/download/prebuilt-binaries/index.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani. Lihat biner pra-dibangun secara Nightly, semua biner pra-dibangun Rilis, atau Bangunan Tidak Resmi untuk platform lain. - diff --git a/apps/site/pages/id/download/prebuilt-installer/current.mdx b/apps/site/pages/id/download/prebuilt-installer/current.mdx index eac81f06f0310..323138c077ac3 100644 --- a/apps/site/pages/id/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/id/download/prebuilt-installer/current.mdx @@ -22,5 +22,4 @@ Pelajari cara memverifikasi SHASUMS yang ditandat Lihat semua opsi unduh Node.js yang tersedia Pelajari tentang Rilis Node.js - diff --git a/apps/site/pages/id/download/prebuilt-installer/index.mdx b/apps/site/pages/id/download/prebuilt-installer/index.mdx index 9eedb9693390e..8072e771136cc 100644 --- a/apps/site/pages/id/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/id/download/prebuilt-installer/index.mdx @@ -22,5 +22,4 @@ Pelajari cara memverifikasi SHASUMS yang ditandat Lihat semua opsi unduh Node.js yang tersedia Pelajari tentang Rilis Node.js - diff --git a/apps/site/pages/id/download/source-code/current.mdx b/apps/site/pages/id/download/source-code/current.mdx index 823a8bc7e5478..d209cd091b6c4 100644 --- a/apps/site/pages/id/download/source-code/current.mdx +++ b/apps/site/pages/id/download/source-code/current.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat bagaimana cara membangun Node.js dari sumber. - diff --git a/apps/site/pages/id/download/source-code/index.mdx b/apps/site/pages/id/download/source-code/index.mdx index 823a8bc7e5478..d209cd091b6c4 100644 --- a/apps/site/pages/id/download/source-code/index.mdx +++ b/apps/site/pages/id/download/source-code/index.mdx @@ -20,5 +20,4 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat bagaimana cara membangun Node.js dari sumber. - diff --git a/apps/site/pages/id/index.mdx b/apps/site/pages/id/index.mdx index cbe152c9a454f..81c705ffaffe9 100644 --- a/apps/site/pages/id/index.mdx +++ b/apps/site/pages/id/index.mdx @@ -9,10 +9,9 @@ layout: home

Jalankan JavaScript Di Mana Saja

-Node.js® adalah lingkungan runtime JavaScript gratis dan sumber terbuka yang -lintas platform, yang memungkinkan pengembang membuat server, aplikasi web, -alat baris perintah, dan skrip. - + Node.js® adalah lingkungan runtime JavaScript gratis dan sumber terbuka yang + lintas platform, yang memungkinkan pengembang membuat server, aplikasi web, + alat baris perintah, dan skrip.
@@ -47,93 +46,87 @@ alat baris perintah, dan skrip. // server.mjs import { createServer } from 'node:http'; -const server = createServer((req, res) => { -res.writeHead(200, { 'Content-Type': 'text/plain' }); -res.end('Hello World!\n'); -}); - -// starts a simple http server locally on port 3000 -server.listen(3000, '127.0.0.1', () => { -console.log('Listening on 127.0.0.1:3000'); -}); - -// run with `node server.mjs` - -```` - -```js displayName="Write Tests" -// tests.mjs -import assert from 'node:assert'; -import test from 'node:test'; - -test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); -}); - -test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); -}); - -// run with `node tests.mjs` -```` - -```js displayName="Read and Hash a File" -// crypto.mjs -import { createHash } from 'node:crypto'; -import { readFile } from 'node:fs/promises'; - -const hasher = createHash('sha1'); - -hasher.setEncoding('hex'); -// ensure you have a `package.json` file for this test! -hasher.write(await readFile('package.json')); -hasher.end(); - -const fileHash = hasher.read(); - -// run with `node crypto.mjs` -``` - -```js displayName="Streams Pipeline" -// streams.mjs -import { pipeline } from 'node:stream/promises'; -import { createReadStream, createWriteStream } from 'node:fs'; -import { createGzip } from 'node:zlib'; - -// ensure you have a `package.json` file for this test! -await pipeline( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') -); - -// run with `node streams.mjs` -``` - -```js displayName="Work with Threads" -// threads.mjs -import { - Worker, - isMainThread, - workerData, - parentPort, -} from 'node:worker_threads'; - -if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); -} else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); -} - -// run with `node threads.mjs` -``` - + const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World!\n'); + }); + + // starts a simple http server locally on port 3000 + server.listen(3000, '127.0.0.1', () => { + console.log('Listening on 127.0.0.1:3000'); + }); + + // run with `node server.mjs` + ``` + + ```js displayName="Write Tests" + // tests.mjs + import assert from 'node:assert'; + import test from 'node:test'; + + test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); + }); + + test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); + }); + + // run with `node tests.mjs` + ``` + + ```js displayName="Read and Hash a File" + // crypto.mjs + import { createHash } from 'node:crypto'; + import { readFile } from 'node:fs/promises'; + + const hasher = createHash('sha1'); + + hasher.setEncoding('hex'); + // ensure you have a `package.json` file for this test! + hasher.write(await readFile('package.json')); + hasher.end(); + + const fileHash = hasher.read(); + + // run with `node crypto.mjs` + ``` + + ```js displayName="Streams Pipeline" + // streams.mjs + import { pipeline } from 'node:stream/promises'; + import { createReadStream, createWriteStream } from 'node:fs'; + import { createGzip } from 'node:zlib'; + + // ensure you have a `package.json` file for this test! + await pipeline + ( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') + ); + + // run with `node streams.mjs` + ``` + + ```js displayName="Work with Threads" + // threads.mjs + import { Worker, isMainThread, + workerData, parentPort } from 'node:worker_threads'; + + if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); + } else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); + } + + // run with `node threads.mjs` + ```
Pelajari lebih lanjut tentang apa yang bisa ditawarkan Node.js melalui [Bahan Pembelajaran](/learn) kami. - diff --git a/apps/site/pages/ja/about/index.mdx b/apps/site/pages/ja/about/index.mdx index 00c987a077ad0..7f5bc663529eb 100644 --- a/apps/site/pages/ja/about/index.mdx +++ b/apps/site/pages/ja/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/ko/about/branding.mdx b/apps/site/pages/ko/about/branding.mdx index 3b957d4cec5f4..12e8b5542e667 100644 --- a/apps/site/pages/ko/about/branding.mdx +++ b/apps/site/pages/ko/about/branding.mdx @@ -11,13 +11,7 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 로켓 거북이를 디자인하고 기여한 [Angela Angelini](https://www.linkedin.com/in/angeliningl/)에게 감사의 말씀을 전합니다. -Node.js 마스코트 +Node.js 마스코트 ## Node.js® 로고 @@ -33,7 +27,6 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 밝은 수평 로고 - @@ -50,7 +43,6 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 밝은 세로 로고 - @@ -61,7 +53,6 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 흰색 세로 로고 - @@ -78,7 +69,6 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 흰색 JS 아이콘 - diff --git a/apps/site/pages/ko/about/index.mdx b/apps/site/pages/ko/about/index.mdx index 6b1f89e3ecfb4..b72ea24718330 100644 --- a/apps/site/pages/ko/about/index.mdx +++ b/apps/site/pages/ko/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/ko/about/security-reporting.mdx b/apps/site/pages/ko/about/security-reporting.mdx index 3f5e5252363e8..58ea3b0e620bb 100644 --- a/apps/site/pages/ko/about/security-reporting.mdx +++ b/apps/site/pages/ko/about/security-reporting.mdx @@ -50,15 +50,8 @@ Node.js의 보안 공개 정책은 다음과 같습니다. ## OpenSSF 모범 사례 - - OpenSSF 배지 + +OpenSSF 배지 Open Source Security Foundation(OpenSSF) [모범 사례 배지](https://github.com/coreinfrastructure/best-practices-badge)는 자유/오픈 소스 소프트웨어(FLOSS) 프로젝트가 모범 사례를 따르고 있음을 보여주는 방법입니다. 프로젝트는 자발적으로 각 사례를 어떻게 따르고 있는지에 대해 자체 인증할 수 있습니다. 이 배지를 확인하는 사용자들은 FLOSS 프로젝트가 모범 사례를 따르고 있는지 빠르게 평가할 수 있으며, 그 결과 더 높은 품질의 안전한 소프트웨어를 제작할 가능성이 높다는 것을 알 수 있습니다. diff --git a/apps/site/pages/ko/download/package-manager/current.mdx b/apps/site/pages/ko/download/package-manager/current.mdx index 0f279d8b4cecf..d015448897d85 100644 --- a/apps/site/pages/ko/download/package-manager/current.mdx +++ b/apps/site/pages/ko/download/package-manager/current.mdx @@ -17,9 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 알아보세요. +서명된 SHASUMS를 확인하는 방법을 알아보세요. 커뮤니티에서 지원하는 다른 패키지 관리자도 확인하세요. - diff --git a/apps/site/pages/ko/download/package-manager/index.mdx b/apps/site/pages/ko/download/package-manager/index.mdx index 0f279d8b4cecf..d015448897d85 100644 --- a/apps/site/pages/ko/download/package-manager/index.mdx +++ b/apps/site/pages/ko/download/package-manager/index.mdx @@ -17,9 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 알아보세요. +서명된 SHASUMS를 확인하는 방법을 알아보세요. 커뮤니티에서 지원하는 다른 패키지 관리자도 확인하세요. - diff --git a/apps/site/pages/ko/download/prebuilt-binaries/current.mdx b/apps/site/pages/ko/download/prebuilt-binaries/current.mdx index c537c8a3ad8a0..055211d1c6bfa 100644 --- a/apps/site/pages/ko/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/ko/download/prebuilt-binaries/current.mdx @@ -17,8 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 배워보세요. +서명된 SHASUMS를 확인하는 방법을 배워보세요. Nightly 사전 빌드된 바이너리 또는 다른 플랫폼에 맞는 비공식 빌드를 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-binaries/index.mdx b/apps/site/pages/ko/download/prebuilt-binaries/index.mdx index b938501de8686..5c076d398c7fd 100644 --- a/apps/site/pages/ko/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/ko/download/prebuilt-binaries/index.mdx @@ -17,8 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 배워보세요. +서명된 SHASUMS를 확인하는 방법을 배워보세요. Nightly 사전 빌드된 바이너리, 모든 Release 사전 빌드된 바이너리, 또는 다른 플랫폼에 맞는 비공식 빌드를 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-installer/current.mdx b/apps/site/pages/ko/download/prebuilt-installer/current.mdx index 269e4bb2ad06e..3adf3a9d0f992 100644 --- a/apps/site/pages/ko/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/ko/download/prebuilt-installer/current.mdx @@ -17,8 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 배워보세요. +서명된 SHASUMS를 확인하는 방법을 배워보세요. 모든 사용 가능한 Node.js 다운로드 옵션을 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-installer/index.mdx b/apps/site/pages/ko/download/prebuilt-installer/index.mdx index 40170f98fb381..09d91c78f0a1c 100644 --- a/apps/site/pages/ko/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/ko/download/prebuilt-installer/index.mdx @@ -17,8 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 -확인하는 방법을 배워보세요. +서명된 SHASUMS를 확인하는 방법을 배워보세요. 모든 사용 가능한 Node.js 다운로드 옵션을 확인하세요. diff --git a/apps/site/pages/ko/download/source-code/current.mdx b/apps/site/pages/ko/download/source-code/current.mdx index 85b8cba1c0dce..6692b77a51758 100644 --- a/apps/site/pages/ko/download/source-code/current.mdx +++ b/apps/site/pages/ko/download/source-code/current.mdx @@ -17,9 +17,7 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS을 -확인하는 방법을 알아보세요. +서명된 SHASUMS을 확인하는 방법을 알아보세요. Node.js를 소스에서 빌드하는 방법을 확인하세요. - diff --git a/apps/site/pages/ko/download/source-code/index.mdx b/apps/site/pages/ko/download/source-code/index.mdx index 9917328435164..9f58937a5d9b0 100644 --- a/apps/site/pages/ko/download/source-code/index.mdx +++ b/apps/site/pages/ko/download/source-code/index.mdx @@ -17,9 +17,7 @@ Node.js에는 이 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -SHA 서명 확인라는 -방법을 배워보세요. +SHA 서명 확인라는 방법을 배워보세요. 코드에서 Node.js를 빌드하는 법을 확인해보세요. - diff --git a/apps/site/pages/ko/index.mdx b/apps/site/pages/ko/index.mdx index 25f31ed624ab0..575404dbbf5db 100644 --- a/apps/site/pages/ko/index.mdx +++ b/apps/site/pages/ko/index.mdx @@ -9,8 +9,7 @@ layout: home

어디서든 JavaScript를 실행하세요

-Node.js®는 무료, 오픈소스, 다중 플랫폼 JavaScript 런타임 환경으로 개발자 여러분이 서버, 웹 애플리케이션, 명령어 작성 도구와 스크립트를 만들도록 해줍니다. - + Node.js®는 무료, 오픈소스, 다중 플랫폼 JavaScript 런타임 환경으로 개발자 여러분이 서버, 웹 애플리케이션, 명령어 작성 도구와 스크립트를 만들도록 해줍니다.
@@ -45,93 +44,87 @@ Node.js®는 무료, 오픈소스, 다중 플랫폼 JavaScript 런타임 환경 // server.mjs import { createServer } from 'node:http'; -const server = createServer((req, res) => { -res.writeHead(200, { 'Content-Type': 'text/plain' }); -res.end('Hello World!\n'); -}); - -// starts a simple http server locally on port 3000 -server.listen(3000, '127.0.0.1', () => { -console.log('Listening on 127.0.0.1:3000'); -}); - -// run with `node server.mjs` - -```` - -```js displayName="Write Tests" -// tests.mjs -import assert from 'node:assert'; -import test from 'node:test'; - -test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); -}); - -test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); -}); - -// run with `node tests.mjs` -```` - -```js displayName="Read and Hash a File" -// crypto.mjs -import { createHash } from 'node:crypto'; -import { readFile } from 'node:fs/promises'; - -const hasher = createHash('sha1'); - -hasher.setEncoding('hex'); -// ensure you have a `package.json` file for this test! -hasher.write(await readFile('package.json')); -hasher.end(); - -const fileHash = hasher.read(); - -// run with `node crypto.mjs` -``` - -```js displayName="Streams Pipeline" -// streams.mjs -import { pipeline } from 'node:stream/promises'; -import { createReadStream, createWriteStream } from 'node:fs'; -import { createGzip } from 'node:zlib'; - -// ensure you have a `package.json` file for this test! -await pipeline( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') -); - -// run with `node streams.mjs` -``` - -```js displayName="Work with Threads" -// threads.mjs -import { - Worker, - isMainThread, - workerData, - parentPort, -} from 'node:worker_threads'; - -if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); -} else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); -} - -// run with `node threads.mjs` -``` - + const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World!\n'); + }); + + // starts a simple http server locally on port 3000 + server.listen(3000, '127.0.0.1', () => { + console.log('Listening on 127.0.0.1:3000'); + }); + + // run with `node server.mjs` + ``` + + ```js displayName="Write Tests" + // tests.mjs + import assert from 'node:assert'; + import test from 'node:test'; + + test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); + }); + + test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); + }); + + // run with `node tests.mjs` + ``` + + ```js displayName="Read and Hash a File" + // crypto.mjs + import { createHash } from 'node:crypto'; + import { readFile } from 'node:fs/promises'; + + const hasher = createHash('sha1'); + + hasher.setEncoding('hex'); + // ensure you have a `package.json` file for this test! + hasher.write(await readFile('package.json')); + hasher.end(); + + const fileHash = hasher.read(); + + // run with `node crypto.mjs` + ``` + + ```js displayName="Streams Pipeline" + // streams.mjs + import { pipeline } from 'node:stream/promises'; + import { createReadStream, createWriteStream } from 'node:fs'; + import { createGzip } from 'node:zlib'; + + // ensure you have a `package.json` file for this test! + await pipeline + ( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') + ); + + // run with `node streams.mjs` + ``` + + ```js displayName="Work with Threads" + // threads.mjs + import { Worker, isMainThread, + workerData, parentPort } from 'node:worker_threads'; + + if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); + } else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); + } + + // run with `node threads.mjs` + ```
Node.js가 제공하는 [학습 자료](/learn)를 통해 더 많은 정보를 알아보세요. - diff --git a/apps/site/pages/pt/about/index.mdx b/apps/site/pages/pt/about/index.mdx index 5a9795a95a8a3..daaab4881380c 100644 --- a/apps/site/pages/pt/about/index.mdx +++ b/apps/site/pages/pt/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/pt/about/security-reporting.mdx b/apps/site/pages/pt/about/security-reporting.mdx index 184f4b990d644..70272eaf6154a 100644 --- a/apps/site/pages/pt/about/security-reporting.mdx +++ b/apps/site/pages/pt/about/security-reporting.mdx @@ -50,15 +50,8 @@ Se tivermos sugestões sobre como este processo poderia ser melhorado, podemos s ## Boas Práticas da OpenSSF - - Distintivo da OpenSSF + +Distintivo da OpenSSF distintivo de boas práticas da “Open Source Security Foundation (OpenSSF)” é uma maneira de os projetos de Software Livre e de Código Aberto (FLOSS) mostrarem que seguem as boas práticas. Os projetos podem certificar-se voluntariamente como seguem cada uma das boas práticas. Os consumidores do distintivo podem avaliar rapidamente quais os projetos FLOSS que seguem as boas práticas e, consequentemente, têm maior probabilidade de produzir software seguro de superior qualidade. diff --git a/apps/site/pages/tr/about/index.mdx b/apps/site/pages/tr/about/index.mdx index bc4e9683f1bf1..4973f55a84b66 100644 --- a/apps/site/pages/tr/about/index.mdx +++ b/apps/site/pages/tr/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/tr/about/security-reporting.mdx b/apps/site/pages/tr/about/security-reporting.mdx index 8c5cf0326847d..fc13948715082 100644 --- a/apps/site/pages/tr/about/security-reporting.mdx +++ b/apps/site/pages/tr/about/security-reporting.mdx @@ -52,15 +52,8 @@ Tartışmak için [bir konuyu dosyalayın](https://github.com/nodejs/security-wg ## OpenSSF En İyi Uygulamaları - - OpenSSF Rozeti + +OpenSSF Rozeti Açık Kaynak Güvenlik Vakfı (OpenSSF) [En İyi Uygulamalar rozeti](https://github.com/coreinfrastructure/best-practices-badge), Özgür/Kütüphane ve Açık Kaynak Yazılım (FLOSS) projelerinin en iyi uygulamaları takip ettiklerini göstermeleri için bir yoldur. Projeler gönüllü olarak her bir en iyi uygulamayı nasıl takip ettiklerini kendi kendilerine belgeleyebilirler. Rozetin tüketicileri, hangi FLOSS projelerinin en iyi uygulamaları takip ettiğini ve sonuç olarak daha yüksek kalitede güvenli yazılım üretme olasılığının daha yüksek olduğunu hızlı bir şekilde değerlendirebilirler. diff --git a/apps/site/pages/uk/about/branding.mdx b/apps/site/pages/uk/about/branding.mdx index 0d416c8a49ea4..03f2fc08f10bc 100644 --- a/apps/site/pages/uk/about/branding.mdx +++ b/apps/site/pages/uk/about/branding.mdx @@ -11,13 +11,7 @@ layout: about Дякуємо [Анджелі Анджеліні](https://www.linkedin.com/in/angeliningl) за дизайн та внесок у Rocket Turtle. -Маскот Node.js +Маскот Node.js ## Логотип Node.js® @@ -33,7 +27,6 @@ layout: about Світлий горизонтальний логотип Node.js - @@ -50,7 +43,6 @@ layout: about Світлий складений логотип Node.js® - @@ -61,7 +53,6 @@ layout: about Білий складений логотип Node.js® - @@ -78,7 +69,6 @@ layout: about Білий значок JS - diff --git a/apps/site/pages/uk/about/index.mdx b/apps/site/pages/uk/about/index.mdx index 8ace8ffa2c205..9fd7b29199885 100644 --- a/apps/site/pages/uk/about/index.mdx +++ b/apps/site/pages/uk/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/uk/about/security-reporting.mdx b/apps/site/pages/uk/about/security-reporting.mdx index c710284b2385d..94e72ebd933ff 100644 --- a/apps/site/pages/uk/about/security-reporting.mdx +++ b/apps/site/pages/uk/about/security-reporting.mdx @@ -51,15 +51,8 @@ layout: about ## Найкращі практики OpenSSF - - Значок OpenSSF + +Значок OpenSSF [Значок за найкращі практики](https://github.com/coreinfrastructure/best-practices-badge) від Open Source Security Foundation (OpenSSF) — це спосіб для проєктів із відкритим кодом (Free/Libre and Open Source Software, FLOSS) показати, що вони дотримуються найкращих практик. Проєкти можуть самостійно описати, як вони дотримуються кожної практики. Користувачі можуть швидко оцінити, які проєкти FLOSS дотримуються найкращих практик і, як результат, створювати безпечне ПЗ кращої якості. diff --git a/apps/site/pages/uk/download/package-manager/current.mdx b/apps/site/pages/uk/download/package-manager/current.mdx index 8b614025c7f37..1c1b5e1966acc 100644 --- a/apps/site/pages/uk/download/package-manager/current.mdx +++ b/apps/site/pages/uk/download/package-manager/current.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте інші менеджери пакетів, які підтримуються спільнотою - diff --git a/apps/site/pages/uk/download/package-manager/index.mdx b/apps/site/pages/uk/download/package-manager/index.mdx index d772ef049cc28..773c2808e4a15 100644 --- a/apps/site/pages/uk/download/package-manager/index.mdx +++ b/apps/site/pages/uk/download/package-manager/index.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте інші менеджери пакетів, які підтримуються спільнотою - diff --git a/apps/site/pages/uk/download/prebuilt-binaries/current.mdx b/apps/site/pages/uk/download/prebuilt-binaries/current.mdx index ee5f2d83f0638..b67bf809295e4 100644 --- a/apps/site/pages/uk/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/uk/download/prebuilt-binaries/current.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте бінарні файли нічних збірок або неофіційні збірки для інших платформ - diff --git a/apps/site/pages/uk/download/prebuilt-binaries/index.mdx b/apps/site/pages/uk/download/prebuilt-binaries/index.mdx index 0d0a6e3a5d189..1ee50b5a39f7d 100644 --- a/apps/site/pages/uk/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/uk/download/prebuilt-binaries/index.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS. Перегляньте бінарні файли нічних збірок, усі бінарні файли релізу або неофіційні збірки для інших платформ. - diff --git a/apps/site/pages/uk/download/prebuilt-installer/current.mdx b/apps/site/pages/uk/download/prebuilt-installer/current.mdx index 05ba45d1fab18..83713b2a1b951 100644 --- a/apps/site/pages/uk/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/uk/download/prebuilt-installer/current.mdx @@ -22,5 +22,4 @@ Node.js містить . Перегляньте всі доступні опції завантаження Node.js Дізнайтеся більше про релізи Node.js - diff --git a/apps/site/pages/uk/download/prebuilt-installer/index.mdx b/apps/site/pages/uk/download/prebuilt-installer/index.mdx index 2fcb5bd6067bb..ecbfeb4d53b88 100644 --- a/apps/site/pages/uk/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/uk/download/prebuilt-installer/index.mdx @@ -22,5 +22,4 @@ Node.js містить . Перегляньте всі доступні опції завантаження Node.js Дізнайтеся більше про релізи Node.js - diff --git a/apps/site/pages/uk/download/source-code/current.mdx b/apps/site/pages/uk/download/source-code/current.mdx index 2d2846ddc04c7..de127381a2817 100644 --- a/apps/site/pages/uk/download/source-code/current.mdx +++ b/apps/site/pages/uk/download/source-code/current.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Дізнайтеся, як зібрати Node.js із вихідного коду. - diff --git a/apps/site/pages/uk/download/source-code/index.mdx b/apps/site/pages/uk/download/source-code/index.mdx index 2d2846ddc04c7..de127381a2817 100644 --- a/apps/site/pages/uk/download/source-code/index.mdx +++ b/apps/site/pages/uk/download/source-code/index.mdx @@ -20,5 +20,4 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Дізнайтеся, як зібрати Node.js із вихідного коду. - diff --git a/apps/site/pages/uk/index.mdx b/apps/site/pages/uk/index.mdx index 2b65d70048c87..75d1d7d556be5 100644 --- a/apps/site/pages/uk/index.mdx +++ b/apps/site/pages/uk/index.mdx @@ -9,9 +9,8 @@ layout: home

Запускайте JavaScript будь-де

-Node.js® — це безплатне, кросплатформне середовище виконання JavaScript із відкритим кодом, -яке дозволяє розробникам створювати сервери, вебзастосунки, інструменти командного рядка та скрипти. - + Node.js® — це безплатне, кросплатформне середовище виконання JavaScript із відкритим кодом, + яке дозволяє розробникам створювати сервери, вебзастосунки, інструменти командного рядка та скрипти.
@@ -46,93 +45,87 @@ Node.js® — це безплатне, кросплатформне середо // server.mjs import { createServer } from 'node:http'; -const server = createServer((req, res) => { -res.writeHead(200, { 'Content-Type': 'text/plain' }); -res.end('Hello World!\n'); -}); - -// starts a simple http server locally on port 3000 -server.listen(3000, '127.0.0.1', () => { -console.log('Listening on 127.0.0.1:3000'); -}); - -// run with `node server.mjs` - -```` - -```js displayName="Write Tests" -// tests.mjs -import assert from 'node:assert'; -import test from 'node:test'; - -test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); -}); - -test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); -}); - -// run with `node tests.mjs` -```` - -```js displayName="Read and Hash a File" -// crypto.mjs -import { createHash } from 'node:crypto'; -import { readFile } from 'node:fs/promises'; - -const hasher = createHash('sha1'); - -hasher.setEncoding('hex'); -// ensure you have a `package.json` file for this test! -hasher.write(await readFile('package.json')); -hasher.end(); - -const fileHash = hasher.read(); - -// run with `node crypto.mjs` -``` - -```js displayName="Streams Pipeline" -// streams.mjs -import { pipeline } from 'node:stream/promises'; -import { createReadStream, createWriteStream } from 'node:fs'; -import { createGzip } from 'node:zlib'; - -// ensure you have a `package.json` file for this test! -await pipeline( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') -); - -// run with `node streams.mjs` -``` - -```js displayName="Work with Threads" -// threads.mjs -import { - Worker, - isMainThread, - workerData, - parentPort, -} from 'node:worker_threads'; - -if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); -} else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); -} - -// run with `node threads.mjs` -``` - + const server = createServer((req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello World!\n'); + }); + + // starts a simple http server locally on port 3000 + server.listen(3000, '127.0.0.1', () => { + console.log('Listening on 127.0.0.1:3000'); + }); + + // run with `node server.mjs` + ``` + + ```js displayName="Write Tests" + // tests.mjs + import assert from 'node:assert'; + import test from 'node:test'; + + test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); + }); + + test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); + }); + + // run with `node tests.mjs` + ``` + + ```js displayName="Read and Hash a File" + // crypto.mjs + import { createHash } from 'node:crypto'; + import { readFile } from 'node:fs/promises'; + + const hasher = createHash('sha1'); + + hasher.setEncoding('hex'); + // ensure you have a `package.json` file for this test! + hasher.write(await readFile('package.json')); + hasher.end(); + + const fileHash = hasher.read(); + + // run with `node crypto.mjs` + ``` + + ```js displayName="Streams Pipeline" + // streams.mjs + import { pipeline } from 'node:stream/promises'; + import { createReadStream, createWriteStream } from 'node:fs'; + import { createGzip } from 'node:zlib'; + + // ensure you have a `package.json` file for this test! + await pipeline + ( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') + ); + + // run with `node streams.mjs` + ``` + + ```js displayName="Work with Threads" + // threads.mjs + import { Worker, isMainThread, + workerData, parentPort } from 'node:worker_threads'; + + if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); + } else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); + } + + // run with `node threads.mjs` + ```
Дізнайтеся більше про можливості Node.js із [нашими навчальними матеріалами](/learn). - diff --git a/apps/site/pages/zh-cn/about/index.mdx b/apps/site/pages/zh-cn/about/index.mdx index 47b787ffa40d5..cd3daeb14bba7 100644 --- a/apps/site/pages/zh-cn/about/index.mdx +++ b/apps/site/pages/zh-cn/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -51,7 +51,7 @@ Node.js 在设计上受到了诸如 Ruby 的 [Event Machine][] 和 Python 的 [T HTTP 在 Node.js 中是第一类公民,设计时考虑了流式传输和低延迟。这使得 Node.js 非常适合作为 Web 库或框架的基础。 -Node.js 的设计没有线程并不意味着您不能利用环境中的多个核心。可以使用我们的 [child_process.fork()](https://nodejs.org/docs/latest/api/child_process.html#child_processforkmodulepath-args-options) API 来生成子进程,并且设计得易于通信。建立在同一接口之上的是 [cluster](https://nodejs.org/docs/latest/api/cluster.html) 模块,它允许您在进程之间共享套接字,从而实现对核心的负载均衡。 +Node.js 的设计没有线程并不意味着您不能利用环境中的多个核心。可以使用我们的 [child\_process.fork()](https://nodejs.org/docs/latest/api/child_process.html#child_processforkmodulepath-args-options) API 来生成子进程,并且设计得易于通信。建立在同一接口之上的是 [cluster](https://nodejs.org/docs/latest/api/cluster.html) 模块,它允许您在进程之间共享套接字,从而实现对核心的负载均衡。 [blocking vs. non-blocking]: /learn/asynchronous-work/overview-of-blocking-vs-non-blocking [`child_process.fork()`]: https://nodejs.org/api/child_process.html diff --git a/apps/site/pages/zh-cn/about/security-reporting.mdx b/apps/site/pages/zh-cn/about/security-reporting.mdx index fafe4d90c5cef..e0ec739c92aab 100644 --- a/apps/site/pages/zh-cn/about/security-reporting.mdx +++ b/apps/site/pages/zh-cn/about/security-reporting.mdx @@ -50,15 +50,8 @@ Node.js 项目为安全研究人员和负责任的公开披露提供官方漏洞 ## OpenSSF 最佳实践 - - OpenSSF Badge + +OpenSSF Badge 开源安全基金会(OpenSSF)[最佳实践徽章](https://github.com/coreinfrastructure/best-practices-badge) 是自由/自由和开源软件(FLOSS)项目展示他们遵循最佳实践的一种方式。 项目可以自愿地自我认证他们如何遵循每个最佳实践。 徽章的使用者可以快速评估哪些 FLOSS 项目正在遵循最佳实践,因此更有可能产生更高质量的安全软件。 diff --git a/apps/site/pages/zh-tw/about/index.mdx b/apps/site/pages/zh-tw/about/index.mdx index 81b70befaa623..b297aa2df0fbb 100644 --- a/apps/site/pages/zh-tw/about/index.mdx +++ b/apps/site/pages/zh-tw/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { - res.statusCode = 200; - res.setHeader('Content-Type', 'text/plain'); - res.end('Hello World'); +res.statusCode = 200; +res.setHeader('Content-Type', 'text/plain'); +res.end('Hello World'); }); server.listen(port, hostname, () => { - console.log(`Server running at http://${hostname}:${port}/`); +console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/zh-tw/about/security-reporting.mdx b/apps/site/pages/zh-tw/about/security-reporting.mdx index 7f41b4ba9fcea..634022e514d6a 100644 --- a/apps/site/pages/zh-tw/about/security-reporting.mdx +++ b/apps/site/pages/zh-tw/about/security-reporting.mdx @@ -51,15 +51,8 @@ Node.js 專案為安全研究人員和盡責公開揭露設立了官方漏洞獎 ## OpenSSF 最佳實踐 - - OpenSSF 徽章 + +OpenSSF 徽章 開源安全基金會 (OpenSSF) [最佳實踐徽章](https://github.com/coreinfrastructure/best-practices-badge)的意義是為奉行最佳實踐的自由/開源軟體 (FLOSS) 專案提供背書。專案可以自發認證每項最佳實踐的遵循情況,徽章的使用者則可以快速評估哪些 FLOSS 專案確實遵循最佳實踐,因此更有可能產出安全又高品質的軟體。 diff --git a/packages/i18n/locales/es.json b/packages/i18n/locales/es.json new file mode 100644 index 0000000000000..dd15732fcecb6 --- /dev/null +++ b/packages/i18n/locales/es.json @@ -0,0 +1,327 @@ +{ + "components": { + "containers": { + "footer": { + "links": { + "trademarkPolicy": "Política de Marcas Registradas", + "privacyPolicy": "Política de Privacidad", + "versionSupport": "Soporte de Versiones", + "codeOfConduct": "Código de Conducta", + "security": "Política de Seguridad" + } + }, + "navBar": { + "links": { + "about": "Acerca de", + "download": "Descargar", + "docs": "Documentación", + "guides": "Guías", + "learn": "Aprender", + "security": "Seguridad", + "certification": "Certificación", + "blog": "Blog", + "contribute": "Contribuir" + } + } + }, + "navigation": { + "learn": { + "gettingStarted": { + "links": { + "gettingStarted": "Primeros pasos", + "introductionToNodejs": "Introducción a Node.js", + "howToInstallNodejs": "Cómo instalar Node.js", + "howMuchJavascriptDoYouNeedToKnowToUseNodejs": "¿Cuánto necesitas saber de JavaScript para usar Node.js?", + "differencesBetweenNodejsAndTheBrowser": "Diferencias entre Node.js y el navegador", + "theV8JavascriptEngine": "El motor de JavaScript V8", + "anIntroductionToTheNpmPackageManager": "Una introducción al gestor de paquetes npm", + "ecmascript2015Es6AndBeyond": "ECMAScript 2015 (ES6) y más allá", + "nodejsTheDifferenceBetweenDevelopmentAndProduction": "Node.js, las diferencias entre desarrollo y producción", + "nodejsWithWebassembly": "Node.js con WebAssembly", + "debugging": "Depuración de Node.js", + "profiling": "Perfilado de Aplicaciones Node.js", + "securityBestPractices": "Mejores prácticas de seguridad" + } + }, + "typescript": { + "links": { + "typescript": "TypeScript", + "introduction": "Introducción a TypeScript", + "transpile": "Ejecutar código TypeScript usando transpiladores", + "run": "Ejecutar TypeScript con un ejecutor", + "runNatively": "Ejecutar TypeScript de forma nativa" + } + }, + "asynchronousWork": { + "links": { + "asynchronousWork": "Trabajo Asincrónico", + "asynchronousFlowControl": "Flujo de control asincrónico", + "overviewOfBlockingVsNonBlocking": "Resumen de Bloqueante vs No Bloqueante", + "javascriptAsynchronousProgrammingAndCallbacks": "Programación Asíncrona en JavaScript y Retrollamadas", + "discoverJavascriptTimers": "Descubre los temporizadores de JavaScript", + "eventLoopTimersAndNexttick": "El Event Loop en Node.js", + "theNodejsEventEmitter": "El Event Emitter en Node.js", + "understandingProcessnexttick": "Entendiendo process.nextTick()", + "understandingSetimmediate": "Entendiendo setImmediate()", + "dontBlockTheEventLoop": "No bloquear el Event Loop" + } + }, + "manipulatingFiles": { + "links": { + "manipulatingFiles": "Manipulación de Archivos", + "nodejsFileStats": "Atributos de archivos en Node.js", + "nodejsFilePaths": "Rutas de archivo en Node.js", + "workingWithFileDescriptorsInNodejs": "Trabajando con descriptores de archivo en Node.js", + "readingFilesWithNodejs": "Leyendo archivos con Node.js", + "writingFilesWithNodejs": "Escribiendo archivos con Node.js", + "workingWithFoldersInNodejs": "Trabajando con carpetas en Node.js", + "workingWithDifferentFilesystems": "Cómo trabajar con diferentes sistemas de archivos" + } + }, + "commandLine": { + "links": { + "commandLine": "Línea de comandos", + "runNodejsScriptsFromTheCommandLine": "Ejecutando scripts de Node.js desde la línea de comandos", + "howToReadEnvironmentVariablesFromNodejs": "Como leer variables de entorno desde Node.js", + "howToUseTheNodejsRepl": "Cómo usar el REPL de Node.js", + "outputToTheCommandLineUsingNodejs": "Salida de línea de comandos usando Node.js", + "acceptInputFromTheCommandLineInNodejs": "Aceptar entrada desde la línea de comandos en Node.js" + } + }, + "modules": { + "links": { + "modules": "Módulos", + "publishingNodeApiModules": "Cómo publicar un paquete de Node-API", + "anatomyOfAnHttpTransaction": "Anatomía de una transacción HTTP", + "abiStability": "Estabilidad ABI", + "backpressuringInStreams": "Control de flujo en Streams" + } + }, + "diagnostics": { + "links": { + "diagnostics": "Diagnósticos", + "userJourney": "Recorrido del usuario", + "memory": "Memoria", + "liveDebugging": "Depuración en tiempo real", + "poorPerformance": "Rendimiento deficiente", + "flameGraphs": "Gráficos de llama" + } + }, + "testRunner": { + "links": { + "testRunner": "Ejecutor de pruebas", + "introduction": "Descubriendo el ejecutor de pruebas de Node.js", + "usingTestRunner": "Utilizando el ejecutor de pruebas de Node.js", + "mocking": "Simulación en pruebas" + } + } + }, + "about": { + "links": { + "about": "Sobre Node.js", + "aboutSide": "Sobre Node.js®", + "branding": "Marca de Node.js", + "governance": "Gobernanza del proyecto", + "releases": "Lanzamientos de Node.js", + "security": "Reporte de Seguridad" + } + }, + "getInvolved": { + "links": { + "getInvolved": "Colaborar", + "collabSummit": "Cumbre de Colaboradores", + "upcomingEvents": "Próximos Eventos", + "contribute": "Contribuir a Node.js", + "codeOfConduct": "Código de Conducta" + } + } + }, + "downloadList": { + "links": { + "previousReleases": "Lanzamientos de Node.js", + "packageManager": "Instalar Node.js mediante un gestor de paquetes", + "shaSums": { + "title": "SHASUMS firmados para archivos de lanzamiento", + "howToVerify": " (Cómo verificarlo)" + }, + "allDownloads": "Todas las opciones de descarga", + "nightlyReleases": "Versiones Nightly", + "unofficialBuilds": "Versiones no oficiales", + "buildingFromSource": "Compilar Node.js desde el código fuente en plataformas compatibles", + "installingOnLinux": "Instalar Node.js a través del archivo binario", + "installingOnWsl": "Instalar en Windows Subsystem for Linux (WSL)" + } + }, + "downloadReleasesTable": { + "changelog": "Historial", + "releases": "Lanzamientos", + "docs": "Documentación" + }, + "pagination": { + "next": "Siguiente", + "previous": "Anterior" + }, + "common": { + "breadcrumbs": { + "navigateToHome": "Ir al inicio" + }, + "crossLink": { + "previous": "Anterior", + "next": "Siguiente" + }, + "codebox": { + "copy": "Copiar al portapapeles", + "copied": "¡Copiado al portapapeles!" + }, + "pagination": { + "prev": "Previo", + "prevAriaLabel": "Página anterior", + "next": "Siguiente", + "nextAriaLabel": "Página siguiente", + "defaultLabel": "Paginación", + "pageLabel": "Ir a la página {pageNumber}" + }, + "sidebar": { + "title": "Cambiar página" + }, + "languageDropdown": { + "label": "Seleccionar idioma" + }, + "themeToggle": { + "label": "Alternar Modo Oscuro" + } + }, + "metabar": { + "lastUpdated": "Última Actualización", + "readingTime": "Tiempo de Lectura", + "addedIn": "Agregado en", + "author": "Autor", + "authors": "Autores", + "contribute": "Contribuir", + "contributeText": "Editar esta página", + "viewAs": "Mostrar como", + "tableOfContents": "Tabla de Contenidos" + }, + "downloads": { + "changelogModal": { + "startContributing": "Comienza a Contribuir" + } + }, + "search": { + "searchBox": { + "placeholder": "Empezar a escribir..." + }, + "seeAll": { + "text": "Ver los {count} resultados" + }, + "searchError": { + "text": "Ocurrió un error mientras se realizaba la búsqueda. Por favor, intenta nuevamente más tarde." + }, + "poweredBy": { + "text": "Impulsado por" + }, + "noResults": { + "text": "Lo sentimos, no hay resultados para {query}." + }, + "emptyState": { + "text": "Buscar algo..." + }, + "searchPage": { + "title": "Usted está buscando: {query}" + } + }, + "blog": { + "blogHeader": { + "subtitle": "Las últimas noticias de Node.js, estudios de caso, tutoriales y recursos.", + "rssLink": "Fuente RSS" + } + } + }, + "layouts": { + "blogPost": { + "author": { + "byLine": "{author, select, null {} other {Por {author}, }}" + } + }, + "blogIndex": { + "categoryName": "{category, select, all {Blog} other {Publicaciones de blog {category}}}" + }, + "blog": { + "title": "Blog", + "selectCategory": "Categorías", + "categories": { + "all": "Todo", + "announcements": "Anuncios", + "release": "Lanzamientos", + "vulnerability": "Vulnerabilidades", + "advisory-board": "Consejo Asesor", + "community": "Comunidad", + "feature": "Característica", + "module": "Módulo", + "npm": "npm", + "uncategorized": "Sin categoría", + "video": "Video", + "weekly": "Actualizaciones semanales", + "wg": "Grupos de trabajo", + "events": "Eventos" + } + }, + "error": { + "notFound": { + "title": "No se pudo encontrar la página", + "description": "Lo siento, no pudimos encontrar la página que buscas. Intenta nuevamente desde la página de inicio." + }, + "internalServerError": { + "title": "Error interno del servidor", + "description": "Esta página ha generado un error no recuperable." + }, + "backToHome": "Volver al inicio" + }, + "download": { + "selectCategory": "Categorías", + "categories": { + "prebuilt-installer": "Instalador precompilado", + "prebuilt-binaries": "Binarios precompilados", + "package-manager": "Gestor de Paquetes", + "source-code": "Código Fuente" + }, + "buttons": { + "prebuilt": "Descargar Node.js {version}", + "source": "Descargar código fuente de Node.js {version}" + }, + "dropdown": { + "bitness": "Arquitectura", + "os": "Sistema Operativo", + "version": "Versión", + "platform": "Plataforma" + }, + "codeBox": { + "unsupportedVersionWarning": "Esta versión está fuera de mantenimiento. Encuentre más información aquí:", + "fnmEnvSetup": "configurar el entorno de fnm", + "systemManagerWarning": "no es un manejador de paquetes de Node.js. Por favor, asegúrate de tener un {packageManager} instalado.", + "communityWarning": "El proyecto Node.js no mantiene los gestores de paquetes ni sus scripts de instalación.", + "communityWarningReport": "Si encuentras problemas, por favor, contacta con los mantenedores del manejador de paquetes.", + "installsNvm": "instala nvm (Node Version Manager)", + "downloadAndInstallNodejsRestartTerminal": "descargar e instalar Node.js (es posible que necesites reiniciar la terminal)", + "verifiesRightNodejsVersion": "verifica que la versión correcta de Node.js se encuentra en el entorno", + "verifiesRightNpmVersion": "verifica que la versión correcta de npm está en el entorno", + "shouldPrint": "debería de imprimir `{version}`", + "installsFnm": "instala fnm (Fast Node Manager)", + "downloadAndInstallNodejs": "descarga e instala Node.js", + "activateFNM": "activar fnm", + "noteWithColon": "NOTA:", + "dockerIsNotNodejsPackageManager": "Docker no es un administrador de paquetes de Node.js.", + "PleaseEndureAlreadyInstallOnSystem": "Por favor asegúrese de que ya esté instalado en su sistema.", + "dockerInstructions": "Siga las instrucciones oficiales en https://docs.docker.com/desktop/", + "dockerImagesLink": "Las imágenes de Docker se proporcionan oficialmente en https://github.com/nodejs/docker-node/", + "pullsNodejsDockerImage": "descarga la imagen de Docker de Node.js", + "homebrewIsNotNodejsPackageManager": "Homebrew no es un administrador de paquetes de Node.js.", + "homebrewInstructions": "Siga las instrucciones oficiales en https://brew.sh/", + "homebrewSupportsIntallingMajorNodejsVersion": "Homebrew solo admite la instalación de versiones principales de Node.js y puede que no sea compatible con la última versión de Node.js de la línea de lanzamiento {version}.", + "chocolateyIsNotNodejsPackageManager": "Chocolatey no es un administrador de paquetes de Node.js.", + "chocolateyInstructions": "Siga las instrucciones oficiales en https://chocolatey.org/", + "chocolateyNotMaintanedByNodejs": "Chocolatey no es mantenido oficialmente por el proyecto Node.js y puede que no sea compatible con la versión {version} de Node.js" + } + } + } +} From 115b3451248d04442f3989dd370d4e4f7305a696 Mon Sep 17 00:00:00 2001 From: bmuenzenmeyer Date: Sun, 15 Dec 2024 19:59:11 +0000 Subject: [PATCH 2/3] chore: automated format of translated files Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- apps/site/pages/es/about/branding.mdx | 12 +- apps/site/pages/es/about/index.mdx | 16 +- .../pages/es/about/security-reporting.mdx | 11 +- .../es/download/package-manager/current.mdx | 1 + .../es/download/package-manager/index.mdx | 1 + .../es/download/prebuilt-binaries/current.mdx | 1 + .../es/download/prebuilt-binaries/index.mdx | 1 + .../download/prebuilt-installer/current.mdx | 1 + .../es/download/prebuilt-installer/index.mdx | 1 + .../pages/es/download/source-code/current.mdx | 1 + .../pages/es/download/source-code/index.mdx | 1 + apps/site/pages/es/index.mdx | 173 +++++++++--------- apps/site/pages/fa/about/index.mdx | 16 +- .../pages/fa/about/security-reporting.mdx | 11 +- apps/site/pages/fr/about/branding.mdx | 12 +- apps/site/pages/fr/about/index.mdx | 16 +- .../pages/fr/about/security-reporting.mdx | 11 +- .../fr/download/package-manager/current.mdx | 1 + .../fr/download/package-manager/index.mdx | 1 + .../fr/download/prebuilt-binaries/current.mdx | 1 + .../fr/download/prebuilt-binaries/index.mdx | 1 + .../download/prebuilt-installer/current.mdx | 1 + .../fr/download/prebuilt-installer/index.mdx | 1 + .../pages/fr/download/source-code/current.mdx | 1 + .../pages/fr/download/source-code/index.mdx | 1 + apps/site/pages/fr/index.mdx | 169 +++++++++-------- apps/site/pages/id/about/branding.mdx | 12 +- apps/site/pages/id/about/index.mdx | 18 +- .../pages/id/about/security-reporting.mdx | 6 +- .../id/download/package-manager/current.mdx | 1 + .../id/download/package-manager/index.mdx | 1 + .../id/download/prebuilt-binaries/current.mdx | 1 + .../id/download/prebuilt-binaries/index.mdx | 1 + .../download/prebuilt-installer/current.mdx | 1 + .../id/download/prebuilt-installer/index.mdx | 1 + .../pages/id/download/source-code/current.mdx | 1 + .../pages/id/download/source-code/index.mdx | 1 + apps/site/pages/id/index.mdx | 173 +++++++++--------- apps/site/pages/ja/about/index.mdx | 16 +- apps/site/pages/ko/about/branding.mdx | 12 +- apps/site/pages/ko/about/index.mdx | 16 +- .../pages/ko/about/security-reporting.mdx | 11 +- .../ko/download/package-manager/current.mdx | 4 +- .../ko/download/package-manager/index.mdx | 4 +- .../ko/download/prebuilt-binaries/current.mdx | 3 +- .../ko/download/prebuilt-binaries/index.mdx | 3 +- .../download/prebuilt-installer/current.mdx | 3 +- .../ko/download/prebuilt-installer/index.mdx | 3 +- .../pages/ko/download/source-code/current.mdx | 4 +- .../pages/ko/download/source-code/index.mdx | 4 +- apps/site/pages/ko/index.mdx | 169 +++++++++-------- apps/site/pages/pt/about/index.mdx | 16 +- .../pages/pt/about/security-reporting.mdx | 11 +- apps/site/pages/tr/about/index.mdx | 16 +- .../pages/tr/about/security-reporting.mdx | 11 +- apps/site/pages/uk/about/branding.mdx | 12 +- apps/site/pages/uk/about/index.mdx | 16 +- .../pages/uk/about/security-reporting.mdx | 11 +- .../uk/download/package-manager/current.mdx | 1 + .../uk/download/package-manager/index.mdx | 1 + .../uk/download/prebuilt-binaries/current.mdx | 1 + .../uk/download/prebuilt-binaries/index.mdx | 1 + .../download/prebuilt-installer/current.mdx | 1 + .../uk/download/prebuilt-installer/index.mdx | 1 + .../pages/uk/download/source-code/current.mdx | 1 + .../pages/uk/download/source-code/index.mdx | 1 + apps/site/pages/uk/index.mdx | 171 ++++++++--------- apps/site/pages/zh-cn/about/index.mdx | 18 +- .../pages/zh-cn/about/security-reporting.mdx | 11 +- apps/site/pages/zh-tw/about/index.mdx | 16 +- .../pages/zh-tw/about/security-reporting.mdx | 11 +- 71 files changed, 728 insertions(+), 532 deletions(-) diff --git a/apps/site/pages/es/about/branding.mdx b/apps/site/pages/es/about/branding.mdx index 36ceead6ad870..08ccf552e7e9d 100644 --- a/apps/site/pages/es/about/branding.mdx +++ b/apps/site/pages/es/about/branding.mdx @@ -11,7 +11,13 @@ Por favor revise la [política de la marca comercial](https://trademark-policy.o Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por diseñar y contribuir con la Tortuga Cohete. -Mascota de Node.js +Mascota de Node.js ## Logo de Node.js® @@ -27,6 +33,7 @@ Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por dise Logo Horizontal Claro de Node.js + @@ -43,6 +50,7 @@ Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por dise Logo Apilado Claro de Node.js + @@ -53,6 +61,7 @@ Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por dise Logo Apilado Blanco de Node.js + @@ -69,6 +78,7 @@ Créditos a [Angela Angelini](https://www.linkedin.com/in/angeliningl/) por dise Iconos Blanco de JS + diff --git a/apps/site/pages/es/about/index.mdx b/apps/site/pages/es/about/index.mdx index b9f211b01e657..df9cfdc257303 100644 --- a/apps/site/pages/es/about/index.mdx +++ b/apps/site/pages/es/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/es/about/security-reporting.mdx b/apps/site/pages/es/about/security-reporting.mdx index 0cc5351ce5d68..012bfa538e2ff 100644 --- a/apps/site/pages/es/about/security-reporting.mdx +++ b/apps/site/pages/es/about/security-reporting.mdx @@ -53,8 +53,15 @@ Si tienes sugerencias sobre cómo podría mejorarse este proceso, por favor, env ## Mejores Prácticas de la OpenSSF - -Insignia OpenSSF + + Insignia OpenSSF La [Insignia de Buenas Prácticas](https://github.com/coreinfrastructure/best-practices-badge) de la Fundación de Seguridad del Software Abierto (OpenSSF) es una manera en que los proyectos de Software Libre y de Código Abierto (FLOSS) pueden mostrar que siguen las mejores prácticas. Los proyectos pueden auto-certificarse voluntariamente sobre cómo siguen cada buena práctica. Los consumidores de la insignia pueden evaluar rápidamente qué proyectos FLOSS siguen las mejores prácticas y, como resultado, tienen más probabilidades de producir software seguro de alta calidad. diff --git a/apps/site/pages/es/download/package-manager/current.mdx b/apps/site/pages/es/download/package-manager/current.mdx index 15c29b9f1968a..3146d367bf9da 100644 --- a/apps/site/pages/es/download/package-manager/current.mdx +++ b/apps/site/pages/es/download/package-manager/current.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS Comprueba otros gestores de paquetes soportados por la comunidad + diff --git a/apps/site/pages/es/download/package-manager/index.mdx b/apps/site/pages/es/download/package-manager/index.mdx index 9c401161c32f0..52f4acbabc1a9 100644 --- a/apps/site/pages/es/download/package-manager/index.mdx +++ b/apps/site/pages/es/download/package-manager/index.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS Comprueba otros gestores de paquetes soportados por la comunidad + diff --git a/apps/site/pages/es/download/prebuilt-binaries/current.mdx b/apps/site/pages/es/download/prebuilt-binaries/current.mdx index a6b14bba71c70..04509a058ed20 100644 --- a/apps/site/pages/es/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/es/download/prebuilt-binaries/current.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS Comprueba los binarios pre construidos de Nightly o las Construcciones no oficiales para otras plataformas + diff --git a/apps/site/pages/es/download/prebuilt-binaries/index.mdx b/apps/site/pages/es/download/prebuilt-binaries/index.mdx index aebd6b490159a..5420e8b6ba326 100644 --- a/apps/site/pages/es/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/es/download/prebuilt-binaries/index.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS. Échale un vistazo a los binarios precompilados Nightly, todos los binarios precompilados de los Lanzamiento, o las versiones no oficiales para otras plataformas. + diff --git a/apps/site/pages/es/download/prebuilt-installer/current.mdx b/apps/site/pages/es/download/prebuilt-installer/current.mdx index d6a9735ee9328..7a86bfca08da8 100644 --- a/apps/site/pages/es/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/es/download/prebuilt-installer/current.mdx @@ -22,4 +22,5 @@ Aprende a cómo verificar la firma SHASUMSopciones de descarga de Node.js disponibles Aprende sobre Versiones de Node.js + diff --git a/apps/site/pages/es/download/prebuilt-installer/index.mdx b/apps/site/pages/es/download/prebuilt-installer/index.mdx index de341374dd88c..3eb5c29645c3b 100644 --- a/apps/site/pages/es/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/es/download/prebuilt-installer/index.mdx @@ -22,4 +22,5 @@ Aprende a cómo verificar la firma SHASUMSopciones de descarga de Node.js disponibles Aprende sobre Versiones de Node.js + diff --git a/apps/site/pages/es/download/source-code/current.mdx b/apps/site/pages/es/download/source-code/current.mdx index 168ca24032753..059d8e9d82a3b 100644 --- a/apps/site/pages/es/download/source-code/current.mdx +++ b/apps/site/pages/es/download/source-code/current.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS Consulta cómo construir Node.js desde el código fuente. + diff --git a/apps/site/pages/es/download/source-code/index.mdx b/apps/site/pages/es/download/source-code/index.mdx index 6715c69cb2f78..07cc059e9e693 100644 --- a/apps/site/pages/es/download/source-code/index.mdx +++ b/apps/site/pages/es/download/source-code/index.mdx @@ -20,4 +20,5 @@ Lee el artículo del blog para esta Aprende a cómo verificar la firma SHASUMS Verifica cómo construir Node.js desde el código fuente. + diff --git a/apps/site/pages/es/index.mdx b/apps/site/pages/es/index.mdx index 933f6fd7a1bfc..5ef18bf2575ed 100644 --- a/apps/site/pages/es/index.mdx +++ b/apps/site/pages/es/index.mdx @@ -9,9 +9,10 @@ layout: home

Ejecuta JavaScript en cualquier parte

- Node.js® es un entorno de ejecución de JavaScript multiplataforma, - de código abierto y gratuito que permite a los desarrolladores crear servidores, - aplicaciones web, herramientas de línea de comando y scripts. +Node.js® es un entorno de ejecución de JavaScript multiplataforma, +de código abierto y gratuito que permite a los desarrolladores crear servidores, +aplicaciones web, herramientas de línea de comando y scripts. +
@@ -46,87 +47,93 @@ layout: home // server.mjs import { createServer } from 'node:http'; - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` +const server = createServer((req, res) => { +res.writeHead(200, { 'Content-Type': 'text/plain' }); +res.end('Hello World!\n'); +}); + +// starts a simple http server locally on port 3000 +server.listen(3000, '127.0.0.1', () => { +console.log('Listening on 127.0.0.1:3000'); +}); + +// run with `node server.mjs` + +```` + +```js displayName="Write Tests" +// tests.mjs +import assert from 'node:assert'; +import test from 'node:test'; + +test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); +}); + +test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); +}); + +// run with `node tests.mjs` +```` + +```js displayName="Read and Hash a File" +// crypto.mjs +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const hasher = createHash('sha1'); + +hasher.setEncoding('hex'); +// ensure you have a `package.json` file for this test! +hasher.write(await readFile('package.json')); +hasher.end(); + +const fileHash = hasher.read(); + +// run with `node crypto.mjs` +``` + +```js displayName="Streams Pipeline" +// streams.mjs +import { pipeline } from 'node:stream/promises'; +import { createReadStream, createWriteStream } from 'node:fs'; +import { createGzip } from 'node:zlib'; + +// ensure you have a `package.json` file for this test! +await pipeline( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') +); + +// run with `node streams.mjs` +``` + +```js displayName="Work with Threads" +// threads.mjs +import { + Worker, + isMainThread, + workerData, + parentPort, +} from 'node:worker_threads'; + +if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); +} else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); +} + +// run with `node threads.mjs` +``` +
Aprenda más sobre lo que Node.js puede ofrecer con nuestros [Materiales de aprendizaje](/learn). + diff --git a/apps/site/pages/fa/about/index.mdx b/apps/site/pages/fa/about/index.mdx index 2d344a52bed70..1bc8bbe99714b 100644 --- a/apps/site/pages/fa/about/index.mdx +++ b/apps/site/pages/fa/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/fa/about/security-reporting.mdx b/apps/site/pages/fa/about/security-reporting.mdx index 5060752c1d758..ab8dafdc590ec 100644 --- a/apps/site/pages/fa/about/security-reporting.mdx +++ b/apps/site/pages/fa/about/security-reporting.mdx @@ -50,8 +50,15 @@ layout: about ## رویه‌های بهینه OpenSSF - -نشان OpenSSF + + نشان OpenSSF [نشان بهترین شیوه ها](https://github.com/coreinfrastructure/best-practices-badge) بنیاد امنیت متن باز (OpenSSF) راهی است برای پروژه‌های نرم‌افزار آزاد/رایگان و متن باز (FLOSS) تا نشان دهند که از رویه‌های بهینه پیروی می‌کنند. پروژه‌ها می‌توانند به صورت داوطلبانه خود تأیید کنند که چگونه از هر رویه بهینه پیروی می‌کنند. مصرف‌کنندگان این نشان می‌توانند به سرعت ارزیابی کنند که کدام پروژه‌های FLOSS از رویه‌های بهینه پیروی می‌کنند و در نتیجه احتمال بیشتری دارد که نرم‌افزارهای امن با کیفیت بالاتر تولید کنند. diff --git a/apps/site/pages/fr/about/branding.mdx b/apps/site/pages/fr/about/branding.mdx index 7b1c241923000..bd7fe749280d8 100644 --- a/apps/site/pages/fr/about/branding.mdx +++ b/apps/site/pages/fr/about/branding.mdx @@ -11,7 +11,13 @@ Veuillez consulter la [politique en matière de marques](https://trademark-polic Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la conception et la contribution de la tortue-fusée. -Mascotte de Node.js +Mascotte de Node.js ## Logo Node.js® @@ -27,6 +33,7 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo horizontal clair de Node.js + @@ -43,6 +50,7 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo empilé clair de Node.js + @@ -53,6 +61,7 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Logo empilé blanc de Node.js + @@ -69,6 +78,7 @@ Crédit à [Angela Angelini](https://www.linkedin.com/in/angeliningl/) pour la c Icons JS Blanc + diff --git a/apps/site/pages/fr/about/index.mdx b/apps/site/pages/fr/about/index.mdx index 89ec644e63ba1..c08e7bff80aa4 100644 --- a/apps/site/pages/fr/about/index.mdx +++ b/apps/site/pages/fr/about/index.mdx @@ -17,13 +17,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -34,13 +34,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/fr/about/security-reporting.mdx b/apps/site/pages/fr/about/security-reporting.mdx index d811ded7a3dde..b17332a3543ac 100644 --- a/apps/site/pages/fr/about/security-reporting.mdx +++ b/apps/site/pages/fr/about/security-reporting.mdx @@ -74,8 +74,15 @@ Si vous avez des suggestions sur la façon dont ce processus pourrait être amé ## OpenSSF Best Practices - -Badge OpenSSF + + Badge OpenSSF Le [badge des meilleures pratiques] de l'Open Source Security Foundation (OpenSSF) (https://github.com/coreinfrastructure/best-practices-badge) est un moyen pour les projets de logiciels libres et open source (FLOSS) de montrer qu'ils suivent les meilleures pratiques. Les projets peuvent volontairement auto-certifier la manière dont ils suivent chaque meilleure pratique. Les utilisateurs du badge peuvent rapidement déterminer quels sont les projets FLOSS qui suivent les meilleures pratiques et qui sont donc plus susceptibles de produire des logiciels sécurisés de meilleure qualité. diff --git a/apps/site/pages/fr/download/package-manager/current.mdx b/apps/site/pages/fr/download/package-manager/current.mdx index b0076bba81413..a7b2f9969b4f7 100644 --- a/apps/site/pages/fr/download/package-manager/current.mdx +++ b/apps/site/pages/fr/download/package-manager/current.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez d'autres gestionnaires de paquets soutenus par la communauté + diff --git a/apps/site/pages/fr/download/package-manager/index.mdx b/apps/site/pages/fr/download/package-manager/index.mdx index 03287f36f11d7..b9b4197b0960c 100644 --- a/apps/site/pages/fr/download/package-manager/index.mdx +++ b/apps/site/pages/fr/download/package-manager/index.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez d'autres gestionnaires de paquets soutenus par la communauté + diff --git a/apps/site/pages/fr/download/prebuilt-binaries/current.mdx b/apps/site/pages/fr/download/prebuilt-binaries/current.mdx index 216c348100248..dcdad7cc77e90 100644 --- a/apps/site/pages/fr/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/fr/download/prebuilt-binaries/current.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Consultez les binaires préconstruits Nightly ou les Unofficial Builds pour d'autres plateformes. + diff --git a/apps/site/pages/fr/download/prebuilt-binaries/index.mdx b/apps/site/pages/fr/download/prebuilt-binaries/index.mdx index 6cd5fcaca7565..4bed42857cf5d 100644 --- a/apps/site/pages/fr/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/fr/download/prebuilt-binaries/index.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés. Consultez les binaires préconstruits Nightly, tous les binaires préconstruits Release ou Builds Non Officiels pour les autres plateformes. + diff --git a/apps/site/pages/fr/download/prebuilt-installer/current.mdx b/apps/site/pages/fr/download/prebuilt-installer/current.mdx index d18e2db9e03f8..1a51285899b70 100644 --- a/apps/site/pages/fr/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/fr/download/prebuilt-installer/current.mdx @@ -22,4 +22,5 @@ Apprenez à vérifier les SHASUMSoptions de téléchargement de Node.js. En savoir plus sur les Versions Node.js + diff --git a/apps/site/pages/fr/download/prebuilt-installer/index.mdx b/apps/site/pages/fr/download/prebuilt-installer/index.mdx index 17233c160eaad..b28ec06f8e16a 100644 --- a/apps/site/pages/fr/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/fr/download/prebuilt-installer/index.mdx @@ -22,4 +22,5 @@ Apprenez à vérifier les SHASUMSoptions de téléchargement de Node.js. En savoir plus sur les Versions Node.js + diff --git a/apps/site/pages/fr/download/source-code/current.mdx b/apps/site/pages/fr/download/source-code/current.mdx index b4a6c1c8170eb..d4fbc07f30be7 100644 --- a/apps/site/pages/fr/download/source-code/current.mdx +++ b/apps/site/pages/fr/download/source-code/current.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Découvrez comment compiler Node.js à partir des sources. + diff --git a/apps/site/pages/fr/download/source-code/index.mdx b/apps/site/pages/fr/download/source-code/index.mdx index b4a6c1c8170eb..d4fbc07f30be7 100644 --- a/apps/site/pages/fr/download/source-code/index.mdx +++ b/apps/site/pages/fr/download/source-code/index.mdx @@ -20,4 +20,5 @@ Lire le journal des modifications p Apprenez à vérifier les SHASUMS signés Découvrez comment compiler Node.js à partir des sources. + diff --git a/apps/site/pages/fr/index.mdx b/apps/site/pages/fr/index.mdx index e7ff5e8f88325..2cd1371107d46 100644 --- a/apps/site/pages/fr/index.mdx +++ b/apps/site/pages/fr/index.mdx @@ -9,7 +9,8 @@ layout: home

Exécuter du JavaScript partout

- Node.js® est un environnement d'exécution JavaScript gratuit, open-source et multiplateforme qui permet aux développeurs de créer des serveurs, des applications web, des outils en ligne de commande et des scripts. +Node.js® est un environnement d'exécution JavaScript gratuit, open-source et multiplateforme qui permet aux développeurs de créer des serveurs, des applications web, des outils en ligne de commande et des scripts. +
@@ -44,87 +45,93 @@ layout: home // server.mjs import { createServer } from 'node:http'; - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` +const server = createServer((req, res) => { +res.writeHead(200, { 'Content-Type': 'text/plain' }); +res.end('Hello World!\n'); +}); + +// starts a simple http server locally on port 3000 +server.listen(3000, '127.0.0.1', () => { +console.log('Listening on 127.0.0.1:3000'); +}); + +// run with `node server.mjs` + +```` + +```js displayName="Write Tests" +// tests.mjs +import assert from 'node:assert'; +import test from 'node:test'; + +test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); +}); + +test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); +}); + +// run with `node tests.mjs` +```` + +```js displayName="Read and Hash a File" +// crypto.mjs +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const hasher = createHash('sha1'); + +hasher.setEncoding('hex'); +// ensure you have a `package.json` file for this test! +hasher.write(await readFile('package.json')); +hasher.end(); + +const fileHash = hasher.read(); + +// run with `node crypto.mjs` +``` + +```js displayName="Streams Pipeline" +// streams.mjs +import { pipeline } from 'node:stream/promises'; +import { createReadStream, createWriteStream } from 'node:fs'; +import { createGzip } from 'node:zlib'; + +// ensure you have a `package.json` file for this test! +await pipeline( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') +); + +// run with `node streams.mjs` +``` + +```js displayName="Work with Threads" +// threads.mjs +import { + Worker, + isMainThread, + workerData, + parentPort, +} from 'node:worker_threads'; + +if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); +} else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); +} + +// run with `node threads.mjs` +``` +
Apprenez-en plus sur ce que Node.js est capable d'offrir avec notre [Matériel d'apprentissage](/learn). + diff --git a/apps/site/pages/id/about/branding.mdx b/apps/site/pages/id/about/branding.mdx index 58c108b838b20..503745304067a 100644 --- a/apps/site/pages/id/about/branding.mdx +++ b/apps/site/pages/id/about/branding.mdx @@ -11,7 +11,13 @@ Harap tinjau [kebijakan merek dagang](https://trademark-policy.openjsf.org/) unt Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) atas desain dan kontribusinya terhadap Rocket Turtle. -Node.js mascot +Node.js mascot ## Logo Node.js® @@ -27,6 +33,7 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Terang Horizontal Node.js® + @@ -43,6 +50,7 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Terang Bertumpuk Node.js® + @@ -53,6 +61,7 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Logo Bertumpuk Putih Node.js + @@ -69,6 +78,7 @@ Penghargaan kepada [Angela Angelini](https://www.linkedin.com/in/angeliningl/) a Ikon JS Putih + diff --git a/apps/site/pages/id/about/index.mdx b/apps/site/pages/id/about/index.mdx index 4b81588bbf2f6..623a5c9777f81 100644 --- a/apps/site/pages/id/about/index.mdx +++ b/apps/site/pages/id/about/index.mdx @@ -17,13 +17,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -34,13 +34,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -62,7 +62,7 @@ HTTP adalah warga negara kelas satu di Node.js, dirancang dengan streaming dan r latensi dalam pikiran. Ini membuat Node.js sangat cocok untuk fondasi web perpustakaan atau kerangka kerja. -Node.js dirancang tanpa thread bukan berarti Anda tidak dapat memanfaatkan banyak inti di lingkungan Anda. Proses anak dapat dihasilkan dengan menggunakan API child\_process.fork() kami, dan dirancang agar mudah untuk berkomunikasi. Dibangun di atas antarmuka yang sama adalah modul cluster, yang memungkinkan Anda berbagi soket antar proses untuk mengaktifkan penyeimbangan beban pada inti Anda. +Node.js dirancang tanpa thread bukan berarti Anda tidak dapat memanfaatkan banyak inti di lingkungan Anda. Proses anak dapat dihasilkan dengan menggunakan API child_process.fork() kami, dan dirancang agar mudah untuk berkomunikasi. Dibangun di atas antarmuka yang sama adalah modul cluster, yang memungkinkan Anda berbagi soket antar proses untuk mengaktifkan penyeimbangan beban pada inti Anda. [blocking vs. non-blocking]: /learn/asynchronous-work/overview-of-blocking-vs-non-blocking [`child_process.fork()`]: https://nodejs.org/api/child_process.html diff --git a/apps/site/pages/id/about/security-reporting.mdx b/apps/site/pages/id/about/security-reporting.mdx index eec7c6747e8cd..d2808fcb4b6bd 100644 --- a/apps/site/pages/id/about/security-reporting.mdx +++ b/apps/site/pages/id/about/security-reporting.mdx @@ -51,7 +51,11 @@ Jika Anda memiliki saran tentang bagaimana proses ini dapat ditingkatkan, silaka ## Praktik Terbaik OpenSSF -OpenSSF Badge + OpenSSF Badge [Best Practices badge](https://github.com/coreinfrastructure/best-practices-badge) Open Source Security Foundation (OpenSSF) adalah cara bagi proyek Free/Libre dan Open Source Software (FLOSS) untuk menunjukkan bahwa mereka mengikuti praktik terbaik. Proyek dapat secara sukarela melakukan sertifikasi sendiri bagaimana mereka mengikuti setiap praktik terbaik. Konsumen yang tersertifikasi dapat dengan cepat menilai proyek FLOSS mana yang mengikuti praktik terbaik dan sebagai hasilnya, mereka lebih cenderung menghasilkan perangkat lunak aman berkualitas lebih tinggi. diff --git a/apps/site/pages/id/download/package-manager/current.mdx b/apps/site/pages/id/download/package-manager/current.mdx index 1f4c80e5b450a..34202cba92cd1 100644 --- a/apps/site/pages/id/download/package-manager/current.mdx +++ b/apps/site/pages/id/download/package-manager/current.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat pengelola paket yang didukung komunitas lainnya + diff --git a/apps/site/pages/id/download/package-manager/index.mdx b/apps/site/pages/id/download/package-manager/index.mdx index c2821b321849c..0e8e32f0ae34e 100644 --- a/apps/site/pages/id/download/package-manager/index.mdx +++ b/apps/site/pages/id/download/package-manager/index.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat pengelola paket yang didukung komunitas lainnya + diff --git a/apps/site/pages/id/download/prebuilt-binaries/current.mdx b/apps/site/pages/id/download/prebuilt-binaries/current.mdx index ecdab946b0480..f9063133c81d7 100644 --- a/apps/site/pages/id/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/id/download/prebuilt-binaries/current.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat biner pra-dibangun secara Nightly atau Bangunan Tidak Resmi untuk platform lain + diff --git a/apps/site/pages/id/download/prebuilt-binaries/index.mdx b/apps/site/pages/id/download/prebuilt-binaries/index.mdx index 9ea085550ce16..a3620eb74aa01 100644 --- a/apps/site/pages/id/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/id/download/prebuilt-binaries/index.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani. Lihat biner pra-dibangun secara Nightly, semua biner pra-dibangun Rilis, atau Bangunan Tidak Resmi untuk platform lain. + diff --git a/apps/site/pages/id/download/prebuilt-installer/current.mdx b/apps/site/pages/id/download/prebuilt-installer/current.mdx index 323138c077ac3..eac81f06f0310 100644 --- a/apps/site/pages/id/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/id/download/prebuilt-installer/current.mdx @@ -22,4 +22,5 @@ Pelajari cara memverifikasi SHASUMS yang ditandat Lihat semua opsi unduh Node.js yang tersedia Pelajari tentang Rilis Node.js + diff --git a/apps/site/pages/id/download/prebuilt-installer/index.mdx b/apps/site/pages/id/download/prebuilt-installer/index.mdx index 8072e771136cc..9eedb9693390e 100644 --- a/apps/site/pages/id/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/id/download/prebuilt-installer/index.mdx @@ -22,4 +22,5 @@ Pelajari cara memverifikasi SHASUMS yang ditandat Lihat semua opsi unduh Node.js yang tersedia Pelajari tentang Rilis Node.js + diff --git a/apps/site/pages/id/download/source-code/current.mdx b/apps/site/pages/id/download/source-code/current.mdx index d209cd091b6c4..823a8bc7e5478 100644 --- a/apps/site/pages/id/download/source-code/current.mdx +++ b/apps/site/pages/id/download/source-code/current.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat bagaimana cara membangun Node.js dari sumber. + diff --git a/apps/site/pages/id/download/source-code/index.mdx b/apps/site/pages/id/download/source-code/index.mdx index d209cd091b6c4..823a8bc7e5478 100644 --- a/apps/site/pages/id/download/source-code/index.mdx +++ b/apps/site/pages/id/download/source-code/index.mdx @@ -20,4 +20,5 @@ Baca postingan blog untuk versi ini Pelajari cara memverifikasi SHASUMS yang ditandatangani Lihat bagaimana cara membangun Node.js dari sumber. + diff --git a/apps/site/pages/id/index.mdx b/apps/site/pages/id/index.mdx index 81c705ffaffe9..cbe152c9a454f 100644 --- a/apps/site/pages/id/index.mdx +++ b/apps/site/pages/id/index.mdx @@ -9,9 +9,10 @@ layout: home

Jalankan JavaScript Di Mana Saja

- Node.js® adalah lingkungan runtime JavaScript gratis dan sumber terbuka yang - lintas platform, yang memungkinkan pengembang membuat server, aplikasi web, - alat baris perintah, dan skrip. +Node.js® adalah lingkungan runtime JavaScript gratis dan sumber terbuka yang +lintas platform, yang memungkinkan pengembang membuat server, aplikasi web, +alat baris perintah, dan skrip. +
@@ -46,87 +47,93 @@ layout: home // server.mjs import { createServer } from 'node:http'; - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` +const server = createServer((req, res) => { +res.writeHead(200, { 'Content-Type': 'text/plain' }); +res.end('Hello World!\n'); +}); + +// starts a simple http server locally on port 3000 +server.listen(3000, '127.0.0.1', () => { +console.log('Listening on 127.0.0.1:3000'); +}); + +// run with `node server.mjs` + +```` + +```js displayName="Write Tests" +// tests.mjs +import assert from 'node:assert'; +import test from 'node:test'; + +test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); +}); + +test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); +}); + +// run with `node tests.mjs` +```` + +```js displayName="Read and Hash a File" +// crypto.mjs +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const hasher = createHash('sha1'); + +hasher.setEncoding('hex'); +// ensure you have a `package.json` file for this test! +hasher.write(await readFile('package.json')); +hasher.end(); + +const fileHash = hasher.read(); + +// run with `node crypto.mjs` +``` + +```js displayName="Streams Pipeline" +// streams.mjs +import { pipeline } from 'node:stream/promises'; +import { createReadStream, createWriteStream } from 'node:fs'; +import { createGzip } from 'node:zlib'; + +// ensure you have a `package.json` file for this test! +await pipeline( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') +); + +// run with `node streams.mjs` +``` + +```js displayName="Work with Threads" +// threads.mjs +import { + Worker, + isMainThread, + workerData, + parentPort, +} from 'node:worker_threads'; + +if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); +} else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); +} + +// run with `node threads.mjs` +``` +
Pelajari lebih lanjut tentang apa yang bisa ditawarkan Node.js melalui [Bahan Pembelajaran](/learn) kami. + diff --git a/apps/site/pages/ja/about/index.mdx b/apps/site/pages/ja/about/index.mdx index 7f5bc663529eb..00c987a077ad0 100644 --- a/apps/site/pages/ja/about/index.mdx +++ b/apps/site/pages/ja/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/ko/about/branding.mdx b/apps/site/pages/ko/about/branding.mdx index 12e8b5542e667..3b957d4cec5f4 100644 --- a/apps/site/pages/ko/about/branding.mdx +++ b/apps/site/pages/ko/about/branding.mdx @@ -11,7 +11,13 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 로켓 거북이를 디자인하고 기여한 [Angela Angelini](https://www.linkedin.com/in/angeliningl/)에게 감사의 말씀을 전합니다. -Node.js 마스코트 +Node.js 마스코트 ## Node.js® 로고 @@ -27,6 +33,7 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 밝은 수평 로고 + @@ -43,6 +50,7 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 밝은 세로 로고 + @@ -53,6 +61,7 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 Node.js 흰색 세로 로고 + @@ -69,6 +78,7 @@ Node.js® 로고 및 마크의 허용 가능한 사용에 대한 정보는 [상 흰색 JS 아이콘 + diff --git a/apps/site/pages/ko/about/index.mdx b/apps/site/pages/ko/about/index.mdx index b72ea24718330..6b1f89e3ecfb4 100644 --- a/apps/site/pages/ko/about/index.mdx +++ b/apps/site/pages/ko/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/ko/about/security-reporting.mdx b/apps/site/pages/ko/about/security-reporting.mdx index 58ea3b0e620bb..3f5e5252363e8 100644 --- a/apps/site/pages/ko/about/security-reporting.mdx +++ b/apps/site/pages/ko/about/security-reporting.mdx @@ -50,8 +50,15 @@ Node.js의 보안 공개 정책은 다음과 같습니다. ## OpenSSF 모범 사례 - -OpenSSF 배지 + + OpenSSF 배지 Open Source Security Foundation(OpenSSF) [모범 사례 배지](https://github.com/coreinfrastructure/best-practices-badge)는 자유/오픈 소스 소프트웨어(FLOSS) 프로젝트가 모범 사례를 따르고 있음을 보여주는 방법입니다. 프로젝트는 자발적으로 각 사례를 어떻게 따르고 있는지에 대해 자체 인증할 수 있습니다. 이 배지를 확인하는 사용자들은 FLOSS 프로젝트가 모범 사례를 따르고 있는지 빠르게 평가할 수 있으며, 그 결과 더 높은 품질의 안전한 소프트웨어를 제작할 가능성이 높다는 것을 알 수 있습니다. diff --git a/apps/site/pages/ko/download/package-manager/current.mdx b/apps/site/pages/ko/download/package-manager/current.mdx index d015448897d85..0f279d8b4cecf 100644 --- a/apps/site/pages/ko/download/package-manager/current.mdx +++ b/apps/site/pages/ko/download/package-manager/current.mdx @@ -17,7 +17,9 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 알아보세요. +서명된 SHASUMS를 +확인하는 방법을 알아보세요. 커뮤니티에서 지원하는 다른 패키지 관리자도 확인하세요. + diff --git a/apps/site/pages/ko/download/package-manager/index.mdx b/apps/site/pages/ko/download/package-manager/index.mdx index d015448897d85..0f279d8b4cecf 100644 --- a/apps/site/pages/ko/download/package-manager/index.mdx +++ b/apps/site/pages/ko/download/package-manager/index.mdx @@ -17,7 +17,9 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 알아보세요. +서명된 SHASUMS를 +확인하는 방법을 알아보세요. 커뮤니티에서 지원하는 다른 패키지 관리자도 확인하세요. + diff --git a/apps/site/pages/ko/download/prebuilt-binaries/current.mdx b/apps/site/pages/ko/download/prebuilt-binaries/current.mdx index 055211d1c6bfa..c537c8a3ad8a0 100644 --- a/apps/site/pages/ko/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/ko/download/prebuilt-binaries/current.mdx @@ -17,7 +17,8 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 배워보세요. +서명된 SHASUMS를 +확인하는 방법을 배워보세요. Nightly 사전 빌드된 바이너리 또는 다른 플랫폼에 맞는 비공식 빌드를 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-binaries/index.mdx b/apps/site/pages/ko/download/prebuilt-binaries/index.mdx index 5c076d398c7fd..b938501de8686 100644 --- a/apps/site/pages/ko/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/ko/download/prebuilt-binaries/index.mdx @@ -17,7 +17,8 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 배워보세요. +서명된 SHASUMS를 +확인하는 방법을 배워보세요. Nightly 사전 빌드된 바이너리, 모든 Release 사전 빌드된 바이너리, 또는 다른 플랫폼에 맞는 비공식 빌드를 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-installer/current.mdx b/apps/site/pages/ko/download/prebuilt-installer/current.mdx index 3adf3a9d0f992..269e4bb2ad06e 100644 --- a/apps/site/pages/ko/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/ko/download/prebuilt-installer/current.mdx @@ -17,7 +17,8 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 배워보세요. +서명된 SHASUMS를 +확인하는 방법을 배워보세요. 모든 사용 가능한 Node.js 다운로드 옵션을 확인하세요. diff --git a/apps/site/pages/ko/download/prebuilt-installer/index.mdx b/apps/site/pages/ko/download/prebuilt-installer/index.mdx index 09d91c78f0a1c..40170f98fb381 100644 --- a/apps/site/pages/ko/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/ko/download/prebuilt-installer/index.mdx @@ -17,7 +17,8 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS를 확인하는 방법을 배워보세요. +서명된 SHASUMS를 +확인하는 방법을 배워보세요. 모든 사용 가능한 Node.js 다운로드 옵션을 확인하세요. diff --git a/apps/site/pages/ko/download/source-code/current.mdx b/apps/site/pages/ko/download/source-code/current.mdx index 6692b77a51758..85b8cba1c0dce 100644 --- a/apps/site/pages/ko/download/source-code/current.mdx +++ b/apps/site/pages/ko/download/source-code/current.mdx @@ -17,7 +17,9 @@ Node.js에는 가 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -서명된 SHASUMS을 확인하는 방법을 알아보세요. +서명된 SHASUMS을 +확인하는 방법을 알아보세요. Node.js를 소스에서 빌드하는 방법을 확인하세요. + diff --git a/apps/site/pages/ko/download/source-code/index.mdx b/apps/site/pages/ko/download/source-code/index.mdx index 9f58937a5d9b0..9917328435164 100644 --- a/apps/site/pages/ko/download/source-code/index.mdx +++ b/apps/site/pages/ko/download/source-code/index.mdx @@ -17,7 +17,9 @@ Node.js에는 이 포함되어 있습니다. 이 버전의 블로그 게시물을 확인하세요. -SHA 서명 확인라는 방법을 배워보세요. +SHA 서명 확인라는 +방법을 배워보세요. 코드에서 Node.js를 빌드하는 법을 확인해보세요. + diff --git a/apps/site/pages/ko/index.mdx b/apps/site/pages/ko/index.mdx index 575404dbbf5db..25f31ed624ab0 100644 --- a/apps/site/pages/ko/index.mdx +++ b/apps/site/pages/ko/index.mdx @@ -9,7 +9,8 @@ layout: home

어디서든 JavaScript를 실행하세요

- Node.js®는 무료, 오픈소스, 다중 플랫폼 JavaScript 런타임 환경으로 개발자 여러분이 서버, 웹 애플리케이션, 명령어 작성 도구와 스크립트를 만들도록 해줍니다. +Node.js®는 무료, 오픈소스, 다중 플랫폼 JavaScript 런타임 환경으로 개발자 여러분이 서버, 웹 애플리케이션, 명령어 작성 도구와 스크립트를 만들도록 해줍니다. +
@@ -44,87 +45,93 @@ layout: home // server.mjs import { createServer } from 'node:http'; - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` +const server = createServer((req, res) => { +res.writeHead(200, { 'Content-Type': 'text/plain' }); +res.end('Hello World!\n'); +}); + +// starts a simple http server locally on port 3000 +server.listen(3000, '127.0.0.1', () => { +console.log('Listening on 127.0.0.1:3000'); +}); + +// run with `node server.mjs` + +```` + +```js displayName="Write Tests" +// tests.mjs +import assert from 'node:assert'; +import test from 'node:test'; + +test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); +}); + +test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); +}); + +// run with `node tests.mjs` +```` + +```js displayName="Read and Hash a File" +// crypto.mjs +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const hasher = createHash('sha1'); + +hasher.setEncoding('hex'); +// ensure you have a `package.json` file for this test! +hasher.write(await readFile('package.json')); +hasher.end(); + +const fileHash = hasher.read(); + +// run with `node crypto.mjs` +``` + +```js displayName="Streams Pipeline" +// streams.mjs +import { pipeline } from 'node:stream/promises'; +import { createReadStream, createWriteStream } from 'node:fs'; +import { createGzip } from 'node:zlib'; + +// ensure you have a `package.json` file for this test! +await pipeline( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') +); + +// run with `node streams.mjs` +``` + +```js displayName="Work with Threads" +// threads.mjs +import { + Worker, + isMainThread, + workerData, + parentPort, +} from 'node:worker_threads'; + +if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); +} else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); +} + +// run with `node threads.mjs` +``` +
Node.js가 제공하는 [학습 자료](/learn)를 통해 더 많은 정보를 알아보세요. + diff --git a/apps/site/pages/pt/about/index.mdx b/apps/site/pages/pt/about/index.mdx index daaab4881380c..5a9795a95a8a3 100644 --- a/apps/site/pages/pt/about/index.mdx +++ b/apps/site/pages/pt/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/pt/about/security-reporting.mdx b/apps/site/pages/pt/about/security-reporting.mdx index 70272eaf6154a..184f4b990d644 100644 --- a/apps/site/pages/pt/about/security-reporting.mdx +++ b/apps/site/pages/pt/about/security-reporting.mdx @@ -50,8 +50,15 @@ Se tivermos sugestões sobre como este processo poderia ser melhorado, podemos s ## Boas Práticas da OpenSSF - -Distintivo da OpenSSF + + Distintivo da OpenSSF distintivo de boas práticas da “Open Source Security Foundation (OpenSSF)” é uma maneira de os projetos de Software Livre e de Código Aberto (FLOSS) mostrarem que seguem as boas práticas. Os projetos podem certificar-se voluntariamente como seguem cada uma das boas práticas. Os consumidores do distintivo podem avaliar rapidamente quais os projetos FLOSS que seguem as boas práticas e, consequentemente, têm maior probabilidade de produzir software seguro de superior qualidade. diff --git a/apps/site/pages/tr/about/index.mdx b/apps/site/pages/tr/about/index.mdx index 4973f55a84b66..bc4e9683f1bf1 100644 --- a/apps/site/pages/tr/about/index.mdx +++ b/apps/site/pages/tr/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/tr/about/security-reporting.mdx b/apps/site/pages/tr/about/security-reporting.mdx index fc13948715082..8c5cf0326847d 100644 --- a/apps/site/pages/tr/about/security-reporting.mdx +++ b/apps/site/pages/tr/about/security-reporting.mdx @@ -52,8 +52,15 @@ Tartışmak için [bir konuyu dosyalayın](https://github.com/nodejs/security-wg ## OpenSSF En İyi Uygulamaları - -OpenSSF Rozeti + + OpenSSF Rozeti Açık Kaynak Güvenlik Vakfı (OpenSSF) [En İyi Uygulamalar rozeti](https://github.com/coreinfrastructure/best-practices-badge), Özgür/Kütüphane ve Açık Kaynak Yazılım (FLOSS) projelerinin en iyi uygulamaları takip ettiklerini göstermeleri için bir yoldur. Projeler gönüllü olarak her bir en iyi uygulamayı nasıl takip ettiklerini kendi kendilerine belgeleyebilirler. Rozetin tüketicileri, hangi FLOSS projelerinin en iyi uygulamaları takip ettiğini ve sonuç olarak daha yüksek kalitede güvenli yazılım üretme olasılığının daha yüksek olduğunu hızlı bir şekilde değerlendirebilirler. diff --git a/apps/site/pages/uk/about/branding.mdx b/apps/site/pages/uk/about/branding.mdx index 03f2fc08f10bc..0d416c8a49ea4 100644 --- a/apps/site/pages/uk/about/branding.mdx +++ b/apps/site/pages/uk/about/branding.mdx @@ -11,7 +11,13 @@ layout: about Дякуємо [Анджелі Анджеліні](https://www.linkedin.com/in/angeliningl) за дизайн та внесок у Rocket Turtle. -Маскот Node.js +Маскот Node.js ## Логотип Node.js® @@ -27,6 +33,7 @@ layout: about Світлий горизонтальний логотип Node.js + @@ -43,6 +50,7 @@ layout: about Світлий складений логотип Node.js® + @@ -53,6 +61,7 @@ layout: about Білий складений логотип Node.js® + @@ -69,6 +78,7 @@ layout: about Білий значок JS + diff --git a/apps/site/pages/uk/about/index.mdx b/apps/site/pages/uk/about/index.mdx index 9fd7b29199885..8ace8ffa2c205 100644 --- a/apps/site/pages/uk/about/index.mdx +++ b/apps/site/pages/uk/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/uk/about/security-reporting.mdx b/apps/site/pages/uk/about/security-reporting.mdx index 94e72ebd933ff..c710284b2385d 100644 --- a/apps/site/pages/uk/about/security-reporting.mdx +++ b/apps/site/pages/uk/about/security-reporting.mdx @@ -51,8 +51,15 @@ layout: about ## Найкращі практики OpenSSF - -Значок OpenSSF + + Значок OpenSSF [Значок за найкращі практики](https://github.com/coreinfrastructure/best-practices-badge) від Open Source Security Foundation (OpenSSF) — це спосіб для проєктів із відкритим кодом (Free/Libre and Open Source Software, FLOSS) показати, що вони дотримуються найкращих практик. Проєкти можуть самостійно описати, як вони дотримуються кожної практики. Користувачі можуть швидко оцінити, які проєкти FLOSS дотримуються найкращих практик і, як результат, створювати безпечне ПЗ кращої якості. diff --git a/apps/site/pages/uk/download/package-manager/current.mdx b/apps/site/pages/uk/download/package-manager/current.mdx index 1c1b5e1966acc..8b614025c7f37 100644 --- a/apps/site/pages/uk/download/package-manager/current.mdx +++ b/apps/site/pages/uk/download/package-manager/current.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте інші менеджери пакетів, які підтримуються спільнотою + diff --git a/apps/site/pages/uk/download/package-manager/index.mdx b/apps/site/pages/uk/download/package-manager/index.mdx index 773c2808e4a15..d772ef049cc28 100644 --- a/apps/site/pages/uk/download/package-manager/index.mdx +++ b/apps/site/pages/uk/download/package-manager/index.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте інші менеджери пакетів, які підтримуються спільнотою + diff --git a/apps/site/pages/uk/download/prebuilt-binaries/current.mdx b/apps/site/pages/uk/download/prebuilt-binaries/current.mdx index b67bf809295e4..ee5f2d83f0638 100644 --- a/apps/site/pages/uk/download/prebuilt-binaries/current.mdx +++ b/apps/site/pages/uk/download/prebuilt-binaries/current.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Перегляньте бінарні файли нічних збірок або неофіційні збірки для інших платформ + diff --git a/apps/site/pages/uk/download/prebuilt-binaries/index.mdx b/apps/site/pages/uk/download/prebuilt-binaries/index.mdx index 1ee50b5a39f7d..0d0a6e3a5d189 100644 --- a/apps/site/pages/uk/download/prebuilt-binaries/index.mdx +++ b/apps/site/pages/uk/download/prebuilt-binaries/index.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS. Перегляньте бінарні файли нічних збірок, усі бінарні файли релізу або неофіційні збірки для інших платформ. + diff --git a/apps/site/pages/uk/download/prebuilt-installer/current.mdx b/apps/site/pages/uk/download/prebuilt-installer/current.mdx index 83713b2a1b951..05ba45d1fab18 100644 --- a/apps/site/pages/uk/download/prebuilt-installer/current.mdx +++ b/apps/site/pages/uk/download/prebuilt-installer/current.mdx @@ -22,4 +22,5 @@ Node.js містить . Перегляньте всі доступні опції завантаження Node.js Дізнайтеся більше про релізи Node.js + diff --git a/apps/site/pages/uk/download/prebuilt-installer/index.mdx b/apps/site/pages/uk/download/prebuilt-installer/index.mdx index ecbfeb4d53b88..2fcb5bd6067bb 100644 --- a/apps/site/pages/uk/download/prebuilt-installer/index.mdx +++ b/apps/site/pages/uk/download/prebuilt-installer/index.mdx @@ -22,4 +22,5 @@ Node.js містить . Перегляньте всі доступні опції завантаження Node.js Дізнайтеся більше про релізи Node.js + diff --git a/apps/site/pages/uk/download/source-code/current.mdx b/apps/site/pages/uk/download/source-code/current.mdx index de127381a2817..2d2846ddc04c7 100644 --- a/apps/site/pages/uk/download/source-code/current.mdx +++ b/apps/site/pages/uk/download/source-code/current.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Дізнайтеся, як зібрати Node.js із вихідного коду. + diff --git a/apps/site/pages/uk/download/source-code/index.mdx b/apps/site/pages/uk/download/source-code/index.mdx index de127381a2817..2d2846ddc04c7 100644 --- a/apps/site/pages/uk/download/source-code/index.mdx +++ b/apps/site/pages/uk/download/source-code/index.mdx @@ -20,4 +20,5 @@ Node.js містить . Дізнайтеся, як перевірити підписані SHASUMS Дізнайтеся, як зібрати Node.js із вихідного коду. + diff --git a/apps/site/pages/uk/index.mdx b/apps/site/pages/uk/index.mdx index 75d1d7d556be5..2b65d70048c87 100644 --- a/apps/site/pages/uk/index.mdx +++ b/apps/site/pages/uk/index.mdx @@ -9,8 +9,9 @@ layout: home

Запускайте JavaScript будь-де

- Node.js® — це безплатне, кросплатформне середовище виконання JavaScript із відкритим кодом, - яке дозволяє розробникам створювати сервери, вебзастосунки, інструменти командного рядка та скрипти. +Node.js® — це безплатне, кросплатформне середовище виконання JavaScript із відкритим кодом, +яке дозволяє розробникам створювати сервери, вебзастосунки, інструменти командного рядка та скрипти. +
@@ -45,87 +46,93 @@ layout: home // server.mjs import { createServer } from 'node:http'; - const server = createServer((req, res) => { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello World!\n'); - }); - - // starts a simple http server locally on port 3000 - server.listen(3000, '127.0.0.1', () => { - console.log('Listening on 127.0.0.1:3000'); - }); - - // run with `node server.mjs` - ``` - - ```js displayName="Write Tests" - // tests.mjs - import assert from 'node:assert'; - import test from 'node:test'; - - test('that 1 is equal 1', () => { - assert.strictEqual(1, 1); - }); - - test('that throws as 1 is not equal 2', () => { - // throws an exception because 1 != 2 - assert.strictEqual(1, 2); - }); - - // run with `node tests.mjs` - ``` - - ```js displayName="Read and Hash a File" - // crypto.mjs - import { createHash } from 'node:crypto'; - import { readFile } from 'node:fs/promises'; - - const hasher = createHash('sha1'); - - hasher.setEncoding('hex'); - // ensure you have a `package.json` file for this test! - hasher.write(await readFile('package.json')); - hasher.end(); - - const fileHash = hasher.read(); - - // run with `node crypto.mjs` - ``` - - ```js displayName="Streams Pipeline" - // streams.mjs - import { pipeline } from 'node:stream/promises'; - import { createReadStream, createWriteStream } from 'node:fs'; - import { createGzip } from 'node:zlib'; - - // ensure you have a `package.json` file for this test! - await pipeline - ( - createReadStream('package.json'), - createGzip(), - createWriteStream('package.json.gz') - ); - - // run with `node streams.mjs` - ``` - - ```js displayName="Work with Threads" - // threads.mjs - import { Worker, isMainThread, - workerData, parentPort } from 'node:worker_threads'; - - if (isMainThread) { - const data = 'some data'; - const worker = new Worker(import.meta.filename, { workerData: data }); - worker.on('message', msg => console.log('Reply from Thread:', msg)); - } else { - const source = workerData; - parentPort.postMessage(btoa(source.toUpperCase())); - } - - // run with `node threads.mjs` - ``` +const server = createServer((req, res) => { +res.writeHead(200, { 'Content-Type': 'text/plain' }); +res.end('Hello World!\n'); +}); + +// starts a simple http server locally on port 3000 +server.listen(3000, '127.0.0.1', () => { +console.log('Listening on 127.0.0.1:3000'); +}); + +// run with `node server.mjs` + +```` + +```js displayName="Write Tests" +// tests.mjs +import assert from 'node:assert'; +import test from 'node:test'; + +test('that 1 is equal 1', () => { + assert.strictEqual(1, 1); +}); + +test('that throws as 1 is not equal 2', () => { + // throws an exception because 1 != 2 + assert.strictEqual(1, 2); +}); + +// run with `node tests.mjs` +```` + +```js displayName="Read and Hash a File" +// crypto.mjs +import { createHash } from 'node:crypto'; +import { readFile } from 'node:fs/promises'; + +const hasher = createHash('sha1'); + +hasher.setEncoding('hex'); +// ensure you have a `package.json` file for this test! +hasher.write(await readFile('package.json')); +hasher.end(); + +const fileHash = hasher.read(); + +// run with `node crypto.mjs` +``` + +```js displayName="Streams Pipeline" +// streams.mjs +import { pipeline } from 'node:stream/promises'; +import { createReadStream, createWriteStream } from 'node:fs'; +import { createGzip } from 'node:zlib'; + +// ensure you have a `package.json` file for this test! +await pipeline( + createReadStream('package.json'), + createGzip(), + createWriteStream('package.json.gz') +); + +// run with `node streams.mjs` +``` + +```js displayName="Work with Threads" +// threads.mjs +import { + Worker, + isMainThread, + workerData, + parentPort, +} from 'node:worker_threads'; + +if (isMainThread) { + const data = 'some data'; + const worker = new Worker(import.meta.filename, { workerData: data }); + worker.on('message', msg => console.log('Reply from Thread:', msg)); +} else { + const source = workerData; + parentPort.postMessage(btoa(source.toUpperCase())); +} + +// run with `node threads.mjs` +``` +
Дізнайтеся більше про можливості Node.js із [нашими навчальними матеріалами](/learn). + diff --git a/apps/site/pages/zh-cn/about/index.mdx b/apps/site/pages/zh-cn/about/index.mdx index cd3daeb14bba7..47b787ffa40d5 100644 --- a/apps/site/pages/zh-cn/about/index.mdx +++ b/apps/site/pages/zh-cn/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -51,7 +51,7 @@ Node.js 在设计上受到了诸如 Ruby 的 [Event Machine][] 和 Python 的 [T HTTP 在 Node.js 中是第一类公民,设计时考虑了流式传输和低延迟。这使得 Node.js 非常适合作为 Web 库或框架的基础。 -Node.js 的设计没有线程并不意味着您不能利用环境中的多个核心。可以使用我们的 [child\_process.fork()](https://nodejs.org/docs/latest/api/child_process.html#child_processforkmodulepath-args-options) API 来生成子进程,并且设计得易于通信。建立在同一接口之上的是 [cluster](https://nodejs.org/docs/latest/api/cluster.html) 模块,它允许您在进程之间共享套接字,从而实现对核心的负载均衡。 +Node.js 的设计没有线程并不意味着您不能利用环境中的多个核心。可以使用我们的 [child_process.fork()](https://nodejs.org/docs/latest/api/child_process.html#child_processforkmodulepath-args-options) API 来生成子进程,并且设计得易于通信。建立在同一接口之上的是 [cluster](https://nodejs.org/docs/latest/api/cluster.html) 模块,它允许您在进程之间共享套接字,从而实现对核心的负载均衡。 [blocking vs. non-blocking]: /learn/asynchronous-work/overview-of-blocking-vs-non-blocking [`child_process.fork()`]: https://nodejs.org/api/child_process.html diff --git a/apps/site/pages/zh-cn/about/security-reporting.mdx b/apps/site/pages/zh-cn/about/security-reporting.mdx index e0ec739c92aab..fafe4d90c5cef 100644 --- a/apps/site/pages/zh-cn/about/security-reporting.mdx +++ b/apps/site/pages/zh-cn/about/security-reporting.mdx @@ -50,8 +50,15 @@ Node.js 项目为安全研究人员和负责任的公开披露提供官方漏洞 ## OpenSSF 最佳实践 - -OpenSSF Badge + + OpenSSF Badge 开源安全基金会(OpenSSF)[最佳实践徽章](https://github.com/coreinfrastructure/best-practices-badge) 是自由/自由和开源软件(FLOSS)项目展示他们遵循最佳实践的一种方式。 项目可以自愿地自我认证他们如何遵循每个最佳实践。 徽章的使用者可以快速评估哪些 FLOSS 项目正在遵循最佳实践,因此更有可能产生更高质量的安全软件。 diff --git a/apps/site/pages/zh-tw/about/index.mdx b/apps/site/pages/zh-tw/about/index.mdx index b297aa2df0fbb..81b70befaa623 100644 --- a/apps/site/pages/zh-tw/about/index.mdx +++ b/apps/site/pages/zh-tw/about/index.mdx @@ -14,13 +14,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` @@ -31,13 +31,13 @@ const hostname = '127.0.0.1'; const port = 3000; const server = createServer((req, res) => { -res.statusCode = 200; -res.setHeader('Content-Type', 'text/plain'); -res.end('Hello World'); + res.statusCode = 200; + res.setHeader('Content-Type', 'text/plain'); + res.end('Hello World'); }); server.listen(port, hostname, () => { -console.log(`Server running at http://${hostname}:${port}/`); + console.log(`Server running at http://${hostname}:${port}/`); }); ``` diff --git a/apps/site/pages/zh-tw/about/security-reporting.mdx b/apps/site/pages/zh-tw/about/security-reporting.mdx index 634022e514d6a..7f41b4ba9fcea 100644 --- a/apps/site/pages/zh-tw/about/security-reporting.mdx +++ b/apps/site/pages/zh-tw/about/security-reporting.mdx @@ -51,8 +51,15 @@ Node.js 專案為安全研究人員和盡責公開揭露設立了官方漏洞獎 ## OpenSSF 最佳實踐 - -OpenSSF 徽章 + + OpenSSF 徽章 開源安全基金會 (OpenSSF) [最佳實踐徽章](https://github.com/coreinfrastructure/best-practices-badge)的意義是為奉行最佳實踐的自由/開源軟體 (FLOSS) 專案提供背書。專案可以自發認證每項最佳實踐的遵循情況,徽章的使用者則可以快速評估哪些 FLOSS 專案確實遵循最佳實踐,因此更有可能產出安全又高品質的軟體。 From 5ceb6dd343f8cb119abbdd38132d6a582683fb0a Mon Sep 17 00:00:00 2001 From: Brian Muenzenmeyer Date: Sun, 15 Dec 2024 21:43:14 -0600 Subject: [PATCH 3/3] Update apps/site/pages/es/about/index.mdx Signed-off-by: Brian Muenzenmeyer --- apps/site/pages/es/about/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/site/pages/es/about/index.mdx b/apps/site/pages/es/about/index.mdx index df9cfdc257303..8489ee76f5426 100644 --- a/apps/site/pages/es/about/index.mdx +++ b/apps/site/pages/es/about/index.mdx @@ -60,4 +60,4 @@ El hecho de que Node.js esté diseñado sin hilos no significa que no puedas ace [`child_process.fork()`]: https://nodejs.org/api/child_process.html [`cluster`]: https://nodejs.org/api/cluster.html [máquina de eventos]: https://github.com/eventmachine/eventmachine -[torcido]: https://twisted.org/ +[twisted]: https://twisted.org/