onlybuild 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [v1.5.1](https://github.com/neogeek/onlybuild/tree/v1.5.1) - (2024-05-15)
4
+
5
+ [Full Changelog](https://github.com/neogeek/onlybuild/compare/v1.5.0...v1.5.1)
6
+
7
+ - [hotfix] Updated elapsed time label. [#23](https://github.com/neogeek/onlybuild/pull/23)
8
+ - [hotfix] Added mocked tests [#22](https://github.com/neogeek/onlybuild/pull/22)
9
+
3
10
  ## [v1.5.0](https://github.com/neogeek/onlybuild/tree/v1.5.0) - (2024-05-13)
4
11
 
5
12
  [Full Changelog](https://github.com/neogeek/onlybuild/compare/v1.4.1...v1.5.0)
package/dist/bin/index.js CHANGED
@@ -7,7 +7,7 @@ import parseCmdArgs from 'parse-cmd-args';
7
7
  import { buildFiles, writeFiles } from '../src/build.js';
8
8
  import { copyFiles } from '../src/copy.js';
9
9
  import pkg from '../package.json' assert { type: 'json' };
10
- const elapsedTimeLabel = 'Elapsed time:';
10
+ const elapsedTimeLabel = 'Elapsed time';
11
11
  console.time(elapsedTimeLabel);
12
12
  const args = parseCmdArgs(null, {
13
13
  requireUserInput: false
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onlybuild",
3
3
  "description": "A zero-config cli for building static websites.",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "engines": {
6
6
  "node": ">=20.x"
7
7
  },
package/dist/src/build.js CHANGED
@@ -1,4 +1,4 @@
1
- import { writeFile, mkdir } from 'node:fs/promises';
1
+ import fs from 'node:fs/promises';
2
2
  import { dirname, join, parse, resolve } from 'node:path';
3
3
  /**
4
4
  * Calculates the output path of the file based on the original input path.
@@ -36,8 +36,8 @@ export const buildFiles = async (paths) => {
36
36
  * @param {string} contents
37
37
  */
38
38
  export const writeFileAndMakeDir = async (path, contents) => {
39
- await mkdir(dirname(path), { recursive: true });
40
- await writeFile(path, contents);
39
+ await fs.mkdir(dirname(path), { recursive: true });
40
+ await fs.writeFile(path, contents);
41
41
  };
42
42
  /**
43
43
  * Write files to the build directory.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onlybuild",
3
3
  "description": "A zero-config cli for building static websites.",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "engines": {
6
6
  "node": ">=20.x"
7
7
  },