@travetto/compiler 7.1.0 → 7.1.2
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/package.json +4 -4
- package/src/watch.ts +5 -2
- package/support/invoke.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/compiler",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The compiler infrastructure for the Travetto framework",
|
|
6
6
|
"keywords": [
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@parcel/watcher": "^2.5.4",
|
|
34
|
-
"@travetto/manifest": "^7.1.
|
|
35
|
-
"@travetto/transformer": "^7.1.
|
|
34
|
+
"@travetto/manifest": "^7.1.2",
|
|
35
|
+
"@travetto/transformer": "^7.1.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@travetto/cli": "^7.1.
|
|
38
|
+
"@travetto/cli": "^7.1.3"
|
|
39
39
|
},
|
|
40
40
|
"peerDependenciesMeta": {
|
|
41
41
|
"@travetto/cli": {
|
package/src/watch.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import { watch } from 'node:fs';
|
|
3
3
|
|
|
4
|
-
import { ManifestFileUtil, ManifestModuleUtil, ManifestUtil, PackageUtil, path } from '@travetto/manifest';
|
|
4
|
+
import { ManifestFileUtil, ManifestModuleUtil, ManifestUtil, PACKAGE_MANAGERS, PackageUtil, path } from '@travetto/manifest';
|
|
5
5
|
|
|
6
6
|
import { CompilerReset, type CompilerWatchEvent, type CompileStateEntry } from './types.ts';
|
|
7
7
|
import type { CompilerState } from './state.ts';
|
|
@@ -116,7 +116,10 @@ export class CompilerWatcher {
|
|
|
116
116
|
async #listenWorkspace(): Promise<void> {
|
|
117
117
|
const lib = await import('@parcel/watcher');
|
|
118
118
|
const ignore = await this.#getWatchIgnores();
|
|
119
|
-
const packageFiles = new Set([
|
|
119
|
+
const packageFiles = new Set([
|
|
120
|
+
'package.json',
|
|
121
|
+
...PACKAGE_MANAGERS.flatMap(x => [...x.otherFiles, x.lock])
|
|
122
|
+
].map(file => path.resolve(this.#root, file)));
|
|
120
123
|
|
|
121
124
|
log.debug('Ignore Globs', ignore);
|
|
122
125
|
log.debug('Watching', this.#root);
|
package/support/invoke.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { CommonUtil } from '../src/common.ts';
|
|
|
8
8
|
import { EventUtil } from '../src/event.ts';
|
|
9
9
|
|
|
10
10
|
const HELP = `
|
|
11
|
-
|
|
11
|
+
trvc [command]
|
|
12
12
|
|
|
13
13
|
Available Commands:
|
|
14
14
|
* start|watch - Run the compiler in watch mode
|
|
@@ -87,7 +87,7 @@ export async function invoke(operation?: string, args: string[] = []): Promise<u
|
|
|
87
87
|
await CompilerManager.compileIfNecessary(ctx, client);
|
|
88
88
|
Log.initLevel('none');
|
|
89
89
|
process.env.TRV_MANIFEST = CommonUtil.resolveWorkspace(ctx, ctx.build.outputFolder, 'node_modules', ctx.main.name); // Setup for running
|
|
90
|
-
const importTarget = CommonUtil.resolveWorkspace(ctx, ctx.build.outputFolder, 'node_modules', args[0]);
|
|
90
|
+
const importTarget = CommonUtil.resolveWorkspace(ctx, ctx.build.outputFolder, 'node_modules', args[0]).replace(/\.ts$/, '.js');
|
|
91
91
|
process.argv = [process.argv0, importTarget, ...args.slice(1)];
|
|
92
92
|
// Return function to run import on a module
|
|
93
93
|
return import(importTarget);
|