single-file-cli 2.0.7 → 2.0.9

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/build-lib-dev.sh CHANGED
@@ -79,6 +79,8 @@ script += 'export { script, zipScript, hookScript };';
79
79
  await Deno.writeTextFile('lib/single-file-bundle.js', script)
80
80
  await Promise.all(SCRIPTS.map(script => Deno.remove(script)));
81
81
  await Deno.remove('lib/single-file-hooks-frames.js');
82
+ const version = JSON.parse(await Deno.readTextFile('./deno.json')).version;
83
+ await Deno.writeTextFile('lib/version.js', 'export const version = ' + JSON.stringify(version) + ';');
82
84
  " | deno run --allow-read --allow-write --allow-net --allow-run --allow-env --lock=node_modules/deno.lock.tmp -
83
85
 
84
86
  rm -rf node_modules
package/build-lib.sh CHANGED
@@ -78,6 +78,8 @@ script += 'export { script, zipScript, hookScript };';
78
78
  await Deno.writeTextFile('lib/single-file-bundle.js', script)
79
79
  await Promise.all(SCRIPTS.map(script => Deno.remove(script)));
80
80
  await Deno.remove('lib/single-file-hooks-frames.js');
81
+ const version = JSON.parse(await Deno.readTextFile('./deno.json')).version;
82
+ await Deno.writeTextFile('lib/version.js', 'export const version = ' + JSON.stringify(version) + ';');
81
83
  " | deno run --allow-read --allow-write --allow-net --allow-run --allow-env --lock=node_modules/deno.lock.tmp -
82
84
 
83
85
  rm -rf node_modules
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@single-file/single-file-cli",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "SingleFile CLI",
5
5
  "nodeModulesDir": true,
6
6
  "exports": {
package/lib/version.js ADDED
@@ -0,0 +1 @@
1
+ export const version = "2.0.9";
package/options.js CHANGED
@@ -21,6 +21,7 @@
21
21
  * Source.
22
22
  */
23
23
 
24
+ import { version } from "./lib/version.js";
24
25
  import { Deno } from "./lib/deno-polyfill.js";
25
26
 
26
27
  const USAGE_TEXT = `single-file [url] [output]
@@ -147,7 +148,6 @@ async function getOptions() {
147
148
  exit(0);
148
149
  }
149
150
  if (options.version) {
150
- const version = JSON.parse(await Deno.readTextFile("./deno.json")).version;
151
151
  console.log(version); // eslint-disable-line no-console
152
152
  exit(0);
153
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-cli",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "SingleFile CLI",
5
5
  "author": "Gildas Lormeau",
6
6
  "engines": {