@stackline/brace
Compatibility-first Browserify build of the modern Ace editor with inline workers.
Documentation | npm | Issues | Repository
Current package version: 1.0.4
Why this package?
A compatibility-first Browserify build of the modern Ace Editor. It preserves Brace deep imports, embeds workers for browser bundles, supports TypeScript 3.9, and has zero runtime dependencies.
Compatibility
| Item | Value |
|---|---|
| Package | @stackline/brace@1.0.4 |
| Node.js runtime | >=12 |
| CommonJS / primary entry | ./index.js |
| ES module entry | ./index.mjs |
| Type declarations | ./index.d.ts |
Installation
Install
Use the scoped package directly:
npm install @stackline/brace
Or replace brace without changing existing source imports:
npm install brace@npm:@stackline/brace@^1.0.2
Usage
Existing Brace code
const ace = require('brace');
require('brace/mode/javascript');
require('brace/theme/monokai');
const editor = ace.edit('editor');
editor.session.setMode('ace/mode/javascript');
editor.setTheme('ace/theme/monokai');
Scoped imports
const ace = require('@stackline/brace');
require('@stackline/brace/mode/typescript');
require('@stackline/brace/theme/github');
const editor = ace.edit('editor');
editor.session.setMode('ace/mode/typescript');
editor.setTheme('ace/theme/github');
ES modules are supported at the root:
import ace from '@stackline/brace';
import '@stackline/brace/mode/javascript.js';
import '@stackline/brace/theme/monokai.js';
Features and Integrations
What is preserved
| Contract | Status |
|---|---|
brace@0.11.1 root API |
Preserved |
| Historical mode, theme, extension, keybinding, snippet, and worker paths | Preserved |
acequire loader |
Preserved, with require also available |
| Browserify side-effect imports | Preserved |
npm alias installation as brace |
Tested from each registry |
| TypeScript 3.9 | Tested |
| Runtime dependencies | Zero |
The generated runtime uses ace-builds@1.44.0 and includes 206 modes, 48 themes, 29 extensions, 206 snippet paths, and 10 inline workers. These counts are generated from the pinned build input rather than maintained by hand.
Inline workers
Modes register their referenced worker source as a Blob URL when loaded in a browser. This prevents the common worker-javascript.js 404 in bundled deployments.
Consumer configuration always wins:
const ace = require('@stackline/brace');
ace.config.setModuleUrl(
'ace/mode/javascript_worker',
'https://cdn.example.com/worker-javascript.js'
);
require('@stackline/brace/mode/javascript');
The package will not overwrite an existing module URL. Applications with a strict Content Security Policy can provide explicit worker URLs or disable workers through Ace's standard session API.
Documentation
- Interactive documentation
- Migration guide
- Compatibility contract
- Security policy
- Third-party licenses
- Changelog
Security
Supply chain
Ace is an exact development-time generation input and is not installed for consumers. Generated assets are committed and the release records the upstream npm shasum and integrity value in dist/build-meta.json.
Every release gate covers:
- all paths published by
brace@0.11.1; - current generated inventory;
- esbuild browser bundles with CommonJS deep imports;
- a real Chrome editor with a functioning inline worker;
- TypeScript 3.9 and current TypeScript;
- direct and npm-alias installation from the packed tarball and registries;
- package metadata, documentation, runtime audit, checksums, and SBOM.
Local Development
git clone https://github.com/alexandroit/stackline-brace.git
cd stackline-brace
npm ci
npm run verify
Release tooling uses Node.js 24.20.0 and npm 11.19.0. The consumer runtime contract remains the one documented above.
Consumer Smoke Test
Run the repository's existing consumer/package check after installing development dependencies:
npm run test:smoke
Release Checklist
Run npm run verify and inspect the package contents before release. Publish a new version through the GitHub Actions publishing workflow, using the SHA-512 digest of the reviewed tarball. Verify the exact published version, tarball integrity, and npm provenance after the run.
License
Independence and attribution
@stackline/brace is independently maintained and is not affiliated with the original Brace or Ace maintainers.
Compatibility work derived from Brace is MIT licensed. Bundled Ace code remains BSD-3-Clause licensed. Both copyright notices and complete license texts are included in the package. See NOTICE and THIRD_PARTY_LICENSES.md.
Credits and original authors
- Stackline Maintainers.
- Thorsten Lorenz.
- Ajax.org B.V. and Ace contributors.
- Copyright 2013 Thorsten Lorenz.
- Copyright 2026 Stackline Maintainers.
- Copyright 2013 Thorsten Lorenz, licensed under the MIT License.
- Copyright 2010 Ajax.org B.V. and Ace contributors, licensed under the.
- Stackline maintenance: Alexandro Paixao Marques and Stackline contributors.
Original copyright, license notices and contributor acknowledgements remain part of this distribution. Stackline maintenance does not replace authorship of the original work.
Community and Links
Use this repository's issue tracker for reproducible bugs and feature requests. Join r/Stackline for examples, usage questions and release discussions.