Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit bbf7a9d

Browse files
committed
feat: create nextjs-node-loader
0 parents  commit bbf7a9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+24899
-0
lines changed

.cspell.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": "0.2",
3+
"language": "en,en-gb",
4+
"words": [
5+
"commitlint",
6+
"dlopen",
7+
"RTLD",
8+
"Koppers",
9+
"sokra",
10+
"napi",
11+
"NAPI",
12+
"memfs"
13+
],
14+
15+
"ignorePaths": [
16+
"CHANGELOG.md",
17+
"package.json",
18+
"dist/**",
19+
"**/__snapshots__/**",
20+
"package-lock.json",
21+
"node_modules",
22+
"coverage",
23+
"*.log"
24+
]
25+
}

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# editorconfig.org
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/coverage
2+
/dist
3+
/node_modules
4+
/test/fixtures

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
4+
};

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package-lock.json -diff
2+
* text=auto
3+
bin/* eol=lf
4+
yarn.lock -diff
5+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Dependency Review"
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: "Checkout Repository"
12+
uses: actions/checkout@v3
13+
- name: "Dependency Review"
14+
uses: actions/dependency-review-action@v3

.github/workflows/nodejs.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: node-loader
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- next
8+
pull_request:
9+
branches:
10+
- master
11+
- next
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
lint:
18+
name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
19+
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
strategy:
24+
matrix:
25+
os: [ubuntu-latest]
26+
node-version: [lts/*]
27+
28+
runs-on: ${{ matrix.os }}
29+
30+
concurrency:
31+
group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
steps:
35+
- uses: actions/checkout@v3
36+
with:
37+
fetch-depth: 0
38+
39+
- name: Use Node.js ${{ matrix.node-version }}
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
cache: "npm"
44+
45+
- name: Use latest NPM
46+
run: sudo npm i -g npm
47+
48+
- name: Install dependencies
49+
run: npm ci
50+
51+
- name: Lint
52+
run: npm run lint
53+
54+
- name: Security audit
55+
run: npm run security
56+
57+
- name: Check commit message
58+
uses: wagoid/commitlint-github-action@v5
59+
60+
test:
61+
name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}
62+
63+
strategy:
64+
matrix:
65+
os: [ubuntu-latest, windows-latest, macos-latest]
66+
node-version: [10.x, 12.x, 14.x]
67+
webpack-version: [latest]
68+
69+
runs-on: ${{ matrix.os }}
70+
71+
concurrency:
72+
group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }}
73+
cancel-in-progress: true
74+
75+
steps:
76+
- name: Setup Git
77+
if: matrix.os == 'windows-latest'
78+
run: git config --global core.autocrlf input
79+
80+
- uses: actions/checkout@v3
81+
82+
- name: Use Node.js ${{ matrix.node-version }}
83+
uses: actions/setup-node@v3
84+
with:
85+
node-version: ${{ matrix.node-version }}
86+
cache: "npm"
87+
88+
- name: Use latest NPM on ubuntu/macos
89+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
90+
run: sudo npm i -g npm
91+
92+
- name: Use latest NPM on windows
93+
if: matrix.os == 'windows-latest'
94+
run: npm i -g npm
95+
96+
- name: Install dependencies
97+
run: npm ci
98+
99+
- name: Install webpack ${{ matrix.webpack-version }}
100+
if: matrix.webpack-version != 'latest'
101+
run: npm i webpack@${{ matrix.webpack-version }}
102+
103+
- name: Run tests for webpack version ${{ matrix.webpack-version }}
104+
run: npm run test:coverage -- --ci
105+
106+
- name: Submit coverage data to codecov
107+
uses: codecov/codecov-action@v3
108+
with:
109+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
logs
2+
*.log
3+
npm-debug.log*
4+
.eslintcache
5+
/coverage
6+
/dist
7+
/local
8+
/reports
9+
/node_modules
10+
.DS_Store
11+
Thumbs.db
12+
.idea
13+
.vscode
14+
*.sublime-project
15+
*.sublime-workspace
16+
*.iml
17+
test/fixtures/example/build
18+
test/fixtures/example/node_modules
19+

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

0 commit comments

Comments
 (0)