Registry / database / screwdriver-datastore-sequelize

screwdriver-datastore-sequelize

JSON →
library10.1.1jsnpmunverified

A datastore implementation for MySQL, PostgreSQL, SQLite3, and MSSQL, built on top of Sequelize ORM. Version 10.1.1 is the latest stable release, updated roughly monthly. It provides a consistent interface for Screwdriver CD pipelines across multiple SQL databases, abstracting dialect-specific details. Key differentiators include integration with the Screwdriver ecosystem and support for all major SQL dialects via Sequelize.

npm install screwdriver-datastore-sequelize
INSTALL
IMPORT
SIG · SCREWDRIVER-DATAST
S
screwdriver-datastore-sequelize
databasejavascriptv10.1.1
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.

Sequelize
import Sequelize from 'screwdriver-datastore-sequelize'
const Sequelize = require('screwdriver-datastore-sequelize')
Package is ESM-only since v10; CommonJS require() will not work.
default
import Sequelize from 'screwdriver-datastore-sequelize'
import { Sequelize } from 'screwdriver-datastore-sequelize'
The package exports a single default constructor; named import is incorrect.
Sequelize type
import type Sequelize from 'screwdriver-datastore-sequelize'
TypeScript users can import the type for annotations.

Shows how to instantiate the datastore with environment variables and test the connection.

import Sequelize from 'screwdriver-datastore-sequelize'; import dotenv from 'dotenv'; dotenv.config(); const datastore = new Sequelize({ dialect: process.env.SQL_DIALECT ?? 'postgres', database: process.env.SQL_DATABASE ?? 'testdb', username: process.env.SQL_USERNAME ?? 'testuser', password: process.env.SQL_PASSWORD ?? '', host: process.env.SQL_HOST ?? 'localhost', port: parseInt(process.env.SQL_PORT ?? '5432', 10), }); (async () => { try { await datastore.ping(); console.log('Connected successfully'); } catch (err) { console.error('Connection failed:', err); } })();
Debug
Known issues
breakingVersion 10.0.0 migrated to ESM-only; CommonJS require() no longer works.
fix
Use import instead of require(), or downgrade to v9 if CJS is required.
affects: >=10.0.0
breakingConstructor now requires dialect explicitly; no longer defaults to postgres.
fix
Pass `dialect` in config object (e.g., 'postgres', 'mysql', 'sqlite', 'mssql').
affects: >=10.0.0
deprecatedThe `ping` method may be removed in future major versions in favor of Sequelize's authenticate().
fix
Use `datastore.sequelize.authenticate()` instead.
affects: >=10.0.0
gotchaIncorrect dialect name (e.g., 'postgre' instead of 'postgres') causes cryptic Sequelize errors.
fix
Use exact dialect strings: 'mysql', 'postgres', 'sqlite', 'mssql'.
affects: *
gotchaLeaving password empty may cause authentication failures on MySQL/MSSQL.
fix
Always provide a password or configure auth method appropriately.
affects: *
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Using require() on an ESM-only package.
fix
Replace require with import, or set type: module in package.json.
SequelizeConnectionRefusedError: connect ECONNREFUSED
Database host/port incorrect or service not running.
fix
Check SQL_HOST and SQL_PORT environment variables, and ensure DB service is accessible.
SequelizeDialectNotInstalledError: Please install 'pg' module
Missing database driver for PostgreSQL.
fix
npm install pg for postgres, mysql2 for MySQL, etc.
TypeError: Sequelize is not a constructor
Named import instead of default import.
fix
Use `import Sequelize from 'screwdriver-datastore-sequelize'` without curly braces.
Upgrade
Version history
10.1.1latest on npm
Audit
Dependencies
sequelizerequiredCore ORM dependency used for database interactions
Agent activity
9 hits · last 30 days
node
8
Meta
1
Resources
screwdriver-datastore-sequelize — npm install screwdriver-datastore-sequelize · libregistry