Skip to content

Commit 4e5f08b

Browse files
committed
2.0.0-beta.3
1 parent 590fa06 commit 4e5f08b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hyperapp-fx",
3-
"version": "2.0.0-beta.2",
3+
"version": "2.0.0-beta.3",
44
"description": "Effects for use with Hyperapp",
55
"type": "module",
66
"module": "src/index.js",

release.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { execSync } from "child_process";
2-
import packageJson from "./package.json";
32
import { fileURLToPath } from "url";
4-
import { dirname } from "path";
3+
import { dirname, resolve } from "path";
4+
import fs from "fs";
55

66
const __filename = fileURLToPath(import.meta.url);
77
const __dirname = dirname(__filename);
@@ -22,6 +22,10 @@ if (workingCopyChanges) {
2222
exitWithError("please commit your changes before making a release!");
2323
}
2424

25+
const packagePath = resolve(__dirname, "package.json");
26+
const packageText = fs.readFileSync(packagePath);
27+
const packageJson = JSON.parse(packageText);
28+
2529
const tagExists = exec(`git tag -l "${packageJson.version}"`);
2630
if (tagExists) {
2731
exitWithError(`${packageJson.version} has already been released!`);

0 commit comments

Comments
 (0)