Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Issue #85: Fixed markdown spec compliance for unbordered tables with center/right aligned first columns. First column now uses left padding logic regardless of alignment to prevent invalid markdown output.

### Changed
- **BREAKING**: Updated NPM package compilation target from ES5 to ES2022. Requires Node.js 16.11+.
- Updated TypeScript to 6 with full strict mode.
- Updated all dependencies to latest versions.
- Fixed vulnerabilities in transitive dependencies.
- Updated Docker image to use `lts-alpine` tag for automatic LTS tracking and added OS-level security patching.

## 3.7.0 - 2025-08-29
### Added
- Issue #78: Support tab indentation for tables without a border.
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM node:22-alpine AS builder
FROM node:lts-alpine AS builder

RUN apk upgrade --no-cache

WORKDIR /tmp

Expand All @@ -12,7 +14,9 @@ COPY src/ src/
RUN npm run compile


FROM node:22-alpine
FROM node:lts-alpine

RUN apk upgrade --no-cache

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A VSCode command called `Prettify markdown tables` is also available to format t

## NPM

The core formatting logic is available as an NPM package: `npm install --save markdown-table-prettify`. The Typescript code is compiled down to ES5 and shipped inside the package.
The core formatting logic is available as an NPM package: `npm install --save markdown-table-prettify`. The Typescript code is compiled to ES2022 and shipped inside the package. Requires Node.js 16.11+.

It currently exposes the entry point also used by the _CLI_. It can be used from regular NodeJS or web apps:

Expand Down
2 changes: 1 addition & 1 deletion cli/argumentsParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function parseArguments(processArgs: string[]): CliOptions {
return processArgs.length > 2 && processArgs.find(arg => arg.startsWith("--" + key)) !== undefined;
}

function getArgumentValue(key: string): string {
function getArgumentValue(key: string): string | null {
const hasArguments = processArgs.length > 2;
const split = (hasArguments
? processArgs.find(arg => arg.startsWith("--" + key)) || ""
Expand Down
2 changes: 1 addition & 1 deletion cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { InputReader } from "./inputReader";

const cliOptions: CliOptions = parseArguments(process.argv);

InputReader.subscribe(input =>
InputReader.subscribe((input: string) =>
cliOptions.check
? CliPrettify.check(input, cliOptions)
: process.stdout.write(CliPrettify.prettify(input, cliOptions))
Expand Down
2 changes: 1 addition & 1 deletion cli/inputReader.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export class InputReader {
static subscribe(readDone): void {
static subscribe(readDone: (input: string) => void): void {
if (process.stdin.isTTY) {
readDone(process.argv[2] || "");
} else {
Expand Down
Loading
Loading