Skip to content

Commit 3351afe

Browse files
committed
nodejs: Enforce NodeJS version restrictions
1 parent 370deed commit 3351afe

File tree

6 files changed

+45
-27
lines changed

6 files changed

+45
-27
lines changed

nodejs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict = true

nodejs/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ test:: update $(LIBYS-SO-FQNP) $(NODE)
1616
@printf '%.0s-' {1..80}; echo
1717
$(strace) node test/test.js
1818

19-
update: $(NODE)
19+
update: $(NODE) package.json
2020
npm install
2121

2222
release: $(NODE)
@@ -27,3 +27,6 @@ clean::
2727

2828
distclean::
2929
$(RM) -r node_modules .cache
30+
31+
%.json: %.yaml $(YS)
32+
$(YS) -J $< > $@

nodejs/ReadMe.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ $ ys --compile file.ys
8484

8585
## NodeJS Usage
8686

87+
> Note: Requires NodeJS version v18.0.0 or higher
88+
8789
A YAMLScript file `some.ys`:
8890

8991
```yaml

nodejs/doc/readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## NodeJS Usage
22

3+
> Note: Requires NodeJS version v18.0.0 or higher
4+
35
A YAMLScript file `some.ys`:
46

57
```yaml

nodejs/package.json

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,15 @@
1-
{
2-
"name": "@yaml/yamlscript",
3-
"version": "0.2.3",
4-
"description": "Program in YAML — Code is Data",
5-
"main": "lib/yamlscript/index.js",
6-
"author": "Ingy döt Net",
7-
"license": "MIT",
8-
"dependencies": {
9-
"@makeomatic/ffi-napi": "^4.2.0",
10-
"ref-napi": "^3.0.3"
11-
},
12-
"directories": {
13-
"test": "test"
14-
},
15-
"scripts": {
16-
"test": "make test"
17-
},
18-
"repository": {
19-
"type": "git",
20-
"url": "git+https://github.com/yaml/yamlscript.git"
21-
},
22-
"bugs": {
23-
"url": "https://github.com/yaml/yamlscript/issues"
24-
},
25-
"homepage": "https://github.com/yaml/yamlscript#readme"
26-
}
1+
{"name":"@yaml/yamlscript",
2+
"version":"0.2.3",
3+
"description":"Program in YAML — Code is Data",
4+
"main":"lib/yamlscript/index.js",
5+
"author":"Ingy döt Net",
6+
"license":"MIT",
7+
"dependencies":
8+
{"@makeomatic/ffi-napi":"^4.2.0", "ref-napi":"^3.0.3"},
9+
"engines":{"node":">=18.0.0 <20.2.0 || >20.2.0"},
10+
"directories":{"test":"test"},
11+
"scripts":{"test":"make test"},
12+
"repository":
13+
{"type":"git", "url":"git+https://github.com/yaml/yamlscript.git"},
14+
"bugs":{"url":"https://github.com/yaml/yamlscript/issues"},
15+
"homepage":"https://github.com/yaml/yamlscript#readme"}

nodejs/package.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: '@yaml/yamlscript'
2+
version: 0.2.3
3+
description: Program in YAML — Code is Data
4+
main: lib/yamlscript/index.js
5+
author: Ingy döt Net
6+
license: MIT
7+
dependencies:
8+
'@makeomatic/ffi-napi': ^4.2.0
9+
ref-napi: ^3.0.3
10+
engines:
11+
node: '>=18.0.0 <20.2.0 || >20.2.0'
12+
directories:
13+
test: test
14+
scripts:
15+
test: make test
16+
repository:
17+
type: git
18+
url: git+https://github.com/yaml/yamlscript.git
19+
bugs:
20+
url: https://github.com/yaml/yamlscript/issues
21+
homepage: https://github.com/yaml/yamlscript#readme

0 commit comments

Comments
 (0)