@digitak/grubber
Advanced tools
Comparing version 1.0.2 to 1.0.3
import Rule from "./Rule.js"; | ||
import Parser from "./Parser.js"; | ||
import Fragment from "./Fragment.js"; | ||
import { LanguageName } from "./languages/index.js"; | ||
@@ -8,1 +9,2 @@ /** | ||
export declare function grub(content: string, rules?: Rule[] | LanguageName): Parser; | ||
export { Rule, LanguageName, Fragment, Parser }; |
import Parser from "./Parser.js"; | ||
import Fragment from "./Fragment.js"; | ||
/** | ||
@@ -8,1 +9,2 @@ * @return a Parser instance with which the user can execute find and replace operations | ||
} | ||
export { Fragment, Parser }; |
@@ -49,2 +49,6 @@ export default class default_1 { | ||
}, | ||
{ | ||
// regular expression | ||
expression: /[=,;?(\n]\s*\/.*?[^\\](?:\\\\)*\//, | ||
}, | ||
]; | ||
@@ -62,2 +66,2 @@ } | ||
} | ||
default_1.importExpression = /import(?:\s+(.*?)\s+from)?\s+('|")(.+?)\2/g; | ||
default_1.importExpression = /\bimport(?:\s+([^;()[\]=/'"`+\-:.]+?)\s+from)?\s+('|")(.+?)\2/g; |
@@ -19,2 +19,2 @@ export default class default_1 { | ||
} | ||
default_1.importExpression = /^(?:(?:(from +(.*?) +)?(import) +(.*?))|(?:(include) +(.*?))) *$/gm; | ||
default_1.importExpression = /^(?:(?:(\bfrom +(.*?) +)?(\bimport) +(.*?))|(?:(\binclude) +(.*?))) *$/gm; |
@@ -23,2 +23,2 @@ export default class default_1 { | ||
} | ||
default_1.importExpression = /^(?:(?:from +(.*?) +)?(import) +(.*?)) *(?:\bas +(.*?))? *$/gm; | ||
default_1.importExpression = /^(?:(?:\bfrom +(.*?) +)?(\bimport) +(.*?)) *(?:\bas +(.*?))? *$/gm; |
@@ -19,2 +19,2 @@ export default class default_1 { | ||
} | ||
default_1.importExpression = /use\s+(.+?)\s*;/g; | ||
default_1.importExpression = /\buse\s+(.+?)\s*;/g; |
@@ -5,6 +5,6 @@ /** | ||
* (Thanks #TypescriptTeam for not being standard, look at all the additional work you make me do!) | ||
* (All this work for three letters!!...) | ||
* (Love your work though, Typescript is an awesome language.) | ||
* (All this work for three stupid letters!...) | ||
* (Love your work though, Typescript is an awesome language <3) | ||
* This utility function can be used after a Typescript compilation to add the mandatory '.js' | ||
*/ | ||
export default function patchJsImports(...directories: string[]): void; |
@@ -11,4 +11,4 @@ import { readdirSync, statSync, readFileSync, writeFileSync } from "fs"; | ||
* (Thanks #TypescriptTeam for not being standard, look at all the additional work you make me do!) | ||
* (All this work for three letters!!...) | ||
* (Love your work though, Typescript is an awesome language.) | ||
* (All this work for three stupid letters!...) | ||
* (Love your work though, Typescript is an awesome language <3) | ||
* This utility function can be used after a Typescript compilation to add the mandatory '.js' | ||
@@ -15,0 +15,0 @@ */ |
{ | ||
"name": "@digitak/grubber", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Parse code files and patch it without having to use an AST", | ||
@@ -43,4 +43,4 @@ "main": "library/index.js", | ||
"devDependencies": { | ||
"@digitak/esrun": "^1.0.8", | ||
"@types/node": "^14.14.37", | ||
"@digitak/esrun": "^1.0.8", | ||
"fartest": "^2.1.5", | ||
@@ -47,0 +47,0 @@ "typescript": "^4.2.4" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30220
703
1