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

chore(github issue): fit with nodejs.dev #5031

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c161dfe
chore(github issue): fit with nodejs.dev
AugustinMauroy Jan 24, 2023
507ea02
Merge branch 'main' into main
SEWeiTung Jan 25, 2023
8071ea8
Merge branch 'main' into main
SEWeiTung Feb 5, 2023
3d1bc0a
doc: announce Feb security release (#5042)
mhdawson Feb 7, 2023
cb1e39c
fix banner start date for security release announce (#5043)
mhdawson Feb 7, 2023
d548a3c
docs(security): typo-squirting => typosquatting (#5044)
ferdnyc Feb 12, 2023
9476a8c
doc: share new target for security releases (#5047)
mhdawson Feb 14, 2023
5006544
doc: update banner for new security release date (#5048)
mhdawson Feb 14, 2023
3cc96a6
Blog: v14.21.3 release post (#5051)
richardlau Feb 16, 2023
f745585
Blog: v16.19.1 release post (#5052)
richardlau Feb 16, 2023
7dbb7c1
Blog: v18.14.1 release post (#5054)
RafaelGSS Feb 16, 2023
7ea374d
Blog: v19.6.1 release post (#5053)
RafaelGSS Feb 16, 2023
6469baf
doc: update security annouce for binaries ready (#5055)
mhdawson Feb 16, 2023
96525c8
blog: release notes for v19.7.0 and v18.14.2 (#5064)
MylesBorins Feb 21, 2023
adade26
doc: fix typos in security release announcement (#5056)
tniessen Feb 22, 2023
abe8aa9
fix(docs): misspelled words (#5049)
CodytTorgerson Feb 27, 2023
903c1c6
ru:replace jargon in Russian text (#5027)Co-authored-by: Claudio Wund…
gurugray Feb 27, 2023
78c1867
doc: added example for Readable stream back-pressure (#5066)Co-author…
RishabhKodes Feb 27, 2023
7315680
ru: correct translation for index.md (#5045)Co-authored-by: Alexandr …
KruASe76 Feb 27, 2023
5f9862c
Blog: v18.15.0 release post (#5073)
juanarbol Mar 7, 2023
ec1ebcc
feat(infra): migrate to next.js infrastructure (#4991)Co-authored-by:…
ovflowd Mar 8, 2023
93407da
chore(i18n): removed unused hebrew language (#5074)
ovflowd Mar 8, 2023
80dbb74
chore(readme): add nodejs logo
AugustinMauroy Mar 8, 2023
f79046b
Merge branch 'main' of https://github.com/AugustinMauroy/nodejs.org
AugustinMauroy Mar 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 2 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# https://editorconfig.org/

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[*.svg]
insert_final_newline = false
insert_final_newline = true
21 changes: 17 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
**/*.min.js
static/legacy/
external/
build/
build
.next
external
styles
node_modules
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

# 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
95 changes: 58 additions & 37 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,51 +1,72 @@
{
"extends": [
"eslint:recommended",
"standard",
"prettier"
],
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": "error"
},
"extends": ["eslint:recommended", "next"],
"overrides": [
{
"files": [
"**/*.md"
],
"plugins": [
"markdown"
],
"processor": "markdown/markdown"
"files": ["**/*.{mjs,js,jsx,ts,tsx}"],
"extends": ["plugin:prettier/recommended"],
"env": { "node": true, "es6": true }
},
{
"files": ["**/*.{ts,tsx}"],
"globals": { "globalThis": false }
},
{
"files": ["**/*.tsx"],
"rules": {
"react/no-unused-prop-types": "off",
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"consistent-return": "off",
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
]
}
},
{
"files": ["**/*.{md,mdx}"],
"extends": ["plugin:mdx/recommended"],
"settings": { "mdx/code-blocks": false },
"rules": { "react/jsx-no-undef": "off", "no-useless-escape": "off" }
},
{
"files": [
"**/*.md/*.js"
"pages/*/about/*.{md,mdx}",
"pages/*/download/*.{md,mdx}",
"pages/*/get-involved/*.{md,mdx}",
"pages/*/docs/*.{md,mdx}",
"pages/*/*.{md,mdx}"
],
"parserOptions": {
"ecmaVersion": "latest"
},
"settings": { "mdx/code-blocks": true }
},
{
"files": ["pages/**/*.{md,mdx}/*.{js,jsx,cjs,mjs,ts,tsx}"],
"rules": {
"eqeqeq": "off",
"n/no-deprecated-api": "off",
"n/handle-callback-err": "off",
"no-const-assign": "off",
"camelcase": "off",
"@typescript-eslint/no-unused-vars": "off",
"consistent-return": "off",
"func-names": "off",
"import/extensions": "off",
"import/no-extraneous-dependencies": "off",
"import/no-unresolved": "off",
"no-console": "off",
"no-empty": "off",
"no-restricted-globals": "off",
"no-restricted-syntax": "off",
"no-undef": "off",
"no-underscore-dangle": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"node/handle-callback-err": "off",
"node/no-deprecated-api": "off",
"prefer-const": "off",
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "none"
}
],
"semi": ["error", "always"]
"prefer-promise-reject-errors": "off"
}
}
]
Expand Down
19 changes: 9 additions & 10 deletions .github/ISSUE_TEMPLATE/01-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,36 @@ body:
for us to fix it when you attach a screenshot as well.
- type: input
attributes:
label: "URL:"
label: 'URL:'
description: The URL of the page you are reporting an issue on.
placeholder: https://nodejs.org/en/
validations:
required: true
- type: input
attributes:
label: "Browser Name:"
description: What kind of browser are you using?
label: 'Browser Name:'
description: What kind of browser are you using?
placeholder: Chrome
validations:
required: true
- type: input
attributes:
label: "Browser Version:"
label: 'Browser Version:'
description: What version of browser are you using?
placeholder: "103.0.5060.134"
placeholder: '103.0.5060.134'
validations:
required: true
- type: input
attributes:
label: "Operation System:"
description:
What kind of operation system are you using
label: 'Operation System:'
description: What kind of operation system are you using
(Write it in full, with version number)?
placeholder: "Windows 10, 21H2, 19044.1826"
placeholder: 'Windows 10, 21H2, 19044.1826'
validations:
required: true
- type: textarea
attributes:
label: "How to reproduce the issue:"
label: 'How to reproduce the issue:'
placeholder: |
1. What I did.
2. What I expected to happen.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🚀 Feature Request For Nodejs Website
name: 🚀 Feature Proposal for the Node.js website
description: I have a suggestion (and may want to implement it)!
labels: [feature request]
body:
Expand All @@ -12,7 +12,7 @@ body:
so it might be a good idea to check out our plans there as well: https://github.com/nodejs/nodejs.dev/issues/.
- type: textarea
attributes:
label: "Enter your suggestions in details:"
label: 'Enter your suggestions in details:'
placeholder: |
1. What I expected to happen.
2. Your reason (if possible, images or videos are welcome).
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/03-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
to create a new localization team.
- type: textarea
attributes:
label: "Enter your issue on localizations here:"
label: 'Enter your issue on localizations here:'
placeholder: |
1. The name of the team (e.g: nodejs/node-cn).
2. Any problems to report or you want to create it?
Expand Down
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: "/"
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 10
61 changes: 40 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: '.nvmrc'
cache: npm

- name: Install npm dependencies
Expand All @@ -31,9 +31,9 @@ jobs:
- name: Lint
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
npm run test:lint
npm run lint

test:
build:
name: Node on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

Expand All @@ -49,28 +49,47 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: '.nvmrc'
cache: npm

- run: java -version

- name: Install npm dependencies
- name: Install NPM dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run unit tests
run: npm run test:unit
- name: Restore Next.js cache
uses: actions/cache/restore@v3
with:
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-

- name: Run HTML validator
run: npm run test:html
- name: Build Next.js
run: npm run build
env:
NODE_OPTIONS: '--max_old_space_size=4096'

- name: Run linkinator
uses: JustinBeckwith/linkinator-action@v1
- name: Save Next.js cache
uses: actions/cache/save@v3
with:
linksToSkip: "^(?!http://localhost)"
paths: en
recurse: true
serverRoot: build
verbosity: error
path: |
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('.next/cache/eslint') }}

- name: Export Next.js
run: npm run export

# We don't generate non-translated pages. So if a certain page on /en/ exists
# but not on /de/ or any other language, it will 404. This is handled on nginx level
# Prior to this migration Metalsmith would copy the English version of a page to all
# the non-translated pages. "Fooling" the 404 by basically adding i18n context with
# an untranslated page. This would be very exhaustive with Next.js on SCG mode
# but it's something we want to do once we decide upon using Next.js on SSR mode or
# if we decide upon using Vercel's infrastructure as generating a copy of every English page
# on the file system is very resource exhaustive.
# - name: Run linkinator
# uses: JustinBeckwith/linkinator-action@v1
# with:
# linksToSkip: '^(?!http://localhost)'
# paths: en
# recurse: true
# serverRoot: build
# verbosity: error
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -8,7 +8,7 @@ on:
branches:
- main
schedule:
- cron: "0 0 * * 0"
- cron: '0 0 * * 0'
workflow_dispatch:

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "javascript"
languages: 'javascript'

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Generated HTML and other static files
build/
# Commonly ignored Node.js files
node_modules/
npm-debug.log
Expand All @@ -10,7 +8,13 @@ npm-debug.log
.AppleDouble
.LSOverride

# Netlify
.netlify
# Next.js files
.next
build
public/sitemap.xml
public/en/feed/*.xml
pages/en/blog/year-[0-9][0-9][0-9][0-9].md

.cache/
# ESLint Cache Files
.eslintjscache
.eslintmdcache
1 change: 0 additions & 1 deletion .mailmap

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/hydrogen
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
build
.next
external
styles
node_modules
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

# 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
Loading