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

@travetto/manifest

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/manifest - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

2

package.json
{
"name": "@travetto/manifest",
"version": "3.1.0",
"version": "3.1.1",
"description": "Support for project indexing, manifesting, along with file watching",

@@ -5,0 +5,0 @@ "keywords": [

@@ -11,3 +11,3 @@ import { extname, dirname, resolve, basename, delimiter, join, sep } from 'path';

delimiter,
basename: (file: string): string => posix(basename(file)),
basename: (file: string, suffix?: string): string => posix(basename(file, suffix)),
extname: (file: string): string => posix(extname(file)),

@@ -14,0 +14,0 @@ dirname: (file: string): string => posix(dirname(file)),

@@ -18,8 +18,8 @@ import { readFileSync } from 'fs';

*/
static async #writeJsonWithBuffer(ctx: ManifestContext, filename: string, obj: object): Promise<string> {
const tempName = `manifest.${process.ppid}.${process.pid}.json.${Date.now()}`;
const file = path.resolve(ctx.workspacePath, ctx.outputFolder, 'node_modules', ctx.mainModule, filename);
static async writeFileWithBuffer(file: string, content: string): Promise<string> {
const ext = path.extname(file);
const tempName = `${path.basename(file, ext)}.${process.ppid}.${process.pid}.${Date.now()}.${Math.random()}.${ext}`;
await fs.mkdir(path.dirname(file), { recursive: true });
const temp = path.resolve(os.tmpdir(), tempName);
await fs.writeFile(temp, JSON.stringify(obj), 'utf8');
await fs.writeFile(temp, content, 'utf8');
await fs.copyFile(temp, file);

@@ -92,3 +92,6 @@ fs.unlink(temp);

static writeManifest(ctx: ManifestContext, manifest: ManifestRoot): Promise<string> {
return this.#writeJsonWithBuffer(ctx, MANIFEST_FILE, manifest);
return this.writeFileWithBuffer(
path.resolve(ctx.workspacePath, ctx.outputFolder, 'node_modules', ctx.mainModule, MANIFEST_FILE),
JSON.stringify(manifest)
);
}

@@ -95,0 +98,0 @@

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