@serwist/cli 9.0.7 → 9.0.8

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.
Files changed (2) hide show
  1. package/dist/bin.js +9 -11
  2. package/package.json +9 -9
package/dist/bin.js CHANGED
@@ -5,13 +5,13 @@ import assert from 'node:assert';
5
5
  import path from 'node:path';
6
6
  import { injectManifest } from '@serwist/build';
7
7
  import chokidar from 'chokidar';
8
+ import { glob } from 'glob';
8
9
  import prettyBytes from 'pretty-bytes';
9
10
  import { oneLine } from 'common-tags';
10
11
  import chalk from 'chalk';
11
12
  import { statSync, writeFileSync } from 'node:fs';
12
13
  import stringifyObject from 'stringify-object';
13
14
  import { input, checkbox, select, Separator } from '@inquirer/prompts';
14
- import { glob } from 'glob';
15
15
 
16
16
  const constants = {
17
17
  defaultConfigFile: "serwist.config.js",
@@ -254,17 +254,15 @@ const app = async (params)=>{
254
254
  }
255
255
  logger.log(`Using configuration from ${configPath}.`);
256
256
  if (params?.flags?.watch) {
257
- const options = {
258
- ignoreInitial: true
259
- };
260
- if (config.globIgnores) {
261
- options.ignored = config.globIgnores;
262
- }
263
- if (config.globDirectory) {
264
- options.cwd = config.globDirectory;
265
- }
266
257
  if (config.globPatterns) {
267
- chokidar.watch(config.globPatterns, options).on("all", async ()=>{
258
+ chokidar.watch(await glob(config.globPatterns, {
259
+ cwd: config.globDirectory,
260
+ follow: config.globFollow,
261
+ ignore: config.globIgnores
262
+ }), {
263
+ ignoreInitial: true,
264
+ cwd: config.globDirectory
265
+ }).on("all", async ()=>{
268
266
  if (config === null) return;
269
267
  await runBuildCommand({
270
268
  config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/cli",
3
- "version": "9.0.7",
3
+ "version": "9.0.8",
4
4
  "type": "module",
5
5
  "description": "The command line interface of Serwist.",
6
6
  "files": [
@@ -31,26 +31,26 @@
31
31
  "serwist": "cli.js"
32
32
  },
33
33
  "dependencies": {
34
- "@inquirer/prompts": "5.3.8",
34
+ "@inquirer/prompts": "6.0.1",
35
35
  "chalk": "5.3.0",
36
- "chokidar": "3.6.0",
36
+ "chokidar": "4.0.0",
37
37
  "common-tags": "1.8.2",
38
38
  "glob": "10.4.5",
39
39
  "meow": "13.2.0",
40
40
  "pretty-bytes": "6.1.1",
41
41
  "stringify-object": "5.0.0",
42
- "update-notifier": "7.2.0",
43
- "@serwist/build": "9.0.7"
42
+ "update-notifier": "7.3.1",
43
+ "@serwist/build": "9.0.8"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/common-tags": "1.8.4",
47
47
  "@types/inquirer": "9.0.7",
48
48
  "@types/stringify-object": "4.0.5",
49
49
  "@types/update-notifier": "6.0.8",
50
- "rollup": "4.21.0",
51
- "typescript": "5.5.4",
52
- "@serwist/configs": "9.0.7",
53
- "@serwist/utils": "9.0.7"
50
+ "rollup": "4.21.3",
51
+ "typescript": "5.6.2",
52
+ "@serwist/configs": "9.0.8",
53
+ "@serwist/utils": "9.0.8"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "rimraf dist && NODE_ENV=production rollup --config rollup.config.js",