File tree 10 files changed +20
-36
lines changed
10 files changed +20
-36
lines changed Original file line number Diff line number Diff line change 19
19
20
20
strategy :
21
21
matrix :
22
- node-version : [0.10.48]
22
+ node-version : [0.10.48, 4 ]
23
23
24
24
steps :
25
25
- name : Checkout project
30
30
with :
31
31
node-version : ${{ matrix.node-version }}
32
32
33
- - name : Cache Node dependencies
34
- uses : actions/cache@v3
35
- with :
36
- path : ~/.npm
37
- key : ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
38
- restore-keys : |
39
- ${{ runner.os }}-node-
40
-
41
33
- name : Install dependencies
42
- run : npm install
34
+ run : npm install --production
43
35
44
36
- name : Test that the command line program exits cleanly.
45
- run : ./bin/cmd.js
37
+ run : ./bin/cmd.cjs
46
38
shell : bash
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+
3
+ require ( 'version-guard' ) ( '../lib/cli.js' , 12 , 22 )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/*! standard. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2
2
import { StandardEngine } from 'standard-engine'
3
- import options from './options.js'
3
+ import options from './lib/ options.js'
4
4
5
5
export default new StandardEngine ( options )
Original file line number Diff line number Diff line change
1
+ import { cli } from 'standard-engine'
2
+ import options from './options.js'
3
+
4
+ cli ( options )
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { fileURLToPath } from 'node:url'
3
3
import eslint from 'eslint'
4
4
5
5
// eslintConfig.overrideConfigFile have problem reading URLs and file:///
6
- const overrideConfigFile = fileURLToPath ( new URL ( './eslintrc.json' , import . meta. url ) )
7
- const pkgURL = new URL ( './package.json' , import . meta. url )
6
+ const overrideConfigFile = fileURLToPath ( new URL ( '.. /eslintrc.json' , import . meta. url ) )
7
+ const pkgURL = new URL ( '.. /package.json' , import . meta. url )
8
8
const pkgJSON = readFileSync ( pkgURL , { encoding : 'utf-8' } )
9
9
const pkg = JSON . parse ( pkgJSON )
10
10
Original file line number Diff line number Diff line change 8
8
"url" : " https://feross.org"
9
9
},
10
10
"bin" : {
11
- "standard" : " bin/cmd.js "
11
+ "standard" : " bin/cmd.cjs "
12
12
},
13
13
"type" : " module" ,
14
14
"bugs" : {
22
22
"eslint-plugin-n" : " ^15.1.0" ,
23
23
"eslint-plugin-promise" : " ^6.0.0" ,
24
24
"eslint-plugin-react" : " ^7.28.0" ,
25
- "standard-engine" : " ^15.0.0"
25
+ "standard-engine" : " ^15.0.0" ,
26
+ "version-guard" : " ^1.1.0"
26
27
},
27
28
"devDependencies" : {
28
29
"cross-spawn" : " ^7.0.3" ,
70
71
},
71
72
"scripts" : {
72
73
"test" : " npm run test-internal && npm run test-external" ,
73
- "test-internal" : " ./bin/cmd.js --verbose && tape test/*.js" ,
74
+ "test-internal" : " ./bin/cmd.cjs --verbose && tape test/*.js" ,
74
75
"test-external" : " tape test/external/*.js" ,
75
76
"update-authors" : " ./tools/update-authors.sh && hallmark --fix AUTHORS.md"
76
77
},
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import standard from '../index.js'
3
3
4
4
test ( 'api: lintFiles' , async ( t ) => {
5
5
t . plan ( 2 )
6
- const [ result ] = await standard . lintFiles ( [ 'bin/cmd.js ' ] )
6
+ const [ result ] = await standard . lintFiles ( [ 'bin/cmd.cjs ' ] )
7
7
t . equal ( typeof result , 'object' , 'result is an object' )
8
8
t . equal ( result . errorCount , 0 )
9
9
} )
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url'
2
2
import test from 'tape'
3
3
import crossSpawn from 'cross-spawn'
4
4
5
- const CMD_PATH = fileURLToPath ( new URL ( '../bin/cmd.js ' , import . meta. url ) )
5
+ const CMD_PATH = fileURLToPath ( new URL ( '../bin/cmd.cjs ' , import . meta. url ) )
6
6
7
7
test ( 'command line usage: --help' , t => {
8
8
t . plan ( 1 )
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const testPkgs = JSON.parse(json)
20
20
21
21
const GIT = 'git'
22
22
const NPM = 'npm'
23
- const STANDARD = fileURLToPath ( new URL ( '../../bin/cmd.js ' , import . meta. url ) )
23
+ const STANDARD = fileURLToPath ( new URL ( '../../bin/cmd.cjs ' , import . meta. url ) )
24
24
const TMP = new URL ( '../../tmp/' , import . meta. url )
25
25
const PARALLEL_LIMIT = Math . ceil ( cpus ( ) . length / 2 )
26
26
You can’t perform that action at this time.
0 commit comments