File tree Expand file tree Collapse file tree 3 files changed +11
-17
lines changed
Expand file tree Collapse file tree 3 files changed +11
-17
lines changed Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
3- const { join} = require ( 'node:path' ) ;
4- const { spawnSync : _spawnSync } = require ( 'node:child_process' ) ;
5-
6- const _porcelain = require ( '@putout/git-status-porcelain' ) ;
7-
8- const fullstore = require ( 'fullstore' ) ;
1+ import { join } from 'node:path' ;
2+ import { spawnSync as _spawnSync } from 'node:child_process' ;
3+ import _porcelain from '@putout/git-status-porcelain' ;
4+ import fullstore from 'fullstore' ;
95
106const namesStore = fullstore ( [ ] ) ;
117
@@ -23,7 +19,7 @@ const findGit = async ({findUp}) => {
2319
2420const joinDir = ( a ) => ( b ) => join ( a , b ) ;
2521
26- module . exports . get = async function get ( overrides = { } ) {
22+ export const get = async function get ( overrides = { } ) {
2723 const {
2824 findUp,
2925 isSupported,
@@ -45,7 +41,7 @@ module.exports.get = async function get(overrides = {}) {
4541 return names . map ( joinDir ( dir ) ) ;
4642} ;
4743
48- module . exports . set = async function set ( overrides = { } ) {
44+ export const set = async function set ( overrides = { } ) {
4945 const {
5046 findUp,
5147 porcelain = _porcelain ,
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
3- const tryToCatch = require ( 'try-to-catch' ) ;
4- const { test, stub} = require ( 'supertape' ) ;
5- const { get, set} = require ( './staged' ) ;
1+ import tryToCatch from 'try-to-catch' ;
2+ import { test , stub } from 'supertape' ;
3+ import { get , set } from './staged.js' ;
64
75test ( 'putout: cli: staged' , async ( t ) => {
86 const findUp = stub ( ) . returns ( '.' ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " @putout/cli-staged" ,
33 "version" : " 1.1.0" ,
4- "type" : " commonjs " ,
4+ "type" : " module " ,
55 "author" :
" coderaiser <[email protected] > (https://github.com/coderaiser)" ,
66 "description" : " handle staged" ,
77 "homepage" : " https://github.com/coderaiser/putout/tree/master/packages/cli-staged#readme" ,
4747 },
4848 "license" : " MIT" ,
4949 "engines" : {
50- "node" : " >=16 "
50+ "node" : " >=20 "
5151 },
5252 "publishConfig" : {
5353 "access" : " public"
You can’t perform that action at this time.
0 commit comments