File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed
Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1010 fail-fast : false
1111 matrix :
1212 node-version :
13+ - 20
1314 - 18
14- - 16
15- - 14
1615 steps :
1716 - uses : actions/checkout@v4
1817 - uses : actions/setup-node@v4
Original file line number Diff line number Diff line change 11import { Buffer } from 'node:buffer' ;
22import * as Token from 'token-types' ;
3- import * as strtok3 from 'strtok3/core' ; // eslint-disable-line n/file-extension-in-import
3+ import * as strtok3 from 'strtok3/core' ;
44import {
55 stringToBytes ,
66 tarHeaderChecksumMatches ,
@@ -794,7 +794,7 @@ export class FileTypeParser {
794794 const element = await readElement ( ) ;
795795 if ( element . id === 0x42_82 ) {
796796 const rawValue = await tokenizer . readToken ( new Token . StringType ( element . len , 'utf-8' ) ) ;
797- return rawValue . replace ( / \0 0 .* $ / g, '' ) ; // Return DocType
797+ return rawValue . replaceAll ( / \0 0 .* $ / g, '' ) ; // Return DocType
798798 }
799799
800800 await tokenizer . ignore ( element . len ) ; // ignore payload
Original file line number Diff line number Diff line change 2020 },
2121 "sideEffects" : false ,
2222 "engines" : {
23- "node" : " >=14.16 "
23+ "node" : " >=18 "
2424 },
2525 "scripts" : {
2626 "test" : " xo && ava && tsd"
216216 },
217217 "devDependencies" : {
218218 "@tokenizer/token" : " ^0.3.0" ,
219- "@types/node" : " ^20.1.2 " ,
220- "ava" : " ^5.2.0 " ,
219+ "@types/node" : " ^20.10.7 " ,
220+ "ava" : " ^6.0.1 " ,
221221 "commonmark" : " ^0.30.0" ,
222222 "noop-stream" : " ^1.0.0" ,
223- "tsd" : " ^0.28.1 " ,
224- "xo" : " ^0.54.2 "
223+ "tsd" : " ^0.30.3 " ,
224+ "xo" : " ^0.56.0 "
225225 },
226226 "xo" : {
227227 "envs" : [
228228 " node" ,
229229 " browser"
230230 ],
231+ "ignores" : [
232+ " fixture"
233+ ],
231234 "rules" : {
232235 "no-inner-declarations" : " warn" ,
233236 "no-await-in-loop" : " warn" ,
Original file line number Diff line number Diff line change 11import process from 'node:process' ;
2- import { Buffer , Blob } from 'node:buffer' ;
2+ import { Buffer } from 'node:buffer' ;
33import path from 'node:path' ;
44import { fileURLToPath } from 'node:url' ;
55import fs from 'node:fs' ;
66import stream from 'node:stream' ;
77import test from 'ava' ;
88import { readableNoopStream } from 'noop-stream' ;
99import { Parser as ReadmeParser } from 'commonmark' ;
10- import * as strtok3 from 'strtok3/core' ; // eslint-disable-line n/file-extension-in-import
10+ import * as strtok3 from 'strtok3/core' ;
1111import {
1212 fileTypeFromBuffer ,
1313 fileTypeFromStream ,
You can’t perform that action at this time.
0 commit comments