Skip to content

Commit

Permalink
fix: write eol in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
hongaar committed Dec 13, 2022
1 parent bbda19c commit 18c1853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/updaters/githubWorkflows.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { info } from "@actions/core";
import { updateYamlDocument } from "@atomist/yaml-updater";
import { load } from "js-yaml";
import { info } from "node:console";
import { readdir, readFile, writeFile } from "node:fs/promises";
import { basename, join } from "node:path";
import type { GithubWorkflow } from "../GithubWorkflow.js";
Expand Down
5 changes: 3 additions & 2 deletions src/updaters/packageJson.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { info } from "node:console";
import { info } from "@actions/core";
import { readFile, writeFile } from "node:fs/promises";
import { EOL } from "node:os";
import { join } from "node:path";
import type { PackageJson } from "../PackageJson.js";

Expand Down Expand Up @@ -28,7 +29,7 @@ export async function packageJson(versions: number[], cwd = process.cwd()) {

await writeFile(
join(cwd, PACKAGE_PATH),
JSON.stringify(packageJson, undefined, 2),
JSON.stringify(packageJson, undefined, 2) + EOL,
"utf8"
);
}
Expand Down

0 comments on commit 18c1853

Please sign in to comment.