Registry / database / migration-hris

migration-hris

JSON →
library1.0.159jsnpmunverified

A migration application for the Naawan HRIS (Human Resource Information System) designed to facilitate data migration between legacy and modern HR systems. Version 1.0.159 is the latest release, updated frequently with multiple releases per month. This package is specific to the Naawan HRIS ecosystem, focusing on data transformation, mapping, and validation. It differentiates itself by providing designed-for-purpose migration scripts and utilities that handle the specific schema and constraints of the Naawan HRIS environment. The library includes tools for ETL (extract, transform, load) and integrity checks, aiming to reduce manual effort and errors during HR data migration projects.

npm install migration-hris
INSTALL
IMPORT
SIG · MIGRATION-HRIS
M
migration-hris
databasejavascriptv1.0.159
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

migrateHRIS
import { migrateHRIS } from 'migration-hris'
const migrateHRIS = require('migration-hris')
ESM-only; requires "type": "module" in package.json or use .mjs extension
validateData
import { validateData } from 'migration-hris'
const { validateData } = require('migration-hris')
CommonJS require is not supported; use ESM imports.
MigrationConfig
import type { MigrationConfig } from 'migration-hris'
import { MigrationConfig } from 'migration-hris'
MigrationConfig is a TypeScript type and should be imported using `import type` to avoid runtime issues.
runMigration
import { runMigration } from 'migration-hris'
import runMigration from 'migration-hris'
runMigration is a named export, not a default export. Do not use default import.

Shows how to connect to a database, configure and run a migration using migrateHRIS and runMigration functions.

import { migrateHRIS, runMigration } from 'migration-hris'; import { createConnection } from 'your-db-library'; const connection = await createConnection({ host: process.env.DB_HOST ?? 'localhost', user: process.env.DB_USER ?? 'admin', password: process.env.DB_PASS ?? '', database: process.env.DB_NAME ?? 'hris' }); const config = { sourceTable: 'employees_old', targetTable: 'employees_new', mapping: { first_name: 'given_name', last_name: 'family_name' }, batchSize: 100 }; const result = await migrateHRIS(connection, config); console.log('Migration status:', result.status); await runMigration(connection, { from: 'legacy_schema', to: 'modern_schema', dryRun: false }).then(console.log).catch(console.error);
Debug
Known issues
breakingIn v1.0.50, the function signature of migrateHRIS changed from (config) to (connection, config).
fix
Update calls to pass both connection and config arguments.
affects: <1.0.50
deprecatedThe function 'runLegacyMigration' is deprecated as of v1.0.100. Use 'migrateHRIS' instead.
fix
Replace runLegacyMigration with migrateHRIS with appropriate config.
affects: >=1.0.100
gotchaThe library uses ESM modules. Attempting to require('migration-hris') in a CommonJS environment will throw 'ERR_REQUIRE_ESM'.
fix
Use dynamic import() or switch to ESM by adding "type": "module" to package.json or rename file to .mjs.
affects: >=1.0.0
gotchaTypeScript users: The types for MigrationConfig have optional fields that may conflict with strict type checks. Ensure to import types using 'import type'.
fix
Use `import type { MigrationConfig } from 'migration-hris'` instead of runtime import.
affects: >=1.0.159
Errors
Common errors & fixes
ERR_REQUIRE_ESM: require() of ES Module /path/to/node_modules/migration-hris/index.js not supported.
The library is ESM-only, but the importing project uses CommonJS (require).
fix
Switch to dynamic import: const { migrateHRIS } = await import('migration-hris'); or convert project to ESM.
Missing required argument 'connection'
Call to migrateHRIS with only config object (old API).
fix
Provide both connection and config: migrateHRIS(connection, config).
Cannot find module 'migration-hris'
Package not installed or typo in package name.
fix
Run npm install migration-hris@1.0.159 and ensure package.json includes it.
TypeError: (0 , _migrationHris.migrateHRIS) is not a function
Importing incorrectly (e.g., default import for named export).
fix
Use correct named import: import { migrateHRIS } from 'migration-hris'.
Upgrade
Version history
1.0.159latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
Resources
migration-hris — npm install migration-hris · libregistry