Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ updates:
- 'github_actions:pull-request'
commit-message:
prefix: meta
cooldown:
default-days: 3
open-pull-requests-limit: 10

- package-ecosystem: npm
Expand All @@ -19,6 +21,8 @@ updates:
- 'github_actions:pull-request'
commit-message:
prefix: meta
cooldown:
default-days: 3
groups:
lint:
patterns:
Expand Down
10 changes: 10 additions & 0 deletions apps/site/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ const nextConfig = {
'shiki',
],
},
// If we're building for the Cloudflare deployment we want to set
// an appropriate deploymentId (needed for skew protection)
// TODO: The `OPEN_NEXT_CLOUDFLARE` environment variable is being
// defined in the worker building script, ideally the open-next
// adapter should set it itself when it invokes the Next.js build
// process, onces it does that remove the manual `OPEN_NEXT_CLOUDFLARE`
// definition in the package.json script.
deploymentId: process.env.OPEN_NEXT_CLOUDFLARE
? (await import('@opennextjs/cloudflare')).getDeploymentId()
: undefined,
};

const withNextIntl = createNextIntlPlugin('./i18n.tsx');
Expand Down
13 changes: 12 additions & 1 deletion apps/site/open-next.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import type { OpenNextConfig } from '@opennextjs/cloudflare';
import { defineCloudflareConfig } from '@opennextjs/cloudflare';
import incrementalCache from '@opennextjs/cloudflare/overrides/incremental-cache/kv-incremental-cache';

const cloudflareConfig = defineCloudflareConfig({ incrementalCache });

export default { ...cloudflareConfig, buildCommand: 'pnpm build:default' };
const openNextConfig: OpenNextConfig = {
...cloudflareConfig,
buildCommand: 'pnpm build:default',
cloudflare: {
skewProtection: {
enabled: true,
},
},
};

export default openNextConfig;
8 changes: 4 additions & 4 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"build:blog-data": "cross-env NODE_NO_WARNINGS=1 node ./scripts/blog-data/generate.mjs",
"build:blog-data:watch": "node --watch --watch-path=pages/en/blog ./scripts/blog-data/generate.mjs",
"build:default": "cross-env NODE_NO_WARNINGS=1 next build",
"cloudflare:build:worker": "opennextjs-cloudflare build",
"cloudflare:deploy": "wrangler deploy",
"cloudflare:build:worker": "OPEN_NEXT_CLOUDFLARE=true opennextjs-cloudflare build",
"cloudflare:deploy": "opennextjs-cloudflare deploy",
"cloudflare:preview": "wrangler dev",
"predeploy": "node --run build:blog-data",
"deploy": "cross-env NEXT_PUBLIC_STATIC_EXPORT=true node --run build:default -- --turbo",
Expand Down Expand Up @@ -79,7 +79,7 @@
"@eslint/eslintrc": "~3.3.1",
"@flarelabs-net/wrangler-build-time-fs-assets-polyfilling": "^0.0.0",
"@next/eslint-plugin-next": "15.3.4",
"@opennextjs/cloudflare": "^1.3.0",
"@opennextjs/cloudflare": "^1.6.0",
"@playwright/test": "^1.53.2",
"@testing-library/user-event": "~14.6.1",
"@types/semver": "~7.7.0",
Expand Down Expand Up @@ -110,7 +110,7 @@
"typescript": "catalog:",
"typescript-eslint": "~8.35.1",
"user-agent-data-types": "0.4.2",
"wrangler": "^4.22.0"
"wrangler": "^4.25.1"
},
"imports": {
"#site/*": [
Expand Down
2 changes: 1 addition & 1 deletion apps/site/pages/es/about/previous-releases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Los detalles del calendario de lanzamiento de Node.js están disponibles [en Git

### 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/).
El soporte comercial para las versiones que han superado la fase de Mantenimiento está disponible a través de nuestro socio del programa OpenJS Ecosystem Sustainability, [HeroDevs](https://www.herodevs.com/support/node-nes?utm_source=NodeJS+&utm_medium=Link&utm_campaign=Version_support_page).

## ¿Buscando las últimas versiones de una rama específica?

Expand Down
4 changes: 2 additions & 2 deletions apps/site/pages/es/download/current.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ title: Descarga Node.js®
</section>

<section>
Lee el <Release.ChangelogLink>historial de cambios</Release.ChangelogLink> para esta versión.
Lee <Release.ChangelogLink>el historial</Release.ChangelogLink> o <Release.BlogPostLink>el artículo del blog</Release.BlogPostLink> para esta versión.

Lee el <Release.BlogPostLink>artículo del blog</Release.BlogPostLink> para esta versión.
Aprende más sobre [los lanzamientos de Node.js](/about/previous-releases), incluyendo el calendario de lanzamientos y el estado LTS (soporte de largo plazo).

Aprende a <LinkWithArrow href="https://github.com/nodejs/node#verifying-binaries">verificar</LinkWithArrow> la firma SHASUMS.

Expand Down
4 changes: 2 additions & 2 deletions apps/site/pages/es/download/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ title: Descarga Node.js®
</section>

<section>
Lee el <Release.ChangelogLink>historial</Release.ChangelogLink> para esta versión.
Lee <Release.ChangelogLink>el historial</Release.ChangelogLink> o <Release.BlogPostLink>el artículo del blog</Release.BlogPostLink> para esta versión.

Lee el <Release.BlogPostLink>artículo del blog</Release.BlogPostLink> para esta versión.
Aprende más sobre [los lanzamientos de Node.js](/about/previous-releases), incluyendo el calendario de lanzamientos y el estado LTS (soporte de largo plazo).

Aprende a <LinkWithArrow href="https://github.com/nodejs/node#verifying-binaries">verificar</LinkWithArrow> la firma SHASUMS.

Expand Down
2 changes: 1 addition & 1 deletion apps/site/pages/es/download/package-manager/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Te permite tener **diferentes versiones para diferentes proyectos**, **diferente

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.
Consulta el [inicio rápido](https://vfox.dev/guides/quick-start.html) para usar vfox rápidamente y leer todos los detalles de uso.

## Void Linux

Expand Down
1 change: 1 addition & 0 deletions apps/site/pages/fr/about/get-involved/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ Veuillez suivre leurs codes de conduite/règles respectifs.

- [Node Slackers](https://www.nodeslackers.com/) est une communauté Slack axée sur Node.js.
- [OpenJSF Slack](https://slack-invite.openjsf.org/) est un espace de travail Slack pour la Fondation OpenJS. Il y a plusieurs canaux liés à Node.js. (les canaux préfixés par `#nodejs-` sont liés au projet).
- [r/node](https://www.reddit.com/r/node/) est un subreddit centré sur Node.js.
- `irc.libera.chat` dans le canal `#node.js` avec un [client IRC](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) ou connectez-vous dans votre navigateur web au canal en utilisant [un client web](https://kiwiirc.com/nextclient/).
124 changes: 124 additions & 0 deletions apps/site/pages/fr/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: Exécuter du JavaScript partout
layout: home
---

<section>
<WithBadgeGroup section="index" />

<div>
<h1 className="special">Exécuter du JavaScript partout</h1>

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.

</div>

<div className="flex gap-4">
<div className="flex flex-col gap-2">
<Button kind="special" className="!hidden dark:!block" href="/download">Obtenir Node.js®</Button>

<Button kind="primary" className="!block dark:!hidden" href="/download">Obtenir Node.js®</Button>

<Button kind="secondary" className="!block" href="/blog/announcements/node-18-eol-support">
<span>Obtenir une aide à la sécurité</span>

<br />

<small className="!text-xs">pour Node.js 18 et moins</small>
</Button>
</div>

</div>
</section>

<section>
<div>
```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 { createReadStream, createWriteStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
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`
```

</div>

Apprenez-en plus sur ce que Node.js est capable d'offrir avec notre [Matériel d'apprentissage](/learn).

</section>
1 change: 1 addition & 0 deletions apps/site/pages/ja/about/get-involved/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ Node.jsについてもっと非公式に議論する場所を探しているの

- [Node Slackers](https://www.nodeslackers.com/)はNode.jsに特化したSlackコミュニティーです。
- [OpenJSF Slack](https://slack-invite.openjsf.org/)はOpenJS財団のSlackワークスペースです。Node.jsに関連するチャンネルがいくつかあります。 _(チャンネル名が `#nodejs-` で始まるチャンネル)_
- [r/node](https://www.reddit.com/r/node/)はNode.jsに関するサブレディットです。
- `irc.libera.chat`の`#node.js`は[IRCクライアント](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients)や[ウェブクライアント](https://kiwiirc.com/nextclient/)を使って利用できます。
124 changes: 124 additions & 0 deletions apps/site/pages/ja/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
title: どこでもJavaScriptを使おう
layout: home
---

<section>
<WithBadgeGroup section="index" />

<div>
<h1 className="special">どこでもJavaScriptを使おう</h1>

Node.js®はクロスプラットフォームに対応したフリーでオープンソースのJavaScript実行環境です。開発者にサーバー、ウェブアプリ、コマンドラインツール、スクリプトなどを開発する環境を提供します。

</div>

<div className="flex gap-4">
<div className="flex flex-col gap-2">
<Button kind="special" className="!hidden dark:!block" href="/download">Node.js®を入手</Button>

<Button kind="primary" className="!block dark:!hidden" href="/download">Node.js®を入手</Button>

<Button kind="secondary" className="!block" href="/ja/blog/announcements/node-18-eol-support">
<span>セキュリティサポート</span>

<br />

<small className="!text-xs">Node.js 18以下向け</small>
</Button>
</div>

</div>
</section>

<section>
<div>
```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 { createReadStream, createWriteStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
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`
```

</div>

私たちの[学習教材](/learn)でNode.jsでできることをさらに学んでみましょう。

</section>
Loading
Loading