• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

accordproject / markdown-transform / 26908138899

03 Jun 2026 07:31PM UTC coverage: 78.878% (+5.7%) from 73.212%
26908138899

push

github

web-flow
chore(*): migrate to TypeScript, bump to v1.0.0 (#677)

* chore(*): migrate to TypeScript, bump to v1.0.0

Convert the entire monorepo from JavaScript (CommonJS + JSDoc-emitted
.d.ts) to TypeScript source compiled to .js + .d.ts.

Per package:
- Move sources from lib/ (or src/) JavaScript to src/*.ts. tsc emits
  to lib/ during build (now gitignored).
- Drop hand-written types/ in favour of declarations generated by tsc.
- Remove babel toolchain (@babel/cli, @babel/preset-env, babel-loader,
  babel-plugin-istanbul, tsd-jsdoc, jsdoc, .babelrc, jsdoc.json).
- Add per-package tsconfig.json extending the new tsconfig.base.json,
  plus tsconfig.test.json for ts-jest, jest.config.js using ts-jest
  preset, and .eslintrc.cjs with @typescript-eslint.
- package.json: main/types/typings point at lib/; files: ["lib"]
  (or ["lib","umd"]) so published tarballs contain only the build
  output — no tests, snapshots, or configs leak.

Test runners:
- markdown-template, markdown-transform and markdown-cli moved off
  mocha+chai onto jest+ts-jest. Snapshots preserved.
- All 1,860 unit tests pass across the 8 packages.

External models:
- scripts/external/Models.hbs and getExternalModels.js now generate
  TypeScript modules into packages/markdown-common/src/externalModels/
  (previously .js into lib/externalModels/).

Webpack UMD bundles (markdown-html, markdown-template, markdown-transform):
- Swap babel-loader for ts-loader; entry now ./src/index.ts.
- Add `webpack.ProvidePlugin({ process: 'process/browser' })` (webpack 5
  no longer auto-polyfills) and `resolve.alias = { jsdom: false }` in
  the markdown-html config to keep the bundle slim (4.7 MB → 1.12 MB).
- Browser entry point on each UMD package's package.json points at
  umd/markdown-X.js so bundlers automatically prefer it.

Browser end-to-end tests:
- New e2e/ workspace using Playwright (Chromium) loads each UMD bundle
  via addScriptTag and exercises public APIs in a real browser. 9 tests
  pass locally.
- ... (continued)

631 of 865 branches covered (72.95%)

Branch coverage included in aggregate %.

1390 of 1729 new or added lines in 61 files covered. (80.39%)

1957 of 2416 relevant lines covered (81.0%)

1099.96 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.21
/packages/markdown-transform/src/transformEngine.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc