Benign macos Download

astgen 3.55.0

“Generate AST in json format for JS/TS”

Backtick shell command-substitution syntaxBasename is uppercase README.md

Evidence

Imports Node child_process through ESM detect-changes.js · lines 1–23
1#!/usr/bin/env node
2
3import { readFileSync } from 'fs';
4import { minimatch } from 'minimatch';
5import * as yaml from 'js-yaml';
6import { execSync } from 'child_process';
7
8/**
9 * Detects which language workflows should be triggered based on changed files.
10 * Reads config from .github/monorepo-ci-config.yml and compares against git diff.
11 *
12 * Outputs JSON array of language names to trigger.
13 */
14
15function main() {
16 try {
17 // Read configuration file
18 const configPath = '.github/monorepo-ci-config.yml';
19 const configContent = readFileSync(configPath, 'utf8');
20 const config = yaml.load(configContent);
21
22 if (!config.languages || !Array.isArray(config.languages)) {
23 throw new Error('Config file must contai …
Runs shell commands synchronously with execSync detect-changes.js · lines 26–32
26:10… t changed files from git
27 const baseBranch = process.env.GITHUB_BASE_REF || 'main';
28 const changedFilesOutput = execSync(
29 `git diff --name-only origin/${baseBranch}...HEAD`,
30 { encoding: 'utf8' }
31 );
32 const changedFiles = changedFi …
Invokes zero-argument function at module scope detect-changes.js · lines 86–101
⋯4 lines
90 }
91
92 console.error(`\nTriggered workflows: ${JSON.stringify(result)}`);
93 console.log(JSON.stringify(result));
94
95 } catch (error) {
96 console.error('Error detecting changes:', error.message);
97 process.exit(1);
98 }
99}
100
101main();
Declares runtime dependencies object package.json · lines 1–11
1{
2 "name": "monorepo-ci-scripts",
3 "version": "1.0.0",
4 "description": "Path detection scripts for monorepo CI orchestration",
5 "private": true,
6 "type": "module",
7 "dependencies": {
8 "js-yaml": "^5.4.1",
9 "minimatch": "^11.0.5"
10 }
11}
imports cmd_compare from astgen_regression.commands.compare test_commands.py · lines 1–16
1import tempfile
2from pathlib import Path
3from unittest.mock import MagicMock, patch
4
5import pytest
6
7from astgen_regression.commands.compare import cmd_compare
8
9
10def test_cmd_compare_exits_with_code_1_on_regressions():
11 """Test that cmd_compare exits with code 1 when regressions are detected."""
12 with tempfile.TemporaryDirectory() as tmpdir:
13 base_dir = Path(tmpdir) / "base"
14 pr_dir = Path(tmpdir) / "pr"
15 base_dir.mkdir()
16 pr_ …

Showing the top 5 files — 3 more files (24 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.