Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/compiler

Package Overview
Dependencies
Maintainers
0
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/compiler - npm Package Compare versions

Comparing version 5.0.0-rc.6 to 5.0.0-rc.7

2

bin/common.js

@@ -40,3 +40,3 @@ // @ts-check

/** @returns {Promise<import('@travetto/compiler/support/entry.trvc')>} */
async function imp(f = '') { try { return require(f); } catch (err) { return import(f); } }
async function imp(f = '') { try { return require(f); } catch { return import(f); } }

@@ -43,0 +43,0 @@ export async function getEntry() {

{
"name": "@travetto/compiler",
"version": "5.0.0-rc.6",
"version": "5.0.0-rc.7",
"description": "The compiler infrastructure for the Travetto framework",

@@ -37,8 +37,8 @@ "keywords": [

"@parcel/watcher": "^2.4.1",
"@travetto/manifest": "^5.0.0-rc.4",
"@travetto/transformer": "^5.0.0-rc.5",
"@travetto/manifest": "^5.0.0-rc.5",
"@travetto/transformer": "^5.0.0-rc.6",
"@types/node": "^22.1.0"
},
"peerDependencies": {
"@travetto/cli": "^5.0.0-rc.7"
"@travetto/cli": "^5.0.0-rc.9"
},

@@ -45,0 +45,0 @@ "peerDependenciesMeta": {

import os from 'node:os';
import { type ManifestModuleFileType, type ManifestModuleFolderType, ManifestModuleUtil, ManifestUtil, PackageUtil, path } from '@travetto/manifest';
import { ManifestContext, type ManifestModuleFileType, type ManifestModuleFolderType, ManifestModuleUtil, ManifestUtil, PackageUtil, path } from '@travetto/manifest';

@@ -64,4 +64,3 @@ import type { CompileStateEntry } from './types';

if (err) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
q.throw(err instanceof Error ? err : new Error((err as Error).message));
q.throw(err instanceof Error ? err : new Error(`${err}`));
return;

@@ -95,7 +94,8 @@ }

const moduleToFiles = new Map([...mods, ...parents.values()].flat().map(m => [m, {
context: ManifestUtil.getModuleContext(this.#state.manifest, this.#state.manifestIndex.getManifestModule(m)!.sourceFolder),
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
files: [] as FileShape[]
}] as const));
const moduleToFiles = new Map<string, { context: ManifestContext, files: FileShape[] }>(
[...mods, ...parents.values()].flat().map(m => [m, {
context: ManifestUtil.getModuleContext(this.#state.manifest, this.#state.manifestIndex.getManifestModule(m)!.sourceFolder),
files: []
}])
);

@@ -102,0 +102,0 @@ const allFiles = events.map(ev => {

@@ -86,5 +86,8 @@ import { CompilerLogEvent, CompilerLogLevel, CompilerProgressEvent } from './types';

initLevel(defaultLevel: CompilerLogLevel | 'none'): void {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const build = process.env.TRV_BUILD as CompilerLogLevel | 'none';
this.level = (build !== 'none' && process.env.TRV_QUIET !== 'true') ? (build || defaultLevel) : 'none';
const val = process.env.TRV_QUIET !== 'true' ? process.env.TRV_BUILD : 'none';
switch (val) {
case 'debug': case 'warn': case 'error': case 'info': this.level = val; break;
case undefined: this.level = defaultLevel; break;
case 'none': default: this.level = 'none';
}
}

@@ -91,0 +94,0 @@

@@ -66,5 +66,3 @@ import rl from 'node:readline/promises';

info(): Promise<CompilerServerInfo | undefined> {
return this.#fetch('/info', { timeout: 200 }, false).then(v => JSON.parse(v.text), () => undefined)
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
.then(v => v as CompilerServerInfo);
return this.#fetch('/info', { timeout: 200 }, false).then(v => JSON.parse(v.text), () => undefined);
}

@@ -71,0 +69,0 @@

@@ -167,4 +167,9 @@ import http from 'node:http';

switch (action) {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
case 'event': return this.#addListener(subAction as 'change', res);
case 'event': {
switch (subAction) {
case 'change': case 'log': case 'progress': case 'state': case 'all':
return this.#addListener(subAction, res);
default: return;
}
}
case 'clean': out = await this.#clean(); break;

@@ -171,0 +176,0 @@ case 'stop': out = JSON.stringify({ closing: true }); close = true; break;

@@ -95,3 +95,3 @@ import fs from 'node:fs/promises';

/**
* Queue new macrotask
* Queue new macro task
*/

@@ -98,0 +98,0 @@ static queueMacroTask(): Promise<void> {

{
"compilerOptions": {
"module": "NodeNext",
"module": "ES2022",
"target": "esnext",

@@ -5,0 +5,0 @@ "moduleResolution": "Bundler",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc