Skip to content

Commit 7dbe2f3

Browse files
authored
Merge pull request #20 from TheSpyder/records-as-objects
Use ReScript 10 record types in most places
2 parents dd9a0e5 + 09e1858 commit 7dbe2f3

32 files changed

+588
-617
lines changed

.changes/header.tpl.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).

.changes/unreleased/.gitkeep

Whitespace-only changes.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: Changed
2+
body: 'BREAKING: Record types are now used where possible. Requires ReScript 10.'
3+
time: 2023-12-10T06:31:31.479826+11:00
4+
custom:
5+
Github Issue: "12"

.changie.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changesDir: .changes
2+
unreleasedDir: unreleased
3+
headerPath: header.tpl.md
4+
changelogPath: CHANGELOG.md
5+
versionExt: md
6+
versionFormat: '## {{.Version}} - {{.Time.Format "2006-01-02"}}'
7+
kindFormat: "### {{.Kind}}"
8+
changeFormat: "* [#{{.Custom.Issue}}](https://github.com/miniscruff/changie/issues/{{.Custom.Issue}}) {{.Body}}"
9+
kinds:
10+
- label: Added
11+
auto: minor
12+
- label: Changed
13+
auto: major
14+
- label: Deprecated
15+
auto: minor
16+
- label: Removed
17+
auto: major
18+
- label: Fixed
19+
auto: patch
20+
newlines:
21+
afterChangelogHeader: 1
22+
beforeChangelogVersion: 1
23+
endOfVersion: 1
24+
envPrefix: CHANGIE_
25+
custom:
26+
- key: Github Issue
27+
type: int
28+
minInt: 1
29+
replacements:
30+
- path: package.json
31+
find: ' "version": ".*",'
32+
replace: ' "version": "{{.VersionNoPrefix}}",'

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: 18
19+
node-version: 20
2020
cache: yarn
2121
- run: yarn install
2222
- run: yarn test

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
6+
and is generated by [Changie](https://github.com/miniscruff/changie).
7+
8+
9+
No releases yet, this file will be updated when generating your first release.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ Node.js bindings for ReScript
99
```shell
1010
npm install rescript-nodejs
1111
```
12+
1213
or
14+
1315
```shell
1416
yarn add rescript-nodejs
1517
```
18+
1619
Then add rescript-nodejs to `bsconfig.json`:
20+
1721
```
1822
"bs-dependencies": [
1923
"rescript-nodejs"
@@ -59,6 +63,7 @@ We welcome and encourage anyone to contribute! In order to minimize confusion an
5963
- If you want to request a feature/improvement, it's best to create an issue first and start a discussion. Don't spend a lot of valuable time and energy creating a pull request when it might not fit in with the project goals. Your PR may still be merged if it isn't based on an issue but expect to have a discussion first.
6064
- If you notice gaps in the documentation and want to help fill them in, feel free to go straight to PR. Or create an issue and provide a draft of the docs you want to add.
6165
- If you have concerns about implementation style or design decisions (e.g. type soundness, complexity, ergonomics, edge cases, etc.), please submit an issue voicing your concerns. Critique from the community is welcome. This library is only useful so long as it works for everyone!
66+
- A changelog has finally been added, managed by [changie](https://changie.dev). Please use this tool (available via `yarn changie new`) to add changelog entries.
6267

6368
## License and Credits
6469

examples/ReadFileByLine.res

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
open NodeJs
22

33
// example from the NodeJS docs
4-
let rl = Readline.make(
5-
Readline.interfaceOptions(~input=Fs.createReadStream("sample.txt"), ~crlfDelay=infinity, ()),
6-
)
4+
let rl = Readline.make({input: Fs.createReadStream("sample.txt"), crlfDelay: infinity})
75

86
rl
97
->Readline.Interface.on(Event.fromString("line"), line => {

lib/js/test/atomic/Console.test.bs.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/atomic/Stream.test.bs.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)