File tree Expand file tree Collapse file tree 5 files changed +19
-19
lines changed Expand file tree Collapse file tree 5 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 11{
2-   "name" : " @hover/hvr-scripts "  ,
2+   "name" : " @hover/javascript "  ,
33  "version" : " 0.0.0-semantically-released"  ,
44  "description" : " CLI toolbox for common scripts for JavaScript + TypeScript projects"  ,
55  "engines" : {
66    "node" : " >= 8"  ,
77    "npm" : " >= 5" 
88  },
99  "bin" : {
10-     "hvr -scripts" : " dist/index.js" 
10+     "hover -scripts" : " dist/index.js" 
1111  },
1212  "scripts" : {
1313    "test" : " node src test"  ,
108108  ],
109109  "repository" : {
110110    "type" : " git"  ,
111-     "url" : " https://github.com/hoverinc/hvr-scripts .git" 
111+     "url" : " https://github.com/hoverinc/hover-javascript .git" 
112112  },
113113  "bugs" : {
114-     "url" : " https://github.com/hoverinc/hvr-scripts /issues" 
114+     "url" : " https://github.com/hoverinc/hover-javascript /issues" 
115115  },
116-   "homepage" : " https://github.com/hoverinc/hvr-scripts #readme"  ,
116+   "homepage" : " https://github.com/hoverinc/hover-javascript #readme"  ,
117117  "devDependencies" : {
118118    "jest-in-case" : " ^1.0.2"  ,
119119    "slash" : " ^3.0.0" 
Original file line number Diff line number Diff line change @@ -23,17 +23,17 @@ test('appDirectory is the dirname to the package.json', () => {
2323  expect ( require ( '../utils' ) . appDirectory ) . toBe ( pkgPath ) 
2424} ) 
2525
26- test ( 'resolveHvrScripts  resolves to src/index.js when in the hvr-scripts  package' ,  ( )  =>  { 
27-   mockPkg ( { package : { name : '@hover/hvr-scripts ' } } ) 
28-   expect ( require ( '../utils' ) . resolveHvrScripts ( ) ) . toBe ( 
26+ test ( 'resolveHoverScripts  resolves to src/index.js when in the @hover/javascript  package' ,  ( )  =>  { 
27+   mockPkg ( { package : { name : '@hover/javascript ' } } ) 
28+   expect ( require ( '../utils' ) . resolveHoverScripts ( ) ) . toBe ( 
2929    require . resolve ( '../' ) . replace ( process . cwd ( ) ,  '.' ) , 
3030  ) 
3131} ) 
3232
33- test ( 'resolveHvrScripts  resolves to hvr -scripts if not in the kcd-scripts  package' ,  ( )  =>  { 
34-   mockPkg ( { package : { name : 'not-hvr-scripts ' } } ) 
33+ test ( 'resolveHoverScripts  resolves to "hover -scripts"  if not in the @hover/javascript  package' ,  ( )  =>  { 
34+   mockPkg ( { package : { name : 'not-@nover/javascript ' } } ) 
3535  whichSyncMock . mockImplementationOnce ( ( )  =>  require . resolve ( '../' ) ) 
36-   expect ( require ( '../utils' ) . resolveHvrScripts ( ) ) . toBe ( 'hvr -scripts' ) 
36+   expect ( require ( '../utils' ) . resolveHoverScripts ( ) ) . toBe ( 'hover -scripts' ) 
3737} ) 
3838
3939test ( `resolveBin resolves to the full path when it's not in $PATH` ,  ( )  =>  { 
Original file line number Diff line number Diff line change 1- const  { resolveHvrScripts ,  resolveBin,  isOptedOut}  =  require ( '../utils' ) 
1+ const  { resolveHoverScripts ,  resolveBin,  isOptedOut}  =  require ( '../utils' ) 
22
3- const  kcdScripts  =  resolveHvrScripts ( ) 
3+ const  kcdScripts  =  resolveHoverScripts ( ) 
44const  doctoc  =  resolveBin ( 'doctoc' ) 
55
66module . exports  =  { 
Original file line number Diff line number Diff line change 22let  shouldThrow 
33try  { 
44  shouldThrow  = 
5-     require ( `${ process . cwd ( ) }  /package.json` ) . name  ===  '@hover/hvr-scripts '  && 
5+     require ( `${ process . cwd ( ) }  /package.json` ) . name  ===  '@hover/javascript '  && 
66    Number ( process . version . slice ( 1 ) . split ( '.' ) [ 0 ] )  <  8 
77}  catch  ( error )  { 
88  // ignore 
99} 
1010
1111if  ( shouldThrow )  { 
1212  throw  new  Error ( 
13-     'You must use Node version 8 or greater to run the scripts within hvr-scripts  '  + 
13+     'You must use Node version 8 or greater to run the scripts within @hover/javascript  '  + 
1414      'because we dogfood the untranspiled version of the scripts.' , 
1515  ) 
1616} 
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ const {package: pkg, path: pkgPath} = readPkgUp.sync({
1212} ) 
1313const  appDirectory  =  path . dirname ( pkgPath ) 
1414
15- function  resolveHvrScripts ( )  { 
16-   if  ( pkg . name  ===  '@hover/hvr-scripts ' )  { 
15+ function  resolveHoverScripts ( )  { 
16+   if  ( pkg . name  ===  '@hover/javascript ' )  { 
1717    return  require . resolve ( './' ) . replace ( process . cwd ( ) ,  '.' ) 
1818  } 
19-   return  resolveBin ( 'hvr -scripts' ) 
19+   return  resolveBin ( 'hover -scripts' ) 
2020} 
2121
2222// eslint-disable-next-line complexity 
@@ -187,7 +187,7 @@ module.exports = {
187187  parseEnv, 
188188  pkg, 
189189  resolveBin, 
190-   resolveHvrScripts , 
190+   resolveHoverScripts , 
191191  uniq, 
192192  writeExtraEntry, 
193193} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments