Variables
Const INVALID_COMMANDS
INVALID_COMMANDS: string[] = [// It shouldn't allow shell lines to start with semicolons.// Bash doesn't allow it, but ZSH and Fish do. We don't, because// we don't need the extra complexity. Also, it's more common to// end a shell line with a semicolon, rather than start one with a semicolon.// Anyways, I can't think of any reason why anybody would like to start// a script with a semicolon. ¯\_(ツ)_/¯.`; echo foo`,]
Const LEGACY_REGEXP
LEGACY_REGEXP: RegExp = /^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i
Const VALID_COMMANDS
VALID_COMMANDS: string[] = [// It should allow shell lines to end with semicolons`echo foo;`,// Groups...[// Parsable by bash`{ echo foo; }`,`{ echo foo;}`,// Unparsable by bash, parsable by zsh`{ echo foo }`,`{echo foo }`,`{ echo foo}`,`{echo foo}`,],]
Const simpleStringPattern
simpleStringPattern: RegExp = /^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/
Const specialObjectKeys
specialObjectKeys: string[] = [`__metadata`, `version`, `resolution`, `dependencies`, `peerDependencies`, `dependenciesMeta`, `peerDependenciesMeta`, `binaries`]