Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
This precompiler is responsible for defining macros in feature files and then executing them.
This precompiler is responsible for defining macros in feature files and then executing them.
Defining a macro by creating macro scenario. Using @macro(${macroName})
tag on the scenario defines a macro with the provided name and steps that are included.
Note: this scenario will not be run during test execution, it is removed during pre-processing. The definition cannot contain macro execution step (see next step).
Errors are thrown when no name or steps are included in the definition, or when defining a macro with an already existing name.
Executing the macro. In another scenario using step 'macro ${macroName} is executed'
will replace this step with the steps in the definition of ${macroName}
macro.
Throws error when no ${macroName}
is provided in the step, or when no macro is defined by name provided.
See examples for the input files and an output in the tests/data
folder.
'use strict';
const compiler = require('gherking');
const Macro = require('gpc-macro');
let ast = await compiler.load('./features/src/login.feature');
ast = compiler.process(
ast,
new Macro(),
);
await compiler.save('./features/dist/login.feature', ast, {
lineBreak: '\r\n'
});
import {load, process, save} from "gherking";
import Macro = require("gpc-macro");
let ast = await load("./features/src/login.feature");
ast = process(
ast,
new Macro(),
);
await save('./features/dist/login.feature', ast, {
lineBreak: '\r\n'
});
Macro.createStep(name)
Params:
{String} name
- The name of the macroReturns: {Step}
- A macro step for the given macro.
This package uses debug for logging, use gpc:macro
:
DEBUG=gpc:macro* gherking ...
For detailed documentation see the TypeDocs documentation.
FAQs
This precompiler is responsible for defining macros in feature files and then executing them.
The npm package gpc-macro receives a total of 4,031 weekly downloads. As such, gpc-macro popularity was classified as popular.
We found that gpc-macro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.