From d39335e0c7de1c6aa1197489154d6f2ca5cf9708 Mon Sep 17 00:00:00 2001 From: Roman Lamsal Date: Thu, 6 Oct 2022 10:00:39 +0200 Subject: [PATCH] rename flag ignored->ignore --- src/watch/index.ts | 6 +++--- tests/foo.test.ts | 3 +++ tests/specs/watch.ts | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 tests/foo.test.ts diff --git a/src/watch/index.ts b/src/watch/index.ts index 33e101d1..7246838d 100644 --- a/src/watch/index.ts +++ b/src/watch/index.ts @@ -27,7 +27,7 @@ const flags = { description: 'Clearing the screen on rerun', default: true, }, - ignored: { + ignore: { type: [String], description: 'Paths & globs to exclude from being watched', default: [], @@ -52,7 +52,7 @@ export const watchCommand = command({ noCache: argv.flags.noCache, tsconfigPath: argv.flags.tsconfig, clearScreen: argv.flags.clearScreen, - ignored: argv.flags.ignored, + ignore: argv.flags.ignore, ipc: true, }; @@ -130,7 +130,7 @@ export const watchCommand = command({ // Distribution files '**/dist/**', - ...options.ignored, + ...options.ignore, ], ignorePermissionErrors: true, }, diff --git a/tests/foo.test.ts b/tests/foo.test.ts new file mode 100644 index 00000000..6eb8f255 --- /dev/null +++ b/tests/foo.test.ts @@ -0,0 +1,3 @@ +import { test } from 'node:test'; + +test('YEAH BABY', () => {}); diff --git a/tests/specs/watch.ts b/tests/specs/watch.ts index 353832dc..9a56d872 100644 --- a/tests/specs/watch.ts +++ b/tests/specs/watch.ts @@ -164,8 +164,8 @@ export default testSuite(async ({ describe }, fixturePath: string) => { args: [ 'watch', '--clear-screen=false', - `--ignored=${path.join(fixtures.path, ignoredFilenames[0])}`, - `--ignored=${path.join(fixtures.path, ignoredFilenames[1])}`, + `--ignore=${path.join(fixtures.path, ignoredFilenames[0])}`, + `--ignore=${path.join(fixtures.path, ignoredFilenames[1])}`, path.join(fixtures.path, includedFilename), ], });