Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial preparation for automated release #5

Merged
merged 2 commits into from
Jan 3, 2024
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
21 changes: 21 additions & 0 deletions .release-plan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"solution": {
"esyes": {
"impact": "patch",
"oldVersion": "1.0.0",
"newVersion": "1.0.1",
"constraints": [
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
},
{
"impact": "patch",
"reason": "Appears in changelog section :house: Internal"
}
],
"pkgJSONPath": "./package.json"
}
},
"description": "## Release (2024-01-03)\n\nesyes 1.0.1 (patch)\n\n#### :bug: Bug Fix\n* `esyes`\n * [#3](https://github.com/starbeamjs/esyes/pull/3) Add tests ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### :house: Internal\n* `esyes`\n * [#4](https://github.com/starbeamjs/esyes/pull/4) Setup release-plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#3](https://github.com/starbeamjs/esyes/pull/3) Add tests ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n * [#2](https://github.com/starbeamjs/esyes/pull/2) Add a repo and change the license, add package linting ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
}
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# Changelog
## Release (2024-01-03)

esyes 1.0.1 (patch)

#### :bug: Bug Fix
* `esyes`
* [#3](https://github.com/starbeamjs/esyes/pull/3) Add tests ([@NullVoxPopuli](https://github.com/NullVoxPopuli))

#### :house: Internal
* `esyes`
* [#4](https://github.com/starbeamjs/esyes/pull/4) Setup release-plan ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
* [#3](https://github.com/starbeamjs/esyes/pull/3) Add tests ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
* [#2](https://github.com/starbeamjs/esyes/pull/2) Add a repo and change the license, add package linting ([@NullVoxPopuli](https://github.com/NullVoxPopuli))

#### Committers: 1
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "esyes",
"type": "module",
"version": "1.0.0",
"version": "1.0.1",
"description": "Run your TypeScript files quickly and with more positivity.",
"license": "MIT",
"main": "./src/register.js",
Expand Down Expand Up @@ -41,9 +41,14 @@
"bin": {
"esyes": "src/bin.js"
},
"pnpm": {
"patchedDependencies": {
"@ef4/[email protected]": "patches/@[email protected]"
}
},
"repository": "https://github.com/starbeamjs/esyes",
"volta": {
"node": "21.5.0",
"pnpm": "8.13.1"
}
}
}
132 changes: 132 additions & 0 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
diff --git a/lib/git.js b/lib/git.js
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

darn autoformatting

index b712bb439bed6c4c63360af7f5f2e7c51cfa613d..ee01e78a40569424cc6e7e67d7a56747ef97ac98 100644
--- a/lib/git.js
+++ b/lib/git.js
@@ -1,61 +1,90 @@
"use strict";
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+var __awaiter =
+ (this && this.__awaiter) ||
+ function (thisArg, _arguments, P, generator) {
+ function adopt(value) {
+ return value instanceof P
+ ? value
+ : new P(function (resolve) {
+ resolve(value);
+ });
+ }
return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
+ function fulfilled(value) {
+ try {
+ step(generator.next(value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function rejected(value) {
+ try {
+ step(generator["throw"](value));
+ } catch (e) {
+ reject(e);
+ }
+ }
+ function step(result) {
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
+ }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
});
-};
+ };
Object.defineProperty(exports, "__esModule", { value: true });
-exports.listCommits = exports.parseLogMessage = exports.lastTag = exports.listTagNames = exports.changedPaths = exports.getRootPath = void 0;
+exports.listCommits =
+ exports.parseLogMessage =
+ exports.lastTag =
+ exports.listTagNames =
+ exports.changedPaths =
+ exports.getRootPath =
+ void 0;
const execa = require("execa");
function getRootPath() {
- const cwd = process.cwd();
- return execa.sync("git", ["rev-parse", "--show-toplevel"], { cwd }).stdout;
+ const cwd = process.cwd();
+ return execa.sync("git", ["rev-parse", "--show-toplevel"], { cwd }).stdout;
}
exports.getRootPath = getRootPath;
function changedPaths(sha) {
- return __awaiter(this, void 0, void 0, function* () {
- const result = yield execa("git", ["show", "-m", "--name-only", "--pretty=format:", "--first-parent", sha]);
- return result.stdout.split("\n");
- });
+ return __awaiter(this, void 0, void 0, function* () {
+ const result = yield execa("git", ["show", "-m", "--name-only", "--pretty=format:", "--first-parent", sha]);
+ return result.stdout.split("\n");
+ });
}
exports.changedPaths = changedPaths;
function listTagNames() {
- return execa.sync("git", ["tag"]).stdout.split("\n").filter(Boolean);
+ return execa.sync("git", ["tag"]).stdout.split("\n").filter(Boolean);
}
exports.listTagNames = listTagNames;
function lastTag() {
- return execa.sync("git", ["describe", "--abbrev=0", "--tags"]).stdout;
+ let ref = execa.sync("git", ["rev-list", "--tags", "--max-count=1"]).stdout;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change here is the actual fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ return execa.sync("git", ["describe", "--tags", ref]).stdout;
}
exports.lastTag = lastTag;
function parseLogMessage(commit) {
- const parts = commit.match(/hash<(.+)> ref<(.*)> message<(.*)> date<(.*)>/) || [];
- if (!parts || parts.length === 0) {
- return null;
- }
- return {
- sha: parts[1],
- refName: parts[2],
- summary: parts[3],
- date: parts[4],
- };
+ const parts = commit.match(/hash<(.+)> ref<(.*)> message<(.*)> date<(.*)>/) || [];
+ if (!parts || parts.length === 0) {
+ return null;
+ }
+ return {
+ sha: parts[1],
+ refName: parts[2],
+ summary: parts[3],
+ date: parts[4],
+ };
}
exports.parseLogMessage = parseLogMessage;
function listCommits(from, to = "") {
- return execa
- .sync("git", [
- "log",
- "--oneline",
- "--pretty=hash<%h> ref<%D> message<%s> date<%cd>",
- "--date=short",
- `${from}..${to}`,
+ return execa
+ .sync("git", [
+ "log",
+ "--oneline",
+ "--pretty=hash<%h> ref<%D> message<%s> date<%cd>",
+ "--date=short",
+ `${from}..${to}`,
])
- .stdout.split("\n")
- .filter(Boolean)
- .map(parseLogMessage)
- .filter(Boolean);
+ .stdout.split("\n")
+ .filter(Boolean)
+ .map(parseLogMessage)
+ .filter(Boolean);
}
exports.listCommits = listCommits;
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

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

Loading