Skip to content

Commit 14899a9

Browse files
committed
fix: search for explicit .js file extensions
1 parent d69734c commit 14899a9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/cli-hooks/src/get-hooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ export default function getHooks() {
6767
config: {
6868
watch: {
6969
app: {
70+
'filter-regex': '\\.js$',
7071
paths: ['.'],
71-
'filter-regex': '.js$',
7272
},
7373
manifest: {
74-
paths: ['manifest.json'],
7574
'filter-regex': '^manifest\\.json$',
75+
paths: ['manifest.json'],
7676
},
7777
},
7878
'protocol-version': SUPPORTED_NAMED_PROTOCOLS,

packages/cli-hooks/src/get-hooks.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ describe('get-hooks implementation', async () => {
2626
const { config } = getHooks();
2727
assert(config.watch);
2828
assert(config.watch.app);
29+
assert.equal(config.watch.app['filter-regex'], '\\.js$');
2930
assert.deepEqual(config.watch.app.paths, ['.']);
30-
assert.equal(config.watch.app['filter-regex'], '.js$');
3131
});
3232

3333
it('should return watch config for manifest files', async () => {
3434
const { config } = getHooks();
3535
assert(config.watch);
3636
assert(config.watch.manifest);
37-
assert.deepEqual(config.watch.manifest.paths, ['manifest.json']);
3837
assert.equal(config.watch.manifest['filter-regex'], '^manifest\\.json$');
38+
assert.deepEqual(config.watch.manifest.paths, ['manifest.json']);
3939
});
4040
});

0 commit comments

Comments
 (0)