Skip to content

Commit 39074c0

Browse files
committed
feat: initial scaffolding
1 parent 19ea7c1 commit 39074c0

25 files changed

+34415
-1
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
max_line_length = 120
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
lib

.eslintrc.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
extends: '@netlify/eslint-config-node',
3+
rules: {
4+
'no-param-reassign': ['error', { props: false }],
5+
'no-underscore-dangle': 0,
6+
'n/no-sync': 0,
7+
'n/prefer-global/process': 0,
8+
'no-magic-numbers': 0,
9+
'unicorn/numeric-separators-style': 0,
10+
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
11+
'import/no-namespace': 0,
12+
},
13+
}

.github/.kodiak.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version = 1
2+
3+
[merge.automerge_dependencies]
4+
versions = ["minor", "patch"]
5+
usernames = ["renovate"]
6+
7+
[approve]
8+
auto_approve_usernames = ["renovate"]

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @netlify/ecosystem-pod-frameworks

.github/pull_request_template.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- Before opening a pull request, ensure you've read our contributing guidelines, https://github.com/netlify/next-runtime/blob/main/CONTRIBUTING.md. -->
2+
3+
## Description
4+
5+
<!-- Provide a brief summary of the change. -->
6+
7+
### Documentation
8+
9+
<!-- Where is this feature or API documented? Did you create an internal and/or external artifact to document this change? -->
10+
11+
## Tests
12+
13+
<!-- Did you add tests? How did you test this change? -->
14+
15+
You can test this change yourself like so:
16+
17+
1. TODO
18+
19+
## Relevant links (GitHub issues, etc.) or a picture of cute animal
20+
21+
<!-- Link to an issue that is fixed by this PR or related to this PR. -->

.github/workflows/labeler.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Label PR
2+
on:
3+
pull_request:
4+
types: [opened, edited]
5+
6+
jobs:
7+
label-pr:
8+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
pr:
13+
[
14+
{ prefix: 'fix', type: 'bug' },
15+
{ prefix: 'chore', type: 'chore' },
16+
{ prefix: 'test', type: 'chore' },
17+
{ prefix: 'ci', type: 'chore' },
18+
{ prefix: 'feat', type: 'feature' },
19+
{ prefix: 'security', type: 'security' },
20+
]
21+
steps:
22+
- uses: netlify/[email protected]
23+
if: startsWith(github.event.pull_request.title, matrix.pr.prefix)
24+
with:
25+
token: '${{ secrets.GITHUB_TOKEN }}'
26+
label: 'type: ${{ matrix.pr.type }}'

.github/workflows/release-please.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: release-please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: navikt/github-app-token-generator@a3831f44404199df32d8f39f7c0ad9bb8fa18b1c
11+
id: get-token
12+
with:
13+
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
14+
app-id: ${{ secrets.TOKENS_APP_ID }}
15+
- uses: GoogleCloudPlatform/release-please-action@v3
16+
id: release
17+
with:
18+
token: ${{ steps.get-token.outputs.token }}
19+
command: manifest
20+
- uses: actions/checkout@v3
21+
if: ${{ steps.release.outputs.release_created }}
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 'lts/*'
25+
cache: 'npm'
26+
check-latest: true
27+
registry-url: 'https://registry.npmjs.org'
28+
if: ${{ steps.release.outputs.release_created }}
29+
- name: Install dependencies
30+
run: CI=1 npm ci
31+
if: ${{ steps.release.outputs.release_created }}
32+
- run: npm publish
33+
if: ${{ steps.release.outputs.release_created }}
34+
env:
35+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
36+
- uses: netlify/submit-build-plugin-action@v1
37+
if: ${{ steps.release.outputs.release_created }}
38+
with:
39+
github-token: ${{ steps.get-token.outputs.token }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
lib/

.prettierrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
...require('@netlify/eslint-config-node/.prettierrc.json'),
3+
endOfLine: 'auto',
4+
}

CONTRIBUTING.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributions
2+
3+
🎉 Thanks for considering contributing to this project! 🎉
4+
5+
When contributing to this repository, please first discuss the change you wish to make via an
6+
[issue](https://github.com/netlify/next-runtime/issues/new/choose). Please use the issue templates. They are there to
7+
help you and to help the maintainers gather information.
8+
9+
Before working on an issue, ask to be assigned to it. This makes it clear to other potential contributors that someone
10+
is working on the issue.
11+
12+
When creating a PR, please use the template. The information in the template helps maintainers review your pull request.```
13+
14+
This project was made with ❤️. The simplest way to give back is by starring and sharing it online.
15+
16+
Everyone is welcome regardless of personal background. We enforce a [Code of conduct](CODE_OF_CONDUCT.md) in order to
17+
promote a positive and inclusive environment.
18+
19+
## Development process
20+
21+
First fork and clone the repository. If you're not sure how to do this, please watch
22+
[these videos](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
23+
24+
Run:
25+
26+
```bash
27+
npm install
28+
```
29+
30+
Make sure everything is correctly setup with:
31+
32+
```bash
33+
npm test
34+
```
35+
36+
## How to write commit messages
37+
38+
We use [Conventional Commit messages](https://www.conventionalcommits.org/) to automate version management.
39+
40+
Most common commit message prefixes are:
41+
42+
- `fix:` which represents bug fixes, and generate a patch release.
43+
- `feat:` which represents a new feature, and generate a minor release.
44+
- `feat!:`, `fix!:` or `refactor!:` and generate a major release.
45+
46+
## Releasing
47+
48+
This repository uses [release-please](https://github.com/googleapis/release-please) to automate its releases.
49+
50+
## How to make a minimal reproduction
51+
52+
A reproducible test case is a small Next.js site built to demonstrate a problem - often this problem is caused by a bug in Next.js, next-runtime or user code. Your reproducible test case should contain the bare minimum features needed to clearly demonstrate the bug.
53+
54+
Steps to create a reproducible test case:
55+
56+
- Create a new Next.js site: `npx create-next-app@latest`
57+
- Add any code or functionality related to the issue. For example, if you have problems with middleware functionality you should add all the necessary code of your middleware.
58+
- Verify that you're seeing the expected error(s) when running `netlify serve` and on a deployed version on [Netlify](https://www.netlify.com)
59+
- Publish the code (your GitHub account is a good place to do this) and then link to it when creating an issue. While creating the issue, please give as many details as possible. This could also include screenshots of error messages.

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# next-runtime-minimal
1+
# Next.js Runtime
2+
3+
Next.js is supported natively on Netlify, and in most cases you will not need to install or configure anything. This
4+
repo includes the packages used to support Next.js on Netlify.

babel.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// This is just for jest
2+
module.exports = {
3+
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
4+
}

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./lib')

jest.config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
transform: {
3+
'\\.[jt]sx?$': 'babel-jest',
4+
},
5+
moduleNameMapper: {
6+
'^(\\.\\.?\\/.+)\\.js$': '$1',
7+
},
8+
}

manifest.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name: next-runtime

0 commit comments

Comments
 (0)