
Research
/Security News
GlassWASM: WebAssembly Malware Found in Trojanized Open VSX Extensions
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.
@isl-lang/codegen-core
Advanced tools
Core utilities for deterministic ISL code generation.
pnpm add @isl-lang/codegen-core
import { sortImports, formatImports } from '@isl-lang/codegen-core';
const imports = [
{ moduleSpecifier: './utils.js', namedImports: [{ name: 'helper' }] },
{ moduleSpecifier: 'zod', namedImports: [{ name: 'z' }] },
{ moduleSpecifier: '@isl-lang/runtime', namedImports: [{ name: 'Result' }] },
];
const sorted = sortImports(imports);
const code = formatImports(sorted, { singleQuote: true, semi: true });
// Output (grouped and sorted):
// import { z } from 'zod';
//
// import { Result } from '@isl-lang/runtime';
//
// import { helper } from './utils.js';
import { topologicalSortTypes } from '@isl-lang/codegen-core';
const types = [
{ name: 'UserResponse', dependencies: ['User'], kind: 'interface', declarationOrder: 1 },
{ name: 'User', dependencies: ['UUID'], kind: 'interface', declarationOrder: 0 },
{ name: 'UUID', dependencies: [], kind: 'utility', declarationOrder: 2 },
];
const sorted = topologicalSortTypes(types, { groupByKind: true });
// Result: ['UUID', 'User', 'UserResponse'] (dependencies first)
import { createPrinter, generateHeader } from '@isl-lang/codegen-core';
const printer = createPrinter();
// Add header
printer.writeLine(generateHeader({
generator: '@isl-lang/codegen-types',
version: '1.0.0',
sourcePath: 'domain/auth.isl',
}));
printer.blankLine();
// Generate code
printer.writeLine('export interface User {');
printer.indent();
printer.writeLine('id: string;');
printer.writeLine('email: string;');
printer.dedent();
printer.writeLine('}');
console.log(printer.toString());
import { hashContent } from '@isl-lang/codegen-core';
const hash = hashContent('export interface User { id: string; }');
// => "a1b2c3d4"
import {
toPascalCase,
toCamelCase,
toKebabCase,
toSnakeCase,
toScreamingSnakeCase,
} from '@isl-lang/codegen-core';
toPascalCase('user_profile'); // => 'UserProfile'
toCamelCase('user_profile'); // => 'userProfile'
toKebabCase('UserProfile'); // => 'user-profile'
toSnakeCase('UserProfile'); // => 'user_profile'
toScreamingSnakeCase('userProfile'); // => 'USER_PROFILE'
Every function produces identical output for identical input:
All collections follow deterministic ordering:
Regenerating code produces zero diff:
sortImports(imports, config?) - Sort imports by group and alphabeticallytopologicalSortTypes(types, config?) - Sort types by dependenciessortProperties(props, options?) - Sort object propertiesdeduplicateImports(imports) - Merge duplicate importsformatCode(code, language, config?) - Format code with PrettierformatCodeSync(code, language, config?) - Synchronous formattingformatImports(imports, options?) - Format imports to code stringgenerateHeader(config) - Generate file headergenerateSectionComment(title) - Generate section dividercreatePrinter(config?) - Create code printerhashContent(content, length?) - Generate content hashclassifyImport(specifier, config?) - Classify import group# Run tests
pnpm test
# Update snapshots
pnpm test:snapshot
MIT
FAQs
Core utilities for deterministic ISL code generation
The npm package @isl-lang/codegen-core receives a total of 7 weekly downloads. As such, @isl-lang/codegen-core popularity was classified as not popular.
We found that @isl-lang/codegen-core 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.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.