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

@emigrate/cli

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emigrate/cli - npm Package Compare versions

Comparing version 0.16.1 to 0.16.2

dist/collect-migrations.test.d.ts

14

dist/collect-migrations.js

@@ -1,2 +0,1 @@

import { extname } from 'node:path';
import { toMigrationMetadata } from './to-migration-metadata.js';

@@ -7,10 +6,11 @@ import { getMigrations as getMigrationsOriginal } from './get-migrations.js';

const seen = new Set();
for await (const entry_ of history) {
const entry = extname(entry_.name) === '' ? { ...entry_, name: `${entry_.name}.js` } : entry_;
const index = allMigrations.findIndex((migrationFile) => migrationFile.name === entry.name);
if (index === -1) {
for await (const entry of history) {
const migration = allMigrations.find((migrationFile) => {
return migrationFile.name === entry.name || migrationFile.name === `${entry.name}.js`;
});
if (!migration) {
continue;
}
yield toMigrationMetadata(entry, { cwd, directory });
seen.add(entry.name);
yield toMigrationMetadata({ ...entry, name: migration.name }, { cwd, directory });
seen.add(migration.name);
}

@@ -17,0 +17,0 @@ yield* allMigrations.filter((migration) => !seen.has(migration.name));

import { describe, it, mock } from 'node:test';
import assert from 'node:assert';
import path from 'node:path';
import { deserializeError, serializeError } from 'serialize-error';
import { version } from '../get-package-info.js';
import { BadOptionError, CommandAbortError, ExecutionDesertedError, MigrationHistoryError, MigrationRunError, StorageInitError, } from '../errors.js';
import { toEntries, toEntry, toMigrations } from '../test-utils.js';
import upCommand from './up.js';

@@ -425,36 +425,2 @@ describe('up', () => {

}
function toMigration(cwd, directory, name) {
return {
name,
filePath: `${cwd}/${directory}/${name}`,
relativeFilePath: `${directory}/${name}`,
extension: path.extname(name),
directory,
cwd,
};
}
function toMigrations(cwd, directory, names) {
return names.map((name) => toMigration(cwd, directory, name));
}
function toEntry(name, status) {
if (typeof name !== 'string') {
return name.status === 'failed' ? name : name;
}
if (status === 'failed') {
return {
name,
status,
date: new Date(),
error: { name: 'Error', message: 'Failed' },
};
}
return {
name,
status: status ?? 'done',
date: new Date(),
};
}
function toEntries(names, status) {
return names.map((name) => (typeof name === 'string' ? toEntry(name, status) : name));
}
async function noop() {

@@ -461,0 +427,0 @@ // noop

{
"name": "@emigrate/cli",
"version": "0.16.1",
"version": "0.16.2",
"publishConfig": {

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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