
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@linuxcnc-node/gcode
Advanced tools
G-code file parser for Node.js using LinuxCNC's rs274ngc interpreter. Parse G-code files and extract sequential operations for toolpath visualization.
npm install @linuxcnc-node/gcode
import { parseGCode } from "@linuxcnc-node/gcode";
import { OperationType, PositionIndex } from "@linuxcnc-node/types";
const result = await parseGCode("/path/to/program.ngc", {
iniPath: "/path/to/linuxcnc.ini",
onProgress: (p) => console.log(`${p.percent}% - ${p.operationCount} ops`),
});
console.log(`Parsed ${result.operations.length} ops`, result.extents);
const { X, Y, Z } = PositionIndex;
for (const op of result.operations) {
if (op.type === OperationType.TRAVERSE) {
console.log(`Rapid to ${op.pos[X]}, ${op.pos[Y]}, ${op.pos[Z]}`);
} else if (op.type === OperationType.FEED) {
console.log(`Feed to ${op.pos[X]}, ${op.pos[Y]} @ F${op.feedRate}`);
}
}
parseGCode(filepath, options)Returns Promise<GCodeParseResult>.
Options (ParseOptions):
iniPath: Path to LinuxCNC INI file (required)onProgress: Callback (progress: ParseProgress) => voidprogressUpdates: Target number of progress updates (default: 40, set to 0 to disable)| Type | Description |
|---|---|
TRAVERSE | G0 rapid motion |
FEED | G1 linear feed motion |
ARC | G2/G3 arc motion |
PROBE | G38.x probe motion |
RIGID_TAP | G33.1 rigid tapping |
DWELL | G4 pause |
NURBS_G5/G6 | NURBS curves |
UNITS_CHANGE | G20/G21 |
PLANE_CHANGE | G17/G18/G19 |
TOOL_CHANGE | M6 |
(See types.ts for full list including offsets and rotations)
Requires LinuxCNC development headers. Set LINUXCNC_INCLUDE environment variable if headers are not in standard location.
export LINUXCNC_INCLUDE=/path/to/linuxcnc/include
npm install
npm run build
GPL-2.0-only
FAQs
Node.js G-code parser using LinuxCNC rs274ngc interpreter
The npm package @linuxcnc-node/gcode receives a total of 0 weekly downloads. As such, @linuxcnc-node/gcode popularity was classified as not popular.
We found that @linuxcnc-node/gcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.