Skip to content

Commit

Permalink
Merge pull request #22 from jagaapple/release/v2.0.0
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
jagaapple committed Aug 8, 2020
2 parents 7120dd9 + 35a814f commit 2921f83
Show file tree
Hide file tree
Showing 54 changed files with 19,071 additions and 3,390 deletions.
58 changes: 0 additions & 58 deletions .circleci/config.yml

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"import/no-self-import": "error",
"import/no-cycle": "error",
"import/no-useless-path-segments": "error",
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message.
|:---------|:----------------------------------------------------------|:------------------------------------------------------------------------------|
| `Add` | Implement functions/Add files/Support new platform | |
| `Change` | Change current spec | Use this type when breaking changes are happened, otherwise DO NOT use. |
| `Fix` | Fix bugs | Use this type when fix bugs, otherwise DO NOT use. |
| `Fix` | Fix bugs | Use this type when you fix bugs, otherwise DO NOT use. |
| `Modify` | Modify wording | Use this type when breaking changes are not happened and fix other than bugs. |
| `Clean` | Refactor some codes/Rename classes, methods, or variables | |
| `Remove` | Remove unneeded files or libraries | |
Expand All @@ -59,7 +59,7 @@ Add Implement sign up system
```

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

```bash
Expand Down
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: "💩 Bug Report"
about: "If something isn't working as expected..."
title: ""
labels: "Type: 4. Bug"
assignees: ""
---

# 💩 Bug Report
## A summary of the bug
A clear and concise description of what the bug is.


## Current behavior
A clear and concise description of the behavior.

### To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository.

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error


## Expected behavior
A clear and concise description of what you expected to happen or code.


## Environment
- This project version(s): `vX.X.X`
- Nodejs version: `vX.X.X`
- OS: `macOS 10.X.X`
- Browser (if applies): `Google Chrome vX.X.X`


## Additional context
Add any other context about the problem here, or a screenshot if applicable.

---

- [ ] I've tried to find similar issues
- [ ] I would like to work on a fix 💪🏻
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: "🌱 Feature Request"
about: "Create a feature request for this project..."
title: ""
labels: "Type: 2. Enhancement"
assignees: ""
---

# 🌱 Feature Request
## Is your feature request related to a problem? Please describe.
A clear and concise description of what you want and what your use case is.


## Describe the solution you'd like
A clear and concise description of what you want to happen.


## Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.


## Documentation, Adoption, Migration Strategy
If you can, explain how users will be able to use this and how it might be documented. Maybe a mock-up?


## Additional context
Add any other context or screenshots about the feature request here.

---

- [ ] I've tried to find similar issues and pull requests
- [ ] I would like to work on this feature 💪🏻
89 changes: 89 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: "Build and test"
on:
push:
branches: ["master"]
pull_request: {}
jobs:

parameters:
name: "Set parameters"
runs-on: "ubuntu-latest"
outputs:
GITHUB_SHA: "${{ steps.GITHUB_SHA.outputs.GITHUB_SHA }}"
steps:
- id: "GITHUB_SHA"
run: "echo \"::set-output name=GITHUB_SHA::$GITHUB_SHA\""

build:
name: "Build"
runs-on: "ubuntu-latest"
needs: "parameters"
strategy:
matrix:
node: ["10.15", "12.13"]
steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node }}"
- name: "Cache dependencies"
id: "node-modules-dependencies"
uses: "actions/cache@v2"
with:
path: "./node_modules"
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
- name: "Install dependencies if needed"
if: "steps.node-modules-dependencies.outputs.cache-hit != 'true'"
run: "npm ci"

test:
name: "Test"
needs: ["parameters", "build"]
runs-on: "ubuntu-latest"
strategy:
matrix:
node: ["10.15", "12.13"]
steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node }}"
- name: "Restore cached dependencies"
id: "node-modules-dependencies"
uses: "actions/cache@v2"
with:
path: "./node_modules"
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
- name: "Build test"
run: "npm run build"
- name: "Execute tests"
run: "npm test"
- name: "Calculate coverage rate"
if: "matrix.node == '12.13'"
env:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
run: "npm run coverage"

lint:
name: "Lint"
needs: ["parameters", "build"]
runs-on: "ubuntu-latest"
strategy:
matrix:
node: ["10.15", "12.13"]
steps:
- uses: "actions/checkout@v2"
- name: "Use Node.js"
uses: "actions/setup-node@v1"
with:
node-version: "${{ matrix.node }}"
- name: "Restore cached dependencies"
id: "node-modules-dependencies"
uses: "actions/cache@v2"
with:
path: "./node_modules"
key: "node-modules-${{ needs.parameters.outputs.GITHUB_SHA }}-${{ matrix.node }}"
- name: "Execute linters"
run: "npm run lint"
10 changes: 3 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@
// Extensions
// ---------------------------------------------------------------------------------------------------------------------------
// ESLint
"eslint.autoFixOnSave": true,
"eslint.validate": [
{ "language": "javascript", "autoFix": true },
{ "language": "javascriptreact", "autoFix": true },
{ "language": "typescript", "autoFix": true },
{ "language": "typescriptreact", "autoFix": true }
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},


// ---------------------------------------------------------------------------------------------------------------------------
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# Changelog
## 2.0.0 (2020-08-08)
- Add support for static pages without any servers 🎉
- Add `createSecureHeaders` function #25 - [@jagaapple](https://github.com/jagaapple)
- Remove default export #24 - [@jagaapple](https://github.com/jagaapple)
- Improve development environment
- Migrate to GitHub Actions #21 - [@jagaapple](https://github.com/jagaapple)
- Update dependencies #23 - [@jagaapple](https://github.com/jagaapple)

### ❗️Breaking Changes
The default export has been removed, `withSecureHeaders` function has been exported as named export instead.
You have to import `withSecureHeaders` like the following.

```diff
- import withSecureHeaders from "next-secure-headers";
+ import { withSecureHeaders } from "next-secure-headers";
```

## 1.0.1 (2019-12-13)
- Fix setting headers after sending #10 - [@jagaapple](https://github.com/jagaapple)
- Improve development environment
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright 2019 Jaga Apple
Copyright 2020 Jaga Apple

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

0 comments on commit 2921f83

Please sign in to comment.