Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/6pac/SlickGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Nov 21, 2024
2 parents 0d2230a + a00ca55 commit e27fcc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions scripts/changelog.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import conventionalChangelog from 'conventional-changelog';
import { pathExistsSync } from './fs-utils.mjs';
import { readFileSync, writeFileSync } from 'node:fs';
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
import path from 'node:path';

const projectRootLocation = process.cwd();
Expand Down Expand Up @@ -29,7 +28,7 @@ export function updateChangelog(args, newVersion) {

// read changelog.md if it exist or else we'll create it
const changelogLocation = path.resolve(projectRootLocation, infile);
const fileExist = pathExistsSync(changelogLocation);
const fileExist = existsSync(changelogLocation);
if (fileExist) {
oldContent = readFileSync(path.resolve(projectRootLocation, infile), 'utf8');
}
Expand Down
6 changes: 1 addition & 5 deletions scripts/fs-utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ export function outputFileSync(file, ...args) {
writeFileSync(file, ...args);
}

export function pathExistsSync(path) {
return existsSync(path);
}

export function readJSONSync(file, options = {}) {
if (typeof options === 'string') {
options = { encoding: options };
Expand Down Expand Up @@ -59,4 +55,4 @@ export function writeJsonSync(file, obj, options = {}) {
const str = stringify(obj, options);
// not sure if fs.writeFileSync returns anything, but just in case
return writeFileSync(file, str, options);
}
}

0 comments on commit e27fcc2

Please sign in to comment.