Skip to content

Commit 2921f83

Browse files
authored
Merge pull request #22 from jagaapple/release/v2.0.0
# New Features - Add `createSecureHeaders` function #25 # Changes and Fixes - Migrate to GitHub Actions #21 - Update dependencies #23 - Remove default export #24 - Modify a year number in LICENSE - Update changelog - Bump up a version number to 2.0.0
2 parents 7120dd9 + 35a814f commit 2921f83

Some content is hidden

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

54 files changed

+19071
-3390
lines changed

.circleci/config.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@typescript-eslint/explicit-function-return-type": "off",
2323
"@typescript-eslint/no-non-null-assertion": "off",
2424
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
25+
"@typescript-eslint/explicit-module-boundary-types": "off",
2526
"import/no-self-import": "error",
2627
"import/no-cycle": "error",
2728
"import/no-useless-path-segments": "error",

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ message.
3939
|:---------|:----------------------------------------------------------|:------------------------------------------------------------------------------|
4040
| `Add` | Implement functions/Add files/Support new platform | |
4141
| `Change` | Change current spec | Use this type when breaking changes are happened, otherwise DO NOT use. |
42-
| `Fix` | Fix bugs | Use this type when fix bugs, otherwise DO NOT use. |
42+
| `Fix` | Fix bugs | Use this type when you fix bugs, otherwise DO NOT use. |
4343
| `Modify` | Modify wording | Use this type when breaking changes are not happened and fix other than bugs. |
4444
| `Clean` | Refactor some codes/Rename classes, methods, or variables | |
4545
| `Remove` | Remove unneeded files or libraries | |
@@ -59,7 +59,7 @@ Add Implement sign up system
5959
```
6060

6161
### `<SUMMARY>`
62-
`<SUMMARY>` is a sumamry of changes, do not exceed 50 characters including a commit type. Do not include period `.` because
62+
`<SUMMARY>` is a summary of changes, do not exceed 50 characters including a commit type. Do not include period `.` because
6363
a summary should be expressed one sentence. Also start with upper case.
6464

6565
```bash
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: "💩 Bug Report"
3+
about: "If something isn't working as expected..."
4+
title: ""
5+
labels: "Type: 4. Bug"
6+
assignees: ""
7+
---
8+
9+
# 💩 Bug Report
10+
## A summary of the bug
11+
A clear and concise description of what the bug is.
12+
13+
14+
## Current behavior
15+
A clear and concise description of the behavior.
16+
17+
### To Reproduce
18+
Steps to reproduce the behavior, please provide code snippets or a repository.
19+
20+
1. Go to '...'
21+
2. Click on '....'
22+
3. Scroll down to '....'
23+
4. See error
24+
25+
26+
## Expected behavior
27+
A clear and concise description of what you expected to happen or code.
28+
29+
30+
## Environment
31+
- This project version(s): `vX.X.X`
32+
- Nodejs version: `vX.X.X`
33+
- OS: `macOS 10.X.X`
34+
- Browser (if applies): `Google Chrome vX.X.X`
35+
36+
37+
## Additional context
38+
Add any other context about the problem here, or a screenshot if applicable.
39+
40+
---
41+
42+
- [ ] I've tried to find similar issues
43+
- [ ] I would like to work on a fix 💪🏻

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: "🌱 Feature Request"
3+
about: "Create a feature request for this project..."
4+
title: ""
5+
labels: "Type: 2. Enhancement"
6+
assignees: ""
7+
---
8+
9+
# 🌱 Feature Request
10+
## Is your feature request related to a problem? Please describe.
11+
A clear and concise description of what you want and what your use case is.
12+
13+
14+
## Describe the solution you'd like
15+
A clear and concise description of what you want to happen.
16+
17+
18+
## Describe alternatives you've considered
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
22+
## Documentation, Adoption, Migration Strategy
23+
If you can, explain how users will be able to use this and how it might be documented. Maybe a mock-up?
24+
25+
26+
## Additional context
27+
Add any other context or screenshots about the feature request here.
28+
29+
---
30+
31+
- [ ] I've tried to find similar issues and pull requests
32+
- [ ] I would like to work on this feature 💪🏻
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: "Build and test"
2+
on:
3+
push:
4+
branches: ["master"]
5+
pull_request: {}
6+
jobs:
7+
8+
parameters:
9+
name: "Set parameters"
10+
runs-on: "ubuntu-latest"
11+
outputs:
12+
GITHUB_SHA: "${{ steps.GITHUB_SHA.outputs.GITHUB_SHA }}"
13+
steps:
14+
- id: "GITHUB_SHA"
15+
run: "echo \"::set-output name=GITHUB_SHA::$GITHUB_SHA\""
16+
17+
build:
18+
name: "Build"
19+
runs-on: "ubuntu-latest"
20+
needs: "parameters"
21+
strategy:
22+
matrix:
23+
node: ["10.15", "12.13"]
24+
steps:
25+
- uses: "actions/checkout@v2"
26+
- name: "Use Node.js"
27+
uses: "actions/setup-node@v1"
28+
with:
29+
node-version: "${{ matrix.node }}"
30+
- name: "Cache dependencies"
31+
id: "node-modules-dependencies"
32+
uses: "actions/cache@v2"
33+
with:
34+
path: "./node_modules"
35+
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
36+
- name: "Install dependencies if needed"
37+
if: "steps.node-modules-dependencies.outputs.cache-hit != 'true'"
38+
run: "npm ci"
39+
40+
test:
41+
name: "Test"
42+
needs: ["parameters", "build"]
43+
runs-on: "ubuntu-latest"
44+
strategy:
45+
matrix:
46+
node: ["10.15", "12.13"]
47+
steps:
48+
- uses: "actions/checkout@v2"
49+
- name: "Use Node.js"
50+
uses: "actions/setup-node@v1"
51+
with:
52+
node-version: "${{ matrix.node }}"
53+
- name: "Restore cached dependencies"
54+
id: "node-modules-dependencies"
55+
uses: "actions/cache@v2"
56+
with:
57+
path: "./node_modules"
58+
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
59+
- name: "Build test"
60+
run: "npm run build"
61+
- name: "Execute tests"
62+
run: "npm test"
63+
- name: "Calculate coverage rate"
64+
if: "matrix.node == '12.13'"
65+
env:
66+
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
67+
run: "npm run coverage"
68+
69+
lint:
70+
name: "Lint"
71+
needs: ["parameters", "build"]
72+
runs-on: "ubuntu-latest"
73+
strategy:
74+
matrix:
75+
node: ["10.15", "12.13"]
76+
steps:
77+
- uses: "actions/checkout@v2"
78+
- name: "Use Node.js"
79+
uses: "actions/setup-node@v1"
80+
with:
81+
node-version: "${{ matrix.node }}"
82+
- name: "Restore cached dependencies"
83+
id: "node-modules-dependencies"
84+
uses: "actions/cache@v2"
85+
with:
86+
path: "./node_modules"
87+
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
88+
- name: "Execute linters"
89+
run: "npm run lint"

