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

feat(infra): migrate to Next.js infrastructure #4991

Merged
merged 244 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
6018f64
chore(next.js): added initial package.json update and configuration f…
ovflowd Jan 3, 2023
0e658ac
chore(static): moved static files to public/static
ovflowd Jan 3, 2023
72305ce
chore(pages): moved locale directory to pages/
ovflowd Jan 3, 2023
46f20c2
chore(survey): added readme and updated deploy script for survey
ovflowd Jan 3, 2023
2cc4263
chore(legacy): removed build.js and server.js
ovflowd Jan 3, 2023
5016948
chore(typescript): updated theme.tsx and added typescript support
ovflowd Jan 3, 2023
1655c58
chore(folder-structure): continued moving files and clean up of things
ovflowd Jan 3, 2023
60110f6
chore(codeowners): updated codeowners
ovflowd Jan 3, 2023
94de20d
chore(eslint): updated markdown matching
ovflowd Jan 3, 2023
d725521
chore(move): moved styles and layout and data folders
ovflowd Jan 7, 2023
0857c35
chore(i18n): added initial locale config
ovflowd Jan 7, 2023
556a5e9
chore(lts): stick with v18 lts
ovflowd Jan 7, 2023
f6264d7
chore(i18n): updated crowdin configuration
ovflowd Jan 7, 2023
edd70c6
chore(lts): fixed lts naming on ci and nvm
ovflowd Jan 7, 2023
c8e35ba
chore(package.json): fixed lint commands
ovflowd Jan 7, 2023
8cd5490
chore(package-lock): reindexed and updated package lock
ovflowd Jan 7, 2023
e7dccb0
chore(i18n): added react-intl package
ovflowd Jan 7, 2023
f013a23
chore(configs): updated next, eslint and tsconfig
ovflowd Jan 7, 2023
a7dca8f
chore(packages): add prettier config for the plugin
ovflowd Jan 7, 2023
d3c862c
chore(configs): updated prettier, eslint adn package.json
ovflowd Jan 7, 2023
1da23b8
chore(package): removed airbnb config
ovflowd Jan 7, 2023
353e897
chore(lint): applied linting in core files
ovflowd Jan 7, 2023
96a74c7
chore(lint): applied linting on markdown and style files
ovflowd Jan 7, 2023
2f636af
chore(ci): disable build job for now
ovflowd Jan 7, 2023
fb76c10
chore(cache): added eslint cache files to ignore
ovflowd Jan 7, 2023
c77e2b9
chore(public): moved robots and security to root public folder
ovflowd Jan 7, 2023
16bd72e
chore(eslint): added default next config
ovflowd Jan 7, 2023
d78ab95
chore(remark): added remark configuration
ovflowd Jan 7, 2023
afaa644
chore(i18n): added ICU locale files boilerplates
ovflowd Jan 9, 2023
5c0817a
chore(config): added website config file
ovflowd Jan 9, 2023
2c94964
chore(favicon): removed all favicon alternates to a simple png file
ovflowd Jan 9, 2023
1866ede
chore(dependencies): added a rss/atom/json feed package
ovflowd Jan 9, 2023
641b33e
chore(packages): updated packages and adopted npm-run-all
ovflowd Jan 9, 2023
a3277cf
chore(layouts): removed blm specific layouts
ovflowd Jan 9, 2023
7c509cb
feast(config): introduced site config provider and context
ovflowd Jan 9, 2023
bcc3521
feat(header): started to create the header component
ovflowd Jan 9, 2023
2168b76
chore(provider): refactored provider
ovflowd Jan 9, 2023
2a4d883
chore(fonts): added source sans pro font
ovflowd Jan 9, 2023
fec974c
feat(templates): added core component
ovflowd Jan 9, 2023
930aaad
chore(pages): removed legacy blm page
ovflowd Jan 9, 2023
c7d8ead
feat(types): introduced frontmatter types
ovflowd Jan 9, 2023
c3d2b00
chore(theme): started to update theme with layout
ovflowd Jan 9, 2023
9d28216
feat(config): updated site config types
ovflowd Jan 9, 2023
00d07c6
feat(header): added all header meta tags
ovflowd Jan 9, 2023
aa2dcf3
chore(document): added assets for theme switch
ovflowd Jan 9, 2023
c5e529c
chore(eslint): fixed eslint failed rule
ovflowd Jan 9, 2023
713d913
update nextra
shuding Jan 9, 2023
a805506
chore(document): added remaining scripts
ovflowd Jan 9, 2023
9da7a4f
feat(footer): added footer
ovflowd Jan 9, 2023
7218035
feat(header): updated header with favicon
ovflowd Jan 9, 2023
ac8c565
feat(manifest): added manifest for PWA
ovflowd Jan 9, 2023
74d5e07
feat(i18n): introduced i18n hook
ovflowd Jan 9, 2023
6880d0f
chore(header): added i18n config
ovflowd Jan 9, 2023
55a3732
feat(layouts): added default layout
ovflowd Jan 9, 2023
ad909f5
feat(layouts): initial version of the layout provider
ovflowd Jan 9, 2023
03e4c83
refactor(provider): cleaned-up the site provider
ovflowd Jan 9, 2023
dffe0af
feat(theme): adopted layout provider on theme
ovflowd Jan 9, 2023
68abfe5
chore(layouts): removed unused layouts
ovflowd Jan 9, 2023
1c957b8
feat(footer): added scroll-to-top
ovflowd Jan 9, 2023
729d257
chore(i18n): added navigation and translations
ovflowd Jan 10, 2023
b7c4d46
chore(dependencies): added highlightjs and classnames
ovflowd Jan 10, 2023
41b768b
chore(utils): added link locale util
ovflowd Jan 10, 2023
922fdbb
feat(i18n): introduced locale provider
ovflowd Jan 10, 2023
bc270b0
feat(header): renamed header into htmlhead
ovflowd Jan 10, 2023
61b6939
feat(header): introduced page header
ovflowd Jan 10, 2023
1db93b9
feat(components): introduced localised linkicomponent
ovflowd Jan 10, 2023
9ce8c72
feat(components): introduced language picker component
ovflowd Jan 10, 2023
80b8e9c
chore(footer): updated translation id
ovflowd Jan 10, 2023
a127bbc
feat(app): updated app, document and theme with new locale and scripts
ovflowd Jan 10, 2023
2d158d7
chore(layouts): added header to default layout
ovflowd Jan 10, 2023
1e14132
chore(layouts): removed old header layout
ovflowd Jan 10, 2023
5006fbb
chore(docs): made the docs index mdx compatible
ovflowd Jan 10, 2023
5aa43a0
chore(types): added labels to frontmatter
ovflowd Jan 10, 2023
cc40739
chore(config): updated next config and remark plugins
ovflowd Jan 10, 2023
b4e8f72
chore(types): added types for node-version-data
ovflowd Jan 10, 2023
b3954d2
feat(i18n): hook to support metadata about current route
ovflowd Jan 10, 2023
da37773
feat(navigation): updated navigation metadata
ovflowd Jan 10, 2023
843c600
feat(navigation): introduced a navigation hook
ovflowd Jan 10, 2023
0c57e96
feat(node-versions): introduced provider and types for node-versions
ovflowd Jan 10, 2023
c144490
feat(navigation): introduced side navigation component
ovflowd Jan 10, 2023
e693ec2
feat(header): use the new navigation component
ovflowd Jan 10, 2023
057cd9d
chore(app): introduced node data provider usage
ovflowd Jan 10, 2023
304c5e4
feat(docs): introduced doc layout
ovflowd Jan 10, 2023
6f559d4
chore(layouts): added docs to layout provider
ovflowd Jan 10, 2023
7e4c698
chore(layouts/scripts): removed now unused layouts and scripts
ovflowd Jan 10, 2023
4125fcc
chore(scripts): removed build scripts for node data
ovflowd Jan 10, 2023
59871bd
chore(utils): introduced new util
ovflowd Jan 10, 2023
5108087
chore(data): removed non-needed data anymore
ovflowd Jan 10, 2023
c8e8173
chore(navigation): include root entry on side nav
ovflowd Jan 10, 2023
3996fc5
fix(footer): fixed spacing of items
ovflowd Jan 10, 2023
63b9988
fix(body): next element to also follow body rules
ovflowd Jan 10, 2023
dbf9078
feat(layouts): introduced new layouts
ovflowd Jan 10, 2023
a38b159
chore(note): added todo notes on temporary components
ovflowd Jan 10, 2023
d2950c4
feat(mdx): added proper node api versions component
ovflowd Jan 10, 2023
188da41
chore(dependencies): removed non-needed dependencies
ovflowd Jan 10, 2023
3ebcaef
chore(docs): reverted mdx rename and use regular mdx provider for the…
ovflowd Jan 10, 2023
05fe823
chore(remark): a lot of the lists are unordered and shouldn't need to…
ovflowd Jan 10, 2023
40c82f0
chore(layouts): removed unused knowledge layouts
ovflowd Jan 10, 2023
669140c
feat(banner): introduced banner component
ovflowd Jan 10, 2023
cca892f
feat(nextra): allow plain md syntax; include i18n file in ssg
shuding Jan 11, 2023
270c55d
feat(next): introduced lambdas for getting data
ovflowd Jan 11, 2023
5357029
chore(eslint): added mjs to es6 context
ovflowd Jan 11, 2023
b378159
feat(next): adopted new data fetching mechanism
ovflowd Jan 11, 2023
173b534
feat(providers): updated providers with new data fetching
ovflowd Jan 11, 2023
347b400
chore(types): simplified provider types
ovflowd Jan 11, 2023
560ddbc
chore(i18n): added lts span
ovflowd Jan 11, 2023
37324c3
chore(next): improve next configuration
ovflowd Jan 11, 2023
1c316e4
feat(header): allow subpath match for sidenav
ovflowd Jan 11, 2023
a9d9729
chore(dependencies): added critters and sharp for css/image optimization
ovflowd Jan 11, 2023
05e146d
feat(caching): introduced caching of static async props
ovflowd Jan 11, 2023
c4364dc
fix(header): home location sublink
ovflowd Jan 11, 2023
70ac737
chore(hooks): removed .tsx extension
ovflowd Jan 11, 2023
53a4d1d
chore(scripts): removed unused scripts
ovflowd Jan 11, 2023
ec9f50e
feat(utils): added util for changelog link
ovflowd Jan 11, 2023
37b0585
feat(providers): provide nextra context
ovflowd Jan 11, 2023
9782bc2
chore(types): added numeric version
ovflowd Jan 11, 2023
dc84abb
feat(hooks): nextra context hook
ovflowd Jan 11, 2023
3819610
feat(components): download button component
ovflowd Jan 11, 2023
dcebdf9
feat(layouts): introduced index layout
ovflowd Jan 11, 2023
5fca766
feat(date): added format time util
ovflowd Jan 11, 2023
3939db6
chore(scripts): removed more unused scripts
ovflowd Jan 11, 2023
8c20bbd
disable flexsearch for now
shuding Jan 11, 2023
ef7ce9a
chore(next): increase memory pool for build
ovflowd Jan 12, 2023
c05a2d9
feat(data): updated hooks and how data is provided
ovflowd Jan 12, 2023
00c9bb7
chore(components): moved a few components around
ovflowd Jan 12, 2023
4644d41
chore(404): added dev 404 page
ovflowd Jan 12, 2023
e913c05
chore(i18n): added navigation and i18n for downloads
ovflowd Jan 12, 2023
9a9fd81
feat(download): introduced download components
ovflowd Jan 12, 2023
bcd73f3
feat(pages): introduced download pages
ovflowd Jan 12, 2023
e3fd213
feat(navigation): offer replacement of vars in link
ovflowd Jan 12, 2023
3b61c73
chore(scripts): updated a few scripts
ovflowd Jan 12, 2023
a352a64
chore(scripts): removed other deprecated script
ovflowd Jan 13, 2023
c38b647
chore(handlebars): added handlebars
ovflowd Jan 18, 2023
820a787
feat(release-post): contained release posts within the scripts folder
ovflowd Jan 18, 2023
fbf2212
chore(external): no need to have a package.json there anymore
ovflowd Jan 18, 2023
253a4a0
chore(release-post): minor typo fix
ovflowd Jan 18, 2023
3a6c2d5
chore(dependencies): added sw dependency
ovflowd Jan 18, 2023
9d50c76
chore(sw): enable sw feature
ovflowd Jan 18, 2023
bac2e22
chore(types): updated node data types
ovflowd Jan 18, 2023
2dd6b53
feat(components): introduced download table component
ovflowd Jan 18, 2023
98e8ce6
chore(layouts): introduced previous releases layout
ovflowd Jan 18, 2023
f9b8ba7
chore(scripts): added jquery as script
ovflowd Jan 18, 2023
8f2f901
refactor(components): use Link component
ovflowd Jan 18, 2023
81c247e
chore(downloads): use dompurify for the frontmatter modules
ovflowd Jan 18, 2023
9a40f2f
fix(links): fix api docs links
ovflowd Jan 18, 2023
a452393
fix(locale): fixed determination of route match
ovflowd Jan 18, 2023
57115f6
chore(deps): updated dependencies
ovflowd Jan 18, 2023
e015437
chore(helpers): introduced helper for getting a header link
ovflowd Jan 18, 2023
c6fdfc5
feat(heading): introduced anchored heading component
ovflowd Jan 18, 2023
fd6ddcd
chore(theme): adopted anchored component
ovflowd Jan 18, 2023
84ee4cc
chore(anchor): id is always provided
ovflowd Jan 18, 2023
80795e3
chore(dependencies): updated package json
ovflowd Jan 18, 2023
8564969
chore(mdx): transformed into mdx pages that need to be in mdx
ovflowd Jan 19, 2023
13638a9
chore(dependencies): updated dependencies
ovflowd Jan 19, 2023
0f20a34
chore(mdx): default config
ovflowd Jan 19, 2023
2722ec1
fix: upgrade nextra and refactor getNextData
shuding Jan 19, 2023
72ad9af
feat(layouts): introduced blog post layout
ovflowd Jan 19, 2023
ede7ae4
fix(release-post): end paragraph markings
ovflowd Jan 19, 2023
d9e7515
chore(layouts): sanitize to be memoized
ovflowd Jan 19, 2023
e7c2592
fix: only pass necessary node versions in page props
shuding Jan 19, 2023
6dd0480
chore(guides): removed non-translated guides
ovflowd Jan 19, 2023
054b653
fix(markdown): fix buffer guide markdown
ovflowd Jan 19, 2023
15568f1
feat(mdx): blockquote as highlightbox
ovflowd Jan 19, 2023
83641ce
fix(linting): fixed prettier rules for mdx
ovflowd Jan 19, 2023
39cf2cc
fix: /404 route and optimize page size
shuding Jan 19, 2023
ffda8c4
fix: optimize next build
shuding Jan 20, 2023
2c0b673
chore(canonical): add canonical
ovflowd Jan 20, 2023
6546723
refactor(data): simplified data gathering
ovflowd Jan 20, 2023
b45f40f
chore(dependencies): introducesd sitemap and swr
ovflowd Jan 20, 2023
ffebe0e
chore(ts): allow downlevel iteration
ovflowd Jan 20, 2023
9030c2e
fix(build): unoptimized images
ovflowd Jan 20, 2023
d3f69e4
feat(downloads): only latest major of each version
ovflowd Jan 20, 2023
b4466f5
chore(js): removed unused code
ovflowd Jan 20, 2023
7a2ef78
chore(404): prettified 404 file
ovflowd Jan 20, 2023
57eb58e
chore(footer): fixed # not valid
ovflowd Jan 20, 2023
d13a7b7
chore(i18n): add 404 page messages
ovflowd Jan 20, 2023
8a64af3
chore(404): use tsx instead of mdx
ovflowd Jan 20, 2023
d7d030e
chore(react-intl): no errors
ovflowd Jan 20, 2023
9502901
chore(i18n): fallback data
ovflowd Jan 20, 2023
f01219b
chore(ci): added build on ci again
ovflowd Jan 20, 2023
982179b
chore(sitemap): added sitemap data
ovflowd Jan 20, 2023
6695074
chore(eslint): prefer nodejs config
ovflowd Jan 20, 2023
b32162c
chore(fix): linting
ovflowd Jan 20, 2023
9dd0703
chore(scripts): remove server 404 and fix main.js for 404
ovflowd Jan 20, 2023
ca5bf9e
chore(build): is memory efficient now
ovflowd Jan 20, 2023
c3b3976
fix(i18n): always using english locale
ovflowd Jan 20, 2023
006082b
chore(next): updated config options
ovflowd Jan 20, 2023
9587276
feat(data): improved data rendering/reusability
ovflowd Jan 20, 2023
ce776a6
chore(next): remove non-necessary packages
ovflowd Jan 20, 2023
e8c407a
chore(scripts): refactored release-post to mjs
ovflowd Jan 20, 2023
972b8f6
chore(scripts): simplify and document code
ovflowd Jan 20, 2023
8e0c59d
chore(next): refactored data scripts
ovflowd Jan 20, 2023
826502a
refactor(header): i18n, svg and fix styles
ovflowd Jan 20, 2023
8c1f8f5
chore(next): minor refactor of helper
ovflowd Jan 20, 2023
a8e73d7
feat(node-data): only on selected routes
ovflowd Jan 20, 2023
1606340
fix(ts): fixed typescript types
ovflowd Jan 20, 2023
ae63ea8
refactor(providers): simplified the _app
ovflowd Jan 20, 2023
8661cc4
chore(dependencies): added gray-matter
ovflowd Jan 20, 2023
ad570ac
feat(helpers): introduced script helpers
ovflowd Jan 20, 2023
72c31a3
chore(types): updated types
ovflowd Jan 20, 2023
5d546ff
refactor(next): refactored data components
ovflowd Jan 20, 2023
efc6fd8
chore(sitemap): removed non-existent env
ovflowd Jan 20, 2023
77a22fa
chore(optimize): removed css optimization
ovflowd Jan 20, 2023
4210f36
feat(dat): introduced blog data helper
ovflowd Jan 20, 2023
5d2ff66
fix(blogdata): fixed slug
ovflowd Jan 20, 2023
8352e3c
feat(types): shared props and context
ovflowd Jan 20, 2023
c050765
feat(utils): added time component
ovflowd Jan 20, 2023
8fc5f0c
chore(gitignore): year pages
ovflowd Jan 20, 2023
69b4f7d
chore(types): refactored types
ovflowd Jan 20, 2023
634c112
chore(data): improved blog data and create year pages
ovflowd Jan 20, 2023
670195b
feat(blog): introduced blog index page
ovflowd Jan 20, 2023
7bc099f
feat(layouts): implemented blog category layout
ovflowd Jan 20, 2023
3328720
feat(i18n): migrate translations 🎉 (#1)
shanpriyan Jan 23, 2023
2002ec6
fix(document): numerours document style fixes and javascript fixes
ovflowd Jan 23, 2023
18b0e36
chore(eslint): global window
ovflowd Jan 23, 2023
597cd31
chore(external): moved external folders
ovflowd Jan 23, 2023
edb66e4
feat(rss): introduced rss generation
ovflowd Jan 23, 2023
b89f532
chore(tests): removed unused tests
ovflowd Jan 23, 2023
c6b7c29
chore(readme): updated readme
ovflowd Jan 23, 2023
6727512
chore(lint): ignore and fix linting
ovflowd Jan 23, 2023
cf3ae11
refactor(scripts): refactored the legacy scripts
ovflowd Jan 23, 2023
32ddc01
chore(ci): set memory to 4gb on ci
ovflowd Jan 23, 2023
d4fa511
chore(workers): no need tofr morkers
ovflowd Jan 23, 2023
3b29f2e
chore(ci): updated a doc and ci file
ovflowd Jan 23, 2023
09781bb
chore(refactor): minor refactors, text changes and bug fixes
ovflowd Jan 24, 2023
39eed0f
Update COLLABORATOR_GUIDE.md
ovflowd Jan 24, 2023
652952a
Apply suggestions from code review
ovflowd Jan 24, 2023
9e841e8
fix: upgrade nextra to remove the __esModule hack
shuding Jan 24, 2023
16b120f
chore: disable outputFileTracing
shuding Jan 24, 2023
a582517
chore(ci): use build cache
ovflowd Jan 24, 2023
987e49e
chore(js): fix theme switcher issues
ovflowd Jan 24, 2023
055e155
fix(build): improved data transmission from static props
ovflowd Jan 24, 2023
da9f8f7
chore(fixes): minor style and config changes
ovflowd Jan 24, 2023
dd3ccbc
fix(scrollto): minor scroll to fix
ovflowd Jan 24, 2023
0e9ce10
Update next.config.mjs
ovflowd Jan 24, 2023
b654432
chore(ci): attempt to optimize caching
ovflowd Jan 25, 2023
2200081
chore(ci): fine-tune to be based on eslint hashing
ovflowd Jan 25, 2023
db089e9
chore(cache): only cache .next/cache
ovflowd Jan 25, 2023
abf9ff0
chore(mastodon): added mastodon verification
ovflowd Feb 3, 2023
d6bcd66
chore(next): updated packages and optimised build performance
ovflowd Feb 25, 2023
54b6322
chore(dependencies): updated dependencies
ovflowd Mar 8, 2023
19dd5ac
fix(lint): fixed linting
ovflowd Mar 8, 2023
5e02b4b
chore(dependencies): removed temp dep
ovflowd Mar 8, 2023
735f7dd
chore(package): reduce memory
ovflowd 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/02-feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
ovflowd marked this conversation as resolved.
Show resolved Hide resolved
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
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "es5",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "avoid"
}
Loading