Skip to content

Commit e577ecd

Browse files
committed
fix: GPR hack mjs to js
1 parent 9652ba6 commit e577ecd

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/github-release-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
node-version: 14
2828
registry-url: 'https://registry.npmjs.org'
29-
- run: npm install
29+
- run: npm ci
3030
- run: npm publish
3131
env:
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

gpr-hack.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { writeFileSync, readFileSync } from "fs";
1+
const fs = require('fs');
2+
const path = require('path');
3+
const pkg = require('../package.json');
24

3-
const file = readFileSync("./package.json", {
4-
encoding: "utf-8",
5-
});
5+
pkg.name = '@HemantNegi/jquery.sumoselect';
66

7-
const json = JSON.parse(file);
8-
9-
json.name = "@HemantNegi/jquery.sumoselect";
10-
11-
writeFileSync("./package.json", JSON.stringify(json, undefined, 2));
7+
// Update package.json with the udpated name
8+
fs.writeFileSync(
9+
path.join(__dirname, '../package.json'),
10+
JSON.stringify(pkg, null, 2),
11+
);

0 commit comments

Comments
 (0)