File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,53 @@ installed as a dependency.
34
34
35
35
[ settings ] : ./settings.md#engineStrict
36
36
37
+ ## devEngines.runtime
38
+
39
+ Added in: v10.14
40
+
41
+ Allows to specify one or more JavaScript runtime engines used by the project. Supported runtimes are Node.js, Deno, and Bun.
42
+
43
+ For instance, here is how to add ` node@^24.4.0 ` to your dependencies:
44
+
45
+ ``` json
46
+ {
47
+ "devEngines" : {
48
+ "runtime" : {
49
+ "name" : " node" ,
50
+ "version" : " ^24.4.0" ,
51
+ "onFail" : " download"
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ You can also add multiple runtimes to the same ` package.json ` :
58
+
59
+ ``` json
60
+ {
61
+ "devEngines" : {
62
+ "runtime" : [
63
+ {
64
+ "name" : " node" ,
65
+ "version" : " ^24.4.0" ,
66
+ "onFail" : " download"
67
+ },
68
+ {
69
+ "name" : " deno" ,
70
+ "version" : " ^2.4.3" ,
71
+ "onFail" : " download"
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ ```
77
+
78
+ How it works:
79
+
80
+ 1 . ` pnpm install ` resolves your specified range to the latest matching runtime version.
81
+ 1 . The exact version (and checksum) is saved in the lockfile.
82
+ 1 . Scripts use the local runtime, ensuring consistency across environments.
83
+
37
84
## dependenciesMeta
38
85
39
86
Additional meta information used for dependencies declared inside ` dependencies ` , ` optionalDependencies ` , and ` devDependencies ` .
You can’t perform that action at this time.
0 commit comments