Skip to content

Commit b5984a0

Browse files
committed
chore: release 1.2.0
1 parent 1af3c16 commit b5984a0

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

dist/index.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,10 @@ const { execSync } = __nccwpck_require__(7718)
99
const { fetch } = __nccwpck_require__(1773)
1010

1111
async function apply_patch(base_url, template_url, patch_path, output_path) {
12-
const base_response = await fetch(base_url);
13-
14-
if (base_response.status !== 200 && base_response.status !== 201) {
15-
throw new Error(`base url response got ${base_url.status} status code. expected 200 or 201.`)
12+
if (!fs.existsSync(base_url)) {
13+
throw new Error(`base_url (${base_url}) does not exist`)
1614
}
17-
const base_text = await base_response.text();
18-
15+
const base_text = fs.readFileSync(base_url, 'utf-8');
1916
const template_response = await fetch(template_url);
2017

2118
if (template_response.status !== 200 && template_response.status !== 201) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pkgjs/patch-my-code-of-conduct",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "A tool for generating a code of conduct with patches",
55
"main": "lib/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)