.vscode/settings.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,9 @@
3737
// Extensions
3838
// ---------------------------------------------------------------------------------------------------------------------------
3939
// ESLint
40-
"eslint.autoFixOnSave": true,
41-
"eslint.validate": [
42-
{ "language": "javascript", "autoFix": true },
43-
{ "language": "javascriptreact", "autoFix": true },
44-
{ "language": "typescript", "autoFix": true },
45-
{ "language": "typescriptreact", "autoFix": true }
46-
],
40+
"editor.codeActionsOnSave": {
41+
"source.fixAll.eslint": true
42+
},
4743

4844

4945
// ---------------------------------------------------------------------------------------------------------------------------

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# Changelog
2+
## 2.0.0 (2020-08-08)
3+
- Add support for static pages without any servers 🎉
4+
- Add `createSecureHeaders` function #25 - [@jagaapple](https://github.com/jagaapple)
5+
- Remove default export #24 - [@jagaapple](https://github.com/jagaapple)
6+
- Improve development environment
7+
- Migrate to GitHub Actions #21 - [@jagaapple](https://github.com/jagaapple)
8+
- Update dependencies #23 - [@jagaapple](https://github.com/jagaapple)
9+
10+
### ❗️Breaking Changes
11+
The default export has been removed, `withSecureHeaders` function has been exported as named export instead.
12+
You have to import `withSecureHeaders` like the following.
13+
14+
```diff
15+
- import withSecureHeaders from "next-secure-headers";
16+
+ import { withSecureHeaders } from "next-secure-headers";
17+
```
18+
219
## 1.0.1 (2019-12-13)
320
- Fix setting headers after sending #10 - [@jagaapple](https://github.com/jagaapple)
421
- Improve development environment

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright 2019 Jaga Apple
3+
Copyright 2020 Jaga Apple
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
66
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,

0 commit comments

Comments
 (0)