Skip to content
Closed
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
bd8a46e
feat(unit-test): introduce unit test on website redesign branch (#5178
AugustinMauroy Mar 23, 2023
80039d3
chore(redesign): added new folders for new layouts and new pages
ovflowd Mar 27, 2023
cdbc4b4
chore(minor): just a tiny design nitpick
ovflowd Mar 27, 2023
df79868
chore: set up storybook (#5191) (#5214)
Apr 1, 2023
ecbec61
feat(ignore): add storyBook (#5229)
AugustinMauroy Apr 5, 2023
a2a4bd8
chore: set up testing-library jest extend (#5231)
Apr 6, 2023
67999b6
chore(dependencies): updated dependencies
ovflowd Apr 7, 2023
48d6c91
feat: create section title component (#5237)
Apr 8, 2023
6ce6923
📎 chore(migration): migrate banner component (#5233)
manishprivet Apr 11, 2023
f9d9765
feat: migrate AnimatedPlaceholder component (#5238
HinataKah0 Apr 11, 2023
9311785
feat: create article alert component (#5243)
Apr 11, 2023
06ce22b
chore(dependencies): updated dependencies
ovflowd Apr 12, 2023
386a458
fix: formatted file
ovflowd Apr 15, 2023
0240b9b
chore: updated deps
ovflowd Apr 15, 2023
ffa9a3e
feat: migrate blockquote component (#5259)
Apr 15, 2023
390c2da
feat(stylelint,storybook): fixed styleling misconfig and fixed storyb…
ovflowd Apr 18, 2023
e121b83
feat: create article data tag component (#5280)
Olaleye-Blessing Apr 18, 2023
d7a154d
feat: migrate AuthorList component and add story 🎉 (#5277)
shanpriyan Apr 19, 2023
620f58e
chore: lock nextjs to 13.2.0 (#5301
ovflowd Apr 19, 2023
79b5134
chore(migration): migrate language selector component (#5266)
ktssr Apr 20, 2023
bb46dfe
feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5…
shanpriyan Apr 20, 2023
bfcabb9
chore: updated contributing guidelines, eslint rules and storybook te…
ovflowd Apr 20, 2023
f6dc39f
chore: contributing quick fix of example
ovflowd Apr 20, 2023
2eba819
chore: story guide and react spreading
ovflowd Apr 20, 2023
86b60f3
chore: remove base styles from old styling
ovflowd Apr 20, 2023
1f4530e
chore: fix storybook styles, imports, typescript config and dependenc…
ovflowd Apr 21, 2023
b8c76cd
chore: adopt turborepo (#5316
ovflowd Apr 21, 2023
5891807
fix(package.json) Lint command is missing slashes (#5321
Harkunwar Apr 21, 2023
ca8b5ab
moved `DataTag` to `components/Api` (#5317)
vasanth9 Apr 21, 2023
c2aeeaa
hot-fix: dependency updates and fix dev runtime
ovflowd Apr 24, 2023
86057dc
chore: updated start command
ovflowd Apr 24, 2023
17b698f
migration(Layout): newFooter (#5320)
AugustinMauroy Apr 24, 2023
f989ea9
feat: migrate EditLink component (#5271)
HinataKah0 Apr 24, 2023
f49c166
Migrate detect os hook (#5322)
FHachez Apr 24, 2023
10e535c
creating relevant files and make them compile
u-rogel Apr 24, 2023
fe333da
import new-header
u-rogel Apr 24, 2023
154890b
feat(blog) Migrate BlogCard component (#5323)
Harkunwar Apr 25, 2023
bd24994
Issue#5307 - Add framer-motion to the dependency list (#5318)
JatinSharma32 Apr 24, 2023
763aebe
chore: add remote turbo cache and simplified gh actions cache (#5326)…
ovflowd Apr 26, 2023
0488cdb
using active-localized-link
u-rogel Apr 27, 2023
6ee98ea
formatting styles to match component
u-rogel Apr 27, 2023
f235855
add missing i18n entry
u-rogel Apr 27, 2023
9907f46
cosmetics
u-rogel Apr 27, 2023
f5fed8d
chore: fix storybook local development mode (#5335)
Apr 27, 2023
d27d83a
chore: migrate pagination component (#5331)
ktssr Apr 28, 2023
2738886
moving NewHeader to Sections folders
u-rogel Apr 28, 2023
5b8e8c5
removed import of the new component
u-rogel Apr 28, 2023
9152e1d
added useMediaQuery hook
u-rogel Apr 28, 2023
5cdef23
updated snapshots file
u-rogel Apr 28, 2023
d4e1666
Merge branch 'major/website-redesign' into redsign/new-header
u-rogel Apr 29, 2023
d421b0b
Chore(node feat) (#5338)
AugustinMauroy Apr 30, 2023
e175feb
chore: migrate releases types (#5324)
HinataKah0 May 1, 2023
e885170
updates after review
u-rogel May 2, 2023
aa1c542
hotfix: first element no margin-top
ovflowd May 2, 2023
ac686af
added missing content from nodejs.dev
u-rogel May 2, 2023
1cbe2f7
Merge branch 'major/website-redesign' into redsign/new-header
ovflowd May 2, 2023
7ea2989
test: Mocked availableLocales, tests passing
u-rogel May 7, 2023
8e8ab89
Merge branch 'major/website-redesign' of github.com:u-rogel/nodejs.or…
u-rogel May 8, 2023
b783864
Merge branch 'major/website-redesign' into redsign/new-header
u-rogel May 8, 2023
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
11 changes: 10 additions & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# https://github.com/browserslist/browserslist#readme

defaults and supports es6-module
maintained node versions

[production]

cover 95%
not dead

[development]

defaults
Explorer >= 10
8 changes: 5 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ public/en/user-survey-report
public/static/documents
public/static/legacy

# These should be fixed in the future as the
# tests and scripts will be updated in this PR
tests
# We don't want to lint/prettify the Coverage Results
coverage

# MDX Plugin enforces Prettier formatting which should
# be done in the future as we don't want to update the Markdown file
# contents right now
pages/**/*.md

# We shouldn't lint statically generated Storybook files
storybook-static
53 changes: 50 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
{
"extends": ["eslint:recommended", "next"],
"root": true,
"overrides": [
{
"files": ["**/*.{mjs,js,jsx,ts,tsx}"],
"extends": ["plugin:prettier/recommended"],
"env": { "node": true, "es6": true }
"plugins": ["import"],
"env": { "node": true, "es6": true },
"rules": {
"import/order": [
"warn",
{
"groups": [
"builtin",
"external",
"internal",
"sibling",
"parent",
"index",
"type"
]
}
]
}
},
{
"files": ["**/**.test.{js,jsx,ts,tsx}"],
"extends": ["plugin:testing-library/react"],
"env": { "jest": true, "node": true, "browser": true }
},
{
"files": ["**/*.{ts,tsx}"],
"globals": { "globalThis": false }
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"globals": { "globalThis": false },
"rules": {
"@typescript-eslint/consistent-type-imports": "error"
}
},
{
"files": ["**/*.tsx"],
Expand All @@ -19,6 +47,7 @@
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"consistent-return": "off",
"react/destructuring-assignment": ["warn", "always"],
"react/function-component-definition": [
"error",
{
Expand All @@ -29,7 +58,19 @@
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
]
],
"no-restricted-syntax": [
"error",
{
"selector": "ImportDeclaration[source.value='react'][specifiers.0.type='ImportDefaultSpecifier']",
"message": "Default React import not allowed since we use the TypeScript jsx-transform. If you need a global type that collides with a React named export (such as `MouseEvent`), try using `globalThis.MouseHandler`"
},
{
"selector": "ImportDeclaration[source.value='react'] :matches(ImportNamespaceSpecifier)",
"message": "Named * React import is not allowed. Please import what you need from React with Named Imports"
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "type"]
}
},
{
Expand Down Expand Up @@ -68,6 +109,12 @@
"no-unused-vars": "off",
"prefer-promise-reject-errors": "off"
}
},
{
"files": ["**/*.stories.{ts,tsx}"],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
}
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Please read the [Code of Conduct](https://github.com/nodejs/nodejs.org/blob/main/CODE_OF_CONDUCT.md) and the [Contributing Guidelines](https://github.com/nodejs/nodejs.org/blob/main/CONTRIBUTING.md) before opening a pull request.
-->

## Description

<!-- Write a brief description of the changes introduced by this PR -->

## Related Issues

<!--
Link to the issue that is fixed by this PR (if there is one)
e.g. Fixes #1234, Addresses #1234, Related to #1234, etc.
-->

### Check List

<!--
ATTENTION
Please follow this check list to ensure that you've followed all items before opening this PR
-->

- [ ] I have read the [Contributing Guidelines](https://github.com/nodejs/nodejs.org/blob/main/CONTRIBUTING.md) and made commit messages that follow the guideline.
- [ ] I have run `npx turbo lint` to ensure the code follows the style guide. And run `npx turbo lint:fix` to fix the style errors if necessary.
- [ ] I have run `npx turbo format` to ensure the code follows the style guide.
- [ ] I have run `npx turbo test` to check if all tests are passing, and/or `npx turbo test:snapshot` to update snapshots if I created and/or updated React Components.
- [ ] I've covered new added functionality with unit tests if necessary.
28 changes: 20 additions & 8 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -36,28 +38,36 @@ jobs:
- name: Setup GitHub Pages
uses: actions/configure-pages@v3

- name: Restore Next.js cache
- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
node_modules/.cache
key: build-${{ hashFiles('**/package-lock.json') }}-
restore-keys: |
build-${{ hashFiles('**/package-lock.json') }}-
enableCrossOsArchive: true

- name: Build Next.js
run: npm run build
run: npx turbo build
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
NODE_OPTIONS: '--max_old_space_size=4096'
NEXT_BASE_PATH: /nodejs.org

- name: Save Next.js cache
- name: Save Cache
uses: actions/cache/save@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.next/cache/eslint') }}
node_modules/.cache
key: build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('node_modules/.cache') }}
enableCrossOsArchive: true

- name: Export Next.js static files
run: npm run export
run: npx turbo export

- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
Expand All @@ -66,11 +76,13 @@ jobs:

deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
96 changes: 87 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
workflow_dispatch:

env:
FORCE_COLOR: 2

jobs:
lint:
name: Lint
Expand All @@ -15,6 +12,8 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -25,8 +24,77 @@ jobs:
- name: Install NPM packages
run: npm ci

- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: |
node_modules/.cache
key: tests-${{ hashFiles('**/package-lock.json') }}-
restore-keys: |
tests-${{ hashFiles('**/package-lock.json') }}-
enableCrossOsArchive: true

- name: Run Linting
run: npm run lint
run: npx turbo lint
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

- name: Save Cache
uses: actions/cache/save@v3
with:
path: |
node_modules/.cache
key: tests-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('node_modules/.cache') }}
enableCrossOsArchive: true

unit-tests:
name: Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: npm

- name: Install NPM packages
run: npm ci

- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: |
node_modules/.cache
key: tests-${{ hashFiles('**/package-lock.json') }}-
restore-keys: |
tests-${{ hashFiles('**/package-lock.json') }}-
enableCrossOsArchive: true

- name: Run Unit Tests
run: npx turbo test:ci
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

- name: Save Cache
uses: actions/cache/save@v3
with:
path: |
node_modules/.cache
key: tests-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('node_modules/.cache') }}
enableCrossOsArchive: true

build:
name: Build on ${{ matrix.os }}
Expand All @@ -40,6 +108,8 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -50,21 +120,29 @@ jobs:
- name: Install NPM packages
run: npm ci

- name: Restore Next.js cache
- name: Restore Cache
uses: actions/cache/restore@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
node_modules/.cache
key: build-${{ hashFiles('**/package-lock.json') }}-
restore-keys: |
build-${{ hashFiles('**/package-lock.json') }}-
enableCrossOsArchive: true

- name: Build Next.js
run: npm run build
run: npx turbo build
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
NODE_OPTIONS: '--max_old_space_size=4096'

- name: Save Next.js cache
- name: Save Cache
uses: actions/cache/save@v3
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.next/cache/eslint') }}
node_modules/.cache
key: build-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('node_modules/.cache') }}
enableCrossOsArchive: true
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,16 @@ pages/en/blog/year-[0-9][0-9][0-9][0-9].md
# ESLint Cache Files
.eslintjscache
.eslintmdcache

# Jest
coverage
.swc

# Storybook
storybook-static

# Vercel Config
.vercel

# TurboRepo
.turbo
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public/en/user-survey-report
public/static/documents
public/static/legacy

# We don't want to lint/prettify the Coverage Results
coverage

# MDX Plugin enforces Prettier formatting which should
# be done in the future as we don't want to update the Markdown file
# contents right now
Expand All @@ -15,3 +18,6 @@ pages/**/*.md
# Prettier's Handlebar parser is limited and chokes on some syntax features
# https://github.com/prettier/prettier/issues/11834
scripts/release-post/template.hbs

# We shouldn't lint statically generated Storybook files
storybook-static
Loading