Socket
Socket
Sign inDemoInstall

@digitak/grubber

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitak/grubber - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

library/index.d.ts
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;

2

library/languages/nim.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc