Skip to content

Commit 56ad0ce

Browse files
v0.4.0 (#9)
* supporting custom serialization * applying prettier * mentioning core upgrade * consolidating comments * separating entry and entry list and adding name-value pair conversion * adding default plain text serializer * ignoring coverage for untestable lines * npm audit fix * removing comments * newing * correcting typo * renaming and requiring media type in serialization * Update README.md * formatting * fixing lint issues * formatting!
1 parent 6eb6edc commit 56ad0ce

27 files changed

+9896
-9411
lines changed

.eslintrc.yaml

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
root: true
2-
env:
3-
browser: true
4-
es2021: true
5-
jest: true
6-
node: true
7-
extends:
8-
- eslint:recommended
9-
- plugin:@typescript-eslint/eslint-recommended
10-
- plugin:@typescript-eslint/recommended
11-
- prettier
12-
parser: '@typescript-eslint/parser'
13-
plugins:
14-
- '@typescript-eslint'
15-
ignorePatterns:
16-
- dist
17-
- node_modules
18-
- src/coverage
19-
rules:
20-
'@typescript-eslint/explicit-module-boundary-types': off
21-
'@typescript-eslint/no-empty-function':
22-
- error
23-
- allow: [constructors]
1+
root: true
2+
env:
3+
browser: true
4+
es2021: true
5+
jest: true
6+
node: true
7+
extends:
8+
- eslint:recommended
9+
- plugin:@typescript-eslint/eslint-recommended
10+
- plugin:@typescript-eslint/recommended
11+
- prettier
12+
parser: '@typescript-eslint/parser'
13+
plugins:
14+
- '@typescript-eslint'
15+
ignorePatterns:
16+
- dist
17+
- node_modules
18+
- src/coverage
19+
rules:
20+
'@typescript-eslint/explicit-module-boundary-types': off
21+
'@typescript-eslint/no-empty-function':
22+
- error
23+
- allow: [constructors]

.github/workflows/build.yaml

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# This workflow will do a clean install of Node dependencies and build the
2-
# package across different versions of Node.
3-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
4-
5-
name: Build Package
6-
7-
on: [push, pull_request]
8-
9-
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
node-version: [10.x, 12.x, 14.x]
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
- run: npm ci
22-
- run: npm run build
23-
- run: npx codecov
1+
# This workflow will do a clean install of Node dependencies and build the
2+
# package across different versions of Node.
3+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
4+
5+
name: Build Package
6+
7+
on: [push, pull_request]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [10.x, 12.x, 14.x]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm ci
22+
- run: npm run build
23+
- run: npx codecov

.github/workflows/npm-publish.yaml

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# This workflow will publish a package to NPM when a release is created
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3-
4-
name: Publish to NPM
5-
6-
on:
7-
release:
8-
types: [created]
9-
10-
jobs:
11-
publish-npm:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
16-
with:
17-
node-version: 12
18-
registry-url: https://registry.npmjs.org/
19-
- run: npm ci
20-
- run: npm publish --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
1+
# This workflow will publish a package to NPM when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish to NPM
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
publish-npm:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm ci
20+
- run: npm publish --access public
21+
env:
22+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CHANGELOG.md

+80-64
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,80 @@
1-
# Changelog
2-
3-
All notable changes to this project will be documented in this file.
4-
5-
The format is based on [Keep a Changelog][kac], and this project adheres to
6-
[Semantic Versioning][semver].
7-
8-
[kac]: https://keepachangelog.com/en/1.0.0
9-
[semver]: https://semver.org/spec/v2.0.0.html
10-
11-
## Unreleased
12-
13-
## 0.3.1 - 2021-06-12
14-
15-
### Changed
16-
17-
- Using `@web-std/file` in place of `web-file-polyfill` (fixes [#6])
18-
19-
[#6]: https://github.com/siren-js/client/issues/6
20-
21-
## 0.3.0 - 2021-06-02
22-
23-
### Added
24-
25-
- The following field types are now supported in action submission:
26-
- [`file`](https://github.com/siren-js/spec-extensions#file-fields)
27-
- [`select`](https://github.com/siren-js/spec-extensions#select-fields)
28-
- [`textarea`](https://github.com/siren-js/spec-extensions#textarea-fields)
29-
30-
### Changed
31-
32-
- When creating entries for action submission, fields' `name` and `value`
33-
properties are [converted] according to the HTML standard.
34-
35-
[converted]: https://infra.spec.whatwg.org/#javascript-string-convert
36-
37-
## 0.2.1 - 2021-05-19
38-
39-
### Fixed
40-
41-
- When submitting an action, non-`checkbox` and non-`radio` fields with no
42-
`value` property are submitted with an empty string value, rather than
43-
`"undefined"` ([#3]).
44-
45-
[#3]: https://github.com/siren-js/client/issues/3
46-
47-
## 0.2.0 - 2021-05-18
48-
49-
### Added
50-
51-
- The client class now has a `headers` property for customizing HTTP headers
52-
sent in each request. The property can be initialized via the constructor's
53-
options object (see the [README](README.md#http-headers)).
54-
55-
## 0.1.0 - 2021-05-03
56-
57-
### Added
58-
59-
- Client class for communicating with a Siren server
60-
- `fetch()` method for hitting API entry point
61-
- `follow()` method for following links (including embedded links)
62-
- `submit()` method for submitting actions; currently, only actions whose
63-
`type` is `"application/x-www-form-urlencoded"` are supported.
64-
- Client `Response` wrapper for parsing Siren responses
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog][kac], and this project adheres to
6+
[Semantic Versioning][semver].
7+
8+
[kac]: https://keepachangelog.com/en/1.0.0
9+
[semver]: https://semver.org/spec/v2.0.0.html
10+
11+
## Unreleased
12+
13+
## 0.4.0
14+
15+
### Added
16+
17+
- Support for custom serializers
18+
- Default serializer for `text/plain` actions
19+
20+
### Changed
21+
22+
- Upgraded `@siren-js/core` to v0.3.2
23+
- Aligned newline normalization with HTML's algorithm for
24+
[converting an entry list to a list of name-value pairs][el2nvp], which
25+
normalizes newlines in fields' `name`s and values during action submission.
26+
27+
[el2nvp]: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
28+
29+
## 0.3.1 - 2021-06-12
30+
31+
### Changed
32+
33+
- Using `@web-std/file` in place of `web-file-polyfill` (fixes [#6])
34+
35+
[#6]: https://github.com/siren-js/client/issues/6
36+
37+
## 0.3.0 - 2021-06-02
38+
39+
### Added
40+
41+
- The following field types are now supported in action submission:
42+
- [`file`](https://github.com/siren-js/spec-extensions#file-fields)
43+
- [`select`](https://github.com/siren-js/spec-extensions#select-fields)
44+
- [`textarea`](https://github.com/siren-js/spec-extensions#textarea-fields)
45+
46+
### Changed
47+
48+
- When creating entries for action submission, fields' `name` and `value`
49+
properties are [converted] according to the HTML standard.
50+
51+
[converted]: https://infra.spec.whatwg.org/#javascript-string-convert
52+
53+
## 0.2.1 - 2021-05-19
54+
55+
### Fixed
56+
57+
- When submitting an action, non-`checkbox` and non-`radio` fields with no
58+
`value` property are submitted with an empty string value, rather than
59+
`"undefined"` ([#3]).
60+
61+
[#3]: https://github.com/siren-js/client/issues/3
62+
63+
## 0.2.0 - 2021-05-18
64+
65+
### Added
66+
67+
- The client class now has a `headers` property for customizing HTTP headers
68+
sent in each request. The property can be initialized via the constructor's
69+
options object (see the [README](README.md#http-headers)).
70+
71+
## 0.1.0 - 2021-05-03
72+
73+
### Added
74+
75+
- Client class for communicating with a Siren server
76+
- `fetch()` method for hitting API entry point
77+
- `follow()` method for following links (including embedded links)
78+
- `submit()` method for submitting actions; currently, only actions whose
79+
`type` is `"application/x-www-form-urlencoded"` are supported.
80+
- Client `Response` wrapper for parsing Siren responses

0 commit comments

Comments
 (0)