From 9b37e2dabe8d580cd44a610b36907ad85f5e1371 Mon Sep 17 00:00:00 2001 From: Claudio Wunder Date: Tue, 21 Nov 2023 23:22:40 +0100 Subject: [PATCH 1/2] fix: fixed a few links --- pages/en/docs/guides/simple-profiling.md | 2 +- .../asynchronous-work/overview-of-blocking-vs-non-blocking.md | 2 +- .../how-much-javascript-do-you-need-to-know-to-use-nodejs.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/en/docs/guides/simple-profiling.md b/pages/en/docs/guides/simple-profiling.md index c9aa558ce5424..e8406107c4fe2 100644 --- a/pages/en/docs/guides/simple-profiling.md +++ b/pages/en/docs/guides/simple-profiling.md @@ -287,4 +287,4 @@ You may also find [how to create a flame graph][diagnostics flamegraph] helpful. [profiler inside V8]: https://v8.dev/docs/profile [benefits of asynchronous programming]: https://nodesource.com/blog/why-asynchronous -[diagnostics flamegraph]: /en/docs/guides/diagnostics-flamegraph/ +[diagnostics flamegraph]: /docs/guides/diagnostics-flamegraph/ diff --git a/pages/en/learn/asynchronous-work/overview-of-blocking-vs-non-blocking.md b/pages/en/learn/asynchronous-work/overview-of-blocking-vs-non-blocking.md index d4974c6e286a6..e07cdbef34934 100644 --- a/pages/en/learn/asynchronous-work/overview-of-blocking-vs-non-blocking.md +++ b/pages/en/learn/asynchronous-work/overview-of-blocking-vs-non-blocking.md @@ -9,7 +9,7 @@ authors: ovflowd, HassanBahati This overview covers the difference between **blocking** and **non-blocking** calls in Node.js. This overview will refer to the event loop and libuv but no prior knowledge of those topics is required. Readers are assumed to have a -basic understanding of the JavaScript language and Node.js [callback pattern](/learn/javascript-asynchronous-programming-and-callbacks/). +basic understanding of the JavaScript language and Node.js [callback pattern](/learn/asynchronous-work/javascript-asynchronous-programming-and-callbacks). > "I/O" refers primarily to interaction with the system's disk and > network supported by [libuv](https://libuv.org/). diff --git a/pages/en/learn/getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs.md b/pages/en/learn/getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs.md index 67b5dda382f64..e051ec9b8f03b 100644 --- a/pages/en/learn/getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs.md +++ b/pages/en/learn/getting-started/how-much-javascript-do-you-need-to-know-to-use-nodejs.md @@ -23,7 +23,7 @@ As a beginner, it's hard to get to a point where you are confident enough in you - [Arrays](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) - [Template Literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) - [Strict Mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) -- [ECMAScript 2015 (ES6) and beyond](/learn/ecmascript-2015-es6-and-beyond/) +- [ECMAScript 2015 (ES6) and beyond](/learn/getting-started/ecmascript-2015-es6-and-beyond) With those concepts in mind, you are well on your road to become a proficient JavaScript developer, in both the browser and in Node.js. From 5f56779451086a678339d45ee49373cceea6e9bd Mon Sep 17 00:00:00 2001 From: Claudio W Date: Tue, 21 Nov 2023 22:55:58 +0000 Subject: [PATCH 2/2] fix: locale and layouts errors (#6134) --- .github/workflows/build.yml | 31 ------------------------------- app/{ => [locale]}/layout.tsx | 0 app/[locale]/not-found.tsx | 16 ++++++++++++++-- app/not-found.tsx | 18 ------------------ 4 files changed, 14 insertions(+), 51 deletions(-) rename app/{ => [locale]}/layout.tsx (100%) delete mode 100644 app/not-found.tsx diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba3885bc3684f..d4fc47992394f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,20 +79,6 @@ jobs: # regardless of having code changes or not fetch-depth: 1 - - name: Restore Build Cache - uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 - with: - path: | - .turbo/cache - .next/cache - node_modules/.cache - # We want to restore cache from local .npm caches, .next/cache and node_modules/.cache - # As this should reduce build times, and the overall time for installing packages or running operations - key: cache-build-${{ hashFiles('package-lock.json') }}- - restore-keys: | - cache-build-${{ hashFiles('package-lock.json') }}- - cache-build- - - name: Set up Node.js uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: @@ -132,20 +118,3 @@ jobs: # this should be a last resort in case by any chances the build memory gets too high # but in general this should never happen NODE_OPTIONS: '--max_old_space_size=4096' - - - name: Save Build Cache - # We want to store the Build Cache within Pull Requests or during pushes against the `main` branch - # since caches created on the `main` (default) branch can be reused on Pull Requests and PRs coming from forks - if: | - github.event_name == 'push' || github.event_name == 'pull_request_target' - uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 - with: - path: | - .turbo/cache - .next/cache - node_modules/.cache - # Most of sibling Pull Requests will use the cache key based on the package-lock.json - # We do also add a hashFiles for `.next/cache` as GitHub Actions only allows - # One cache with same key to exist, so to ensure we always have a cache from the latest build - # We add the hashFiles of `.next/cache` to the cache key of the Cache Entry - key: cache-build-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.next/cache/**') }} diff --git a/app/layout.tsx b/app/[locale]/layout.tsx similarity index 100% rename from app/layout.tsx rename to app/[locale]/layout.tsx diff --git a/app/[locale]/not-found.tsx b/app/[locale]/not-found.tsx index c0a4758a0e9b1..34c2edd6288f8 100644 --- a/app/[locale]/not-found.tsx +++ b/app/[locale]/not-found.tsx @@ -1,3 +1,15 @@ -import NotFound from '@/app/not-found'; +import { useTranslations } from 'next-intl'; +import type { FC } from 'react'; -export default NotFound; +const LocalizedNotFound: FC = () => { + const t = useTranslations(); + + return ( +
+

{t('pages.404.title')}

+

{t('pages.404.description')}

+
+ ); +}; + +export default LocalizedNotFound; diff --git a/app/not-found.tsx b/app/not-found.tsx deleted file mode 100644 index d59a8cf140a16..0000000000000 --- a/app/not-found.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { useTranslations } from 'next-intl'; -import type { FC } from 'react'; - -const NotFound: FC = () => { - const t = useTranslations(); - - return ( -
-

{t('pages.404.title')}

-

{t('pages.404.description')}

-
- ); -}; - -// This is a fallback Not Found Page that in theory should never be requested -export const dynamic = 'force-dynamic'; - -export default NotFound;