File tree Expand file tree Collapse file tree 8 files changed +980
-712
lines changed Expand file tree Collapse file tree 8 files changed +980
-712
lines changed Original file line number Diff line number Diff line change 45
45
"steno" : " ^2.1.0"
46
46
},
47
47
"devDependencies" : {
48
- "@commitlint/cli" : " ^16.2.1 " ,
49
- "@commitlint/config-conventional" : " ^16.2.1 " ,
50
- "@commitlint/prompt-cli" : " ^16.2.1 " ,
51
- "@sindresorhus/tsconfig" : " ^2 .0.0 " ,
52
- "@types/lodash" : " ^4.14.179 " ,
53
- "@types/node" : " ^17.0.21 " ,
48
+ "@commitlint/cli" : " ^17.1.2 " ,
49
+ "@commitlint/config-conventional" : " ^17.1.0 " ,
50
+ "@commitlint/prompt-cli" : " ^17.1.2 " ,
51
+ "@sindresorhus/tsconfig" : " ^3 .0.1 " ,
52
+ "@types/lodash" : " ^4.14.186 " ,
53
+ "@types/node" : " ^18.11.0 " ,
54
54
"@typicode/eslint-config" : " ^1.0.0" ,
55
- "del-cli" : " ^4 .0.1 " ,
56
- "eslint" : " ^8.10 .0" ,
57
- "husky" : " ^7 .0.4 " ,
55
+ "del-cli" : " ^5 .0.0 " ,
56
+ "eslint" : " ^8.25 .0" ,
57
+ "husky" : " ^8 .0.1 " ,
58
58
"lodash" : " ^4.17.21" ,
59
- "tempy" : " ^2 .0.0" ,
60
- "typescript" : " ^4.6.2 " ,
59
+ "tempy" : " ^3 .0.0" ,
60
+ "typescript" : " ^4.8.4 " ,
61
61
"xv" : " ^1.1.1"
62
62
},
63
63
"engines" : {
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import {
5
5
} from 'assert'
6
6
import fs from 'fs'
7
7
import lodash from 'lodash'
8
- import tempy from 'tempy'
8
+ import { temporaryFile } from 'tempy'
9
9
10
10
import { JSONFile } from './adapters/JSONFile.js'
11
11
import { Low } from './Low.js'
12
12
import { MissingAdapterError } from './MissingAdapterError.js'
13
13
14
14
function createJSONFile ( obj : unknown ) : string {
15
- const file = tempy . file ( )
15
+ const file = temporaryFile ( )
16
16
fs . writeFileSync ( file , JSON . stringify ( obj ) )
17
17
return file
18
18
}
Original file line number Diff line number Diff line change 1
1
import { deepStrictEqual as deepEqual , throws } from 'assert'
2
2
import fs from 'fs'
3
- import tempy from 'tempy'
3
+ import { temporaryFile } from 'tempy'
4
4
5
5
import { JSONFileSync } from './adapters/JSONFileSync.js'
6
6
import { LowSync } from './LowSync.js'
7
7
import { MissingAdapterError } from './MissingAdapterError.js'
8
8
9
9
function createJSONFile ( obj : unknown ) : string {
10
- const file = tempy . file ( )
10
+ const file = temporaryFile ( )
11
11
fs . writeFileSync ( file , JSON . stringify ( obj ) )
12
12
return file
13
13
}
Original file line number Diff line number Diff line change 1
1
import { deepStrictEqual as deepEqual , strictEqual as equal } from 'assert'
2
- import tempy from 'tempy'
2
+ import { temporaryFile } from 'tempy'
3
3
4
4
import { JSONFile } from './JSONFile.js'
5
5
6
6
export async function testJSONFile ( ) : Promise < void > {
7
7
const obj = { a : 1 }
8
-
9
- const filename = tempy . file ( )
10
- const file = new JSONFile ( filename )
8
+ const file = new JSONFile ( temporaryFile ( ) )
11
9
12
10
// Null if file doesn't exist
13
11
equal ( await file . read ( ) , null )
Original file line number Diff line number Diff line change 1
1
import { deepStrictEqual as deepEqual , strictEqual as equal } from 'assert'
2
- import tempy from 'tempy'
2
+ import { temporaryFile } from 'tempy'
3
3
4
4
import { JSONFileSync } from './JSONFileSync.js'
5
5
6
6
export function testJSONFileSync ( ) : void {
7
7
const obj = { a : 1 }
8
-
9
- const filename = tempy . file ( )
10
- const file = new JSONFileSync ( filename )
8
+ const file = new JSONFileSync ( temporaryFile ( ) )
11
9
12
10
// Null if file doesn't exist
13
11
equal ( file . read ( ) , null )
Original file line number Diff line number Diff line change 1
1
import { deepStrictEqual as deepEqual , strictEqual as equal } from 'assert'
2
- import tempy from 'tempy'
2
+ import { temporaryFile } from 'tempy'
3
3
4
4
import { TextFile } from './TextFile.js'
5
5
6
6
export async function testTextFile ( ) : Promise < void > {
7
7
const str = 'foo'
8
-
9
- const filename = tempy . file ( )
10
- const file = new TextFile ( filename )
8
+ const file = new TextFile ( temporaryFile ( ) )
11
9
12
10
// Null if file doesn't exist
13
11
equal ( await file . read ( ) , null )
@@ -20,8 +18,7 @@ export async function testTextFile(): Promise<void> {
20
18
}
21
19
22
20
export async function testRaceCondition ( ) : Promise < void > {
23
- const filename = tempy . file ( )
24
- const file = new TextFile ( filename )
21
+ const file = new TextFile ( temporaryFile ( ) )
25
22
const promises : Promise < void > [ ] = [ ]
26
23
27
24
let i = 0
Original file line number Diff line number Diff line change 1
1
import { deepStrictEqual as deepEqual , strictEqual as equal } from 'assert'
2
- import tempy from 'tempy'
2
+ import { temporaryFile } from 'tempy'
3
3
4
4
import { TextFileSync } from './TextFileSync.js'
5
5
6
6
export function testTextFileSync ( ) : void {
7
7
const str = 'foo'
8
-
9
- const filename = tempy . file ( )
10
- const file = new TextFileSync ( filename )
8
+ const file = new TextFileSync ( temporaryFile ( ) )
11
9
12
10
// Null if file doesn't exist
13
11
equal ( file . read ( ) , null )
You can’t perform that action at this time.
0 commit comments