Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): dir name #5354

Merged
merged 109 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from 103 commits
Commits
Show all changes
109 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
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
f5fed8d
chore: fix storybook local development mode (#5335)
Apr 27, 2023
d27d83a
chore: migrate pagination component (#5331)
ktssr Apr 28, 2023
d421b0b
Chore(node feat) (#5338)
AugustinMauroy Apr 30, 2023
e175feb
chore: migrate releases types (#5324)
HinataKah0 May 1, 2023
aa1c542
hotfix: first element no margin-top
ovflowd May 2, 2023
d5fbf51
(website redesign) Feat(shellbox): migration (#5234)
AugustinMauroy May 3, 2023
7ddfa8d
fix(i18n): translation key (#5347)
AugustinMauroy May 3, 2023
da41023
fix(test): dir name
AugustinMauroy May 3, 2023
c24e8af
feat(test): update config
AugustinMauroy May 3, 2023
368c054
feat(unit-test): introduce unit test on website redesign branch (#5178
AugustinMauroy Mar 23, 2023
69544fb
chore(redesign): added new folders for new layouts and new pages
ovflowd Mar 27, 2023
cbe14c3
chore(minor): just a tiny design nitpick
ovflowd Mar 27, 2023
7b57ee4
chore: set up storybook (#5191) (#5214)
Apr 1, 2023
8d4b07f
feat(ignore): add storyBook (#5229)
AugustinMauroy Apr 5, 2023
c2fe0cd
chore: set up testing-library jest extend (#5231)
Apr 6, 2023
7227b35
chore(dependencies): updated dependencies
ovflowd Apr 7, 2023
eaff4f4
feat: create section title component (#5237)
Apr 8, 2023
a994f19
📎 chore(migration): migrate banner component (#5233)
manishprivet Apr 11, 2023
a83ff81
feat: migrate AnimatedPlaceholder component (#5238
HinataKah0 Apr 11, 2023
60b2dc6
feat: create article alert component (#5243)
Apr 11, 2023
4013c4d
fix: formatted file
ovflowd Apr 15, 2023
3c2b02a
feat: migrate blockquote component (#5259)
Apr 15, 2023
d8ebddc
feat(stylelint,storybook): fixed styleling misconfig and fixed storyb…
ovflowd Apr 18, 2023
36d12ad
feat: create article data tag component (#5280)
Olaleye-Blessing Apr 18, 2023
1232e16
feat: migrate AuthorList component and add story 🎉 (#5277)
shanpriyan Apr 19, 2023
b72d29f
chore: lock nextjs to 13.2.0 (#5301
ovflowd Apr 19, 2023
bf82db5
chore(migration): migrate language selector component (#5266)
ktssr Apr 20, 2023
66fe550
feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5…
shanpriyan Apr 20, 2023
6407340
chore: updated contributing guidelines, eslint rules and storybook te…
ovflowd Apr 20, 2023
562136c
chore: contributing quick fix of example
ovflowd Apr 20, 2023
63e1cad
chore: story guide and react spreading
ovflowd Apr 20, 2023
4ce0f6a
chore: remove base styles from old styling
ovflowd Apr 20, 2023
3012a68
chore: fix storybook styles, imports, typescript config and dependenc…
ovflowd Apr 21, 2023
71134b5
chore: adopt turborepo (#5316
ovflowd Apr 21, 2023
443392b
fix(package.json) Lint command is missing slashes (#5321
Harkunwar Apr 21, 2023
9b6768b
moved `DataTag` to `components/Api` (#5317)
vasanth9 Apr 21, 2023
14cc994
hot-fix: dependency updates and fix dev runtime
ovflowd Apr 24, 2023
53adc57
chore: updated start command
ovflowd Apr 24, 2023
8a86fad
migration(Layout): newFooter (#5320)
AugustinMauroy Apr 24, 2023
e322d56
feat: migrate EditLink component (#5271)
HinataKah0 Apr 24, 2023
d910567
Migrate detect os hook (#5322)
FHachez Apr 24, 2023
b95b3b8
feat(blog) Migrate BlogCard component (#5323)
Harkunwar Apr 25, 2023
acb9794
Issue#5307 - Add framer-motion to the dependency list (#5318)
JatinSharma32 Apr 24, 2023
c6b75f3
chore: add remote turbo cache and simplified gh actions cache (#5326)…
ovflowd Apr 26, 2023
ce39f3e
chore: fix storybook local development mode (#5335)
Apr 27, 2023
d1049e9
chore: migrate pagination component (#5331)
ktssr Apr 28, 2023
0b1369c
Chore(node feat) (#5338)
AugustinMauroy Apr 30, 2023
d90722e
chore: migrate releases types (#5324)
HinataKah0 May 1, 2023
1745cc9
hotfix: first element no margin-top
ovflowd May 2, 2023
c400d05
(website redesign) Feat(shellbox): migration (#5234)
AugustinMauroy May 3, 2023
e4d3697
fix(i18n): translation key (#5347)
AugustinMauroy May 3, 2023
f2a3ac4
chore: updated dependencies
ovflowd May 3, 2023
c53b474
feat(unit-test): introduce unit test on website redesign branch (#5178
AugustinMauroy Mar 23, 2023
d85d18e
chore: set up storybook (#5191) (#5214)
Apr 1, 2023
051b1a3
feat(stylelint,storybook): fixed styleling misconfig and fixed storyb…
ovflowd Apr 18, 2023
7801e15
chore: lock nextjs to 13.2.0 (#5301
ovflowd Apr 19, 2023
7fb2102
feat(DarkModeToggler): Migrate and add stories to theme toggler 🎉 (#5…
shanpriyan Apr 20, 2023
6a82522
chore: updated contributing guidelines, eslint rules and storybook te…
ovflowd Apr 20, 2023
09dcfb6
chore: fix storybook styles, imports, typescript config and dependenc…
ovflowd Apr 21, 2023
5b57ae8
chore: adopt turborepo (#5316
ovflowd Apr 21, 2023
b38df13
fix(test): dir name
AugustinMauroy May 3, 2023
7591522
code format
AugustinMauroy May 4, 2023
5d1910e
Merge branch 'fix-test' of https://github.com/AugustinMauroy/nodejs.o…
AugustinMauroy May 4, 2023
fabc802
fix
AugustinMauroy May 4, 2023
68d92e1
chore: vercel enable middleware and i18n redirection (#5300)
ovflowd May 4, 2023
fc04b6c
Merge branch 'major/website-redesign' into fix-test
AugustinMauroy May 4, 2023
d41adc5
Sync: merge `major/website-redesign` into `main` (#5356)
ovflowd May 4, 2023
63e585f
Merge branch 'major/website-redesign' into fix-test
AugustinMauroy May 4, 2023
7fe2ec1
Merge branch 'major/website-redesign' into fix-test
SEWeiTung May 6, 2023
55f02c9
update with feedback
AugustinMauroy May 7, 2023
2439f69
Merge branch 'major/website-redesign' into fix-test
AugustinMauroy May 11, 2023
d24f85b
Merge branch 'major/website-redesign' into fix-test
Harkunwar May 11, 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