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

@inlang/core

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inlang/core - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

1

dist/plugin/setupPlugins.js

@@ -46,2 +46,3 @@ import { PluginSetupError } from "./errors/PluginSetupError.js";

Failed to setup plugin '${args.config.plugins[i]?.id}':
${error?.message ?? "Unknown error"}

@@ -48,0 +49,0 @@ `));

23

dist/test/testConfigFile.js

@@ -13,13 +13,18 @@ import { setupConfig } from "../config/setupConfig.js";

export async function testConfigFile(args) {
const [, importKeywordUsedException] = importKeywordUsed(args.file);
if (importKeywordUsedException) {
return [undefined, importKeywordUsedException];
try {
const [, importKeywordUsedException] = importKeywordUsed(args.file);
if (importKeywordUsedException) {
return [undefined, importKeywordUsedException];
}
const module = await import("data:application/javascript;base64," + btoa(args.file));
const config = await setupConfig({ module, env: args.env });
const [, exception] = await testConfig({ config });
if (exception) {
return [undefined, exception];
}
return [true, undefined];
}
const module = await import("data:application/javascript;base64," + btoa(args.file));
const config = await setupConfig({ module, env: args.env });
const [, exception] = await testConfig({ config });
if (exception) {
return [undefined, exception];
catch (e) {
return [undefined, new TestConfigException(e.message)];
}
return [true, undefined];
}

@@ -26,0 +31,0 @@ /**

{
"name": "@inlang/core",
"type": "module",
"version": "0.8.1",
"version": "0.8.2",
"publishConfig": {

@@ -6,0 +6,0 @@ "access": "public"

@@ -58,2 +58,3 @@ import type { InlangConfig } from "../config/schema.js"

Failed to setup plugin '${(args.config.plugins[i] as Plugin)?.id}':
${(error as Error | undefined)?.message ?? "Unknown error"}

@@ -60,0 +61,0 @@ `),

@@ -20,16 +20,20 @@ import type { InlangConfigModule } from "../config/schema.js"

}): Promise<Result<true, TestConfigException>> {
const [, importKeywordUsedException] = importKeywordUsed(args.file)
if (importKeywordUsedException) {
return [undefined, importKeywordUsedException]
try {
const [, importKeywordUsedException] = importKeywordUsed(args.file)
if (importKeywordUsedException) {
return [undefined, importKeywordUsedException]
}
const module: InlangConfigModule = await import(
"data:application/javascript;base64," + btoa(args.file)
)
const config = await setupConfig({ module, env: args.env })
const [, exception] = await testConfig({ config })
if (exception) {
return [undefined, exception]
}
return [true, undefined]
} catch (e) {
return [undefined, new TestConfigException((e as Error).message)]
}
const module: InlangConfigModule = await import(
"data:application/javascript;base64," + btoa(args.file)
)
const config = await setupConfig({ module, env: args.env })
const [, exception] = await testConfig({ config })
if (exception) {
return [undefined, exception]
}
return [true, undefined]
}

@@ -36,0 +40,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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