Skip to content

Commit

Permalink
Merge pull request #24 from BenoitZugmeyer/release-v2.2.0
Browse files Browse the repository at this point in the history
Release v2.2.0
  • Loading branch information
BenoitZugmeyer authored Sep 9, 2024
2 parents d2e7e4a + 4fe3778 commit d88b0b7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2024-09-09 v2.2.0

- Fix: compatibility with latest NodeJS versions
- Improve: Migrate codebase to TypeScript
- Improve: Drop Jest in favor of native NodeJS test runner
- Improve: Drop Commander in favor of native NodeJS argument parser

2022-03-06 v2.1.0

- Feature: read from local files
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "in-situ",
"version": "2.1.0",
"version": "2.2.0",
"description": "Download, beautify and print lines from a minified JavaScript source",
"homepage": "https://github.com/BenoitZugmeyer/in-situ",
"repository": "https://github.com/BenoitZugmeyer/in-situ.git",
Expand Down
20 changes: 6 additions & 14 deletions tools/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,15 @@ if (!firstChangelogLine.startsWith(expectedFirstChangelogLine)) {
error(`CHANGELOG.md should start with '${expectedFirstChangelogLine}'`);
}

console.log("\nRunning tests...");
exec("npm --silent test", { stdio: "inherit" });
console.log("\nRunning lint...");
exec("npm run --silent lint", { stdio: "inherit" });
console.log("\nRunning checks...");
exec("npm run --silent check", { stdio: "inherit" });

console.log("\nPacking...");
const packed = exec("npm pack 2>&1").toString().split("\n");

const STATE_INIT = 0;
const STATE_TARBALL_CONTENTS = 1;
const STATE_TARBALL_DETAILS = 2;
const STATE_TARBALL_FILENAME = 3;

let state = STATE_INIT;
const content = new Set<string>();
Expand All @@ -60,25 +57,20 @@ for (let line of packed) {
line = line.replace(/^npm notice /, "").trim();
switch (state) {
case STATE_INIT:
if (line === "=== Tarball Contents ===") {
if (line === "Tarball Contents") {
state = STATE_TARBALL_CONTENTS;
}
break;
case STATE_TARBALL_CONTENTS:
if (line === "=== Tarball Details ===") {
if (line === "Tarball Details") {
state = STATE_TARBALL_DETAILS;
} else {
content.add(line.match(/.*?\s+(.*)$/)![1]);
}
break;
case STATE_TARBALL_DETAILS:
if (!line) {
state = STATE_TARBALL_FILENAME;
}
break;
case STATE_TARBALL_FILENAME:
if (line) {
tarballFileName = line;
if (line.startsWith("filename: ")) {
tarballFileName = line.slice("filename: ".length);
}
break;
}
Expand Down

0 comments on commit d88b0b7

Please sign in to comment.