File tree 3 files changed +35
-0
lines changed
3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ npx sort-package-json
113
113
- [ jest] ( https://jestjs.io/ )
114
114
- [ Istanbul] ( https://istanbul.js.org/ )
115
115
- [ Mocha] ( https://mochajs.org/ )
116
+ - [ node-pre-gyp] ( https://github.com/mapbox/node-pre-gyp/ )
116
117
- [ xo] ( https://github.com/xojs/xo )
117
118
- [ prettier] ( https://prettier.io/ )
118
119
Original file line number Diff line number Diff line change @@ -93,6 +93,17 @@ const fields = [
93
93
{ key : 'man' , over : sortObject } ,
94
94
{ key : 'directories' , over : sortDirectories } ,
95
95
{ key : 'workspaces' } ,
96
+ // node-pre-gyp https://www.npmjs.com/package/node-pre-gyp#1-add-new-entries-to-your-packagejson
97
+ {
98
+ key : 'binary' ,
99
+ over : sortObjectBy ( [
100
+ 'module_name' ,
101
+ 'module_path' ,
102
+ 'remote_path' ,
103
+ 'package_name' ,
104
+ 'host' ,
105
+ ] ) ,
106
+ } ,
96
107
{ key : 'scripts' , over : sortScripts } ,
97
108
{ key : 'betterScripts' , over : sortScripts } ,
98
109
{ key : 'husky' } ,
Original file line number Diff line number Diff line change @@ -230,6 +230,29 @@ for (const field of [
230
230
] )
231
231
}
232
232
233
+ testField ( 'binary' , [
234
+ {
235
+ value : {
236
+ [ UNKNOWN ] : UNKNOWN ,
237
+ module_name : 'node_addon_example' ,
238
+ module_path :
239
+ './lib/binding/{configuration}/{node_abi}-{platform}-{arch}/' ,
240
+ remote_path : './{module_name}/v{version}/{configuration}/' ,
241
+ package_name :
242
+ '{module_name}-v{version}-{node_abi}-{platform}-{arch}.tar.gz' ,
243
+ host : 'https://node-pre-gyp-tests.s3-us-west-1.amazonaws.com' ,
244
+ } ,
245
+ expect : [
246
+ 'module_name' ,
247
+ 'module_path' ,
248
+ 'remote_path' ,
249
+ 'package_name' ,
250
+ 'host' ,
251
+ UNKNOWN ,
252
+ ] ,
253
+ } ,
254
+ ] )
255
+
233
256
testField ( 'keywords' , [
234
257
{
235
258
value : [ 'foo' , 'foo' ] ,
You can’t perform that action at this time.
0 commit comments