Skip to content

Add npm scope to publish workflow #14

Add npm scope to publish workflow

Add npm scope to publish workflow #14

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
core-build-test:
name: Core Build and Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/core
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build
run: npm run build
- name: Smoke test published entrypoint
run: |
node --input-type=module <<'NODE'
import { scan } from './dist/index.js';
const result = await scan(
{ paths: ['a.js'] },
{
fileResolver: async () => 'eval(atob("YQ=="));\n',
logger: { debug() {}, info() {}, warn() {}, error() {} },
},
);
if (!result.findings.some(f => f.ruleId === 'obf.decode-then-exec.javascript')) {
throw new Error('built package did not load rules and scan successfully');
}
NODE
- name: Test
run: npm run test:all