Comments (7)
The external typings should not be used with v3. Just remove the dependency.
from umzug.
Just tried what you suggested:
This is the code import statement and below are the compilation errors.
import { Migration, Umzug, UpDownMigrationsOptions } from 'umzug';
Building Node Server
server/db/dbMgmt/ormFactory.ts:3:10 - error TS2724: '"umzug"' has no exported member named 'Migration'. Did you mean 'MigrationFn'?
3 import { Migration, Umzug, UpDownMigrationsOptions } from 'umzug';
~~~~~~~~~
server/db/dbMgmt/ormFactory.ts:3:28 - error TS2305: Module '"umzug"' has no exported member 'UpDownMigrationsOptions'.
3 import { Migration, Umzug, UpDownMigrationsOptions } from 'umzug';
~~~~~~~~~~~~~~~~~~~~~~~
server/services/db-admin.handlers.ts:5:10 - error TS2305: Module '"umzug"' has no exported member 'UpDownMigrationsOptions'.
5 import { UpDownMigrationsOptions } from 'umzug';
~~~~~~~~~~~~~~~~~~~~~~~
from umzug.
FYI - did use the npm ci option to ensure a rebuild of the node modules. Also tried several other V3 tags - V3.2.1 , V3.0.0 and the first beta... all give the same errors.
from umzug.
See the error: Module '"umzug"' has no exported member 'UpDownMigrationsOptions'.
. This is not an export of v3. I believe it also wasn't an official export of v2 - the types were originally maintained separately - so it's not documented in the migration guide. But, have a look at the readme to make sure you understand the differences between 2 and 3. If you'd like to add a note to the readme a PR would be welcome.
from umzug.
Not sure I understand - A primary public function in umzug V2 & V3 - is the method "up" as defined below:
up(options?: UpToOptions | UpDownMigrationsOptions): Promise<Migration[]>;
How am I to create a strongly typed options object "UpDownMigrationsOptions" to pass to the publicly defined method "up" if it is not exported?
Or is the intent of the library to remove the ability to supply options to the "up" method?
from umzug.
(Edited - sorry, I originally submitted partial message)
A primary public function in umzug V2 & V3 - is the method "up" as defined below:
up(options?: UpToOptions | UpDownMigrationsOptions): Promise<Migration[]>;
No it isn't:
Line 220 in 10ef28d
Unless I'm misunderstanding you? Where in V3 did you find that code?
from umzug.
Apologies - in the upgrade process, the old typings were not removed - causing my confusion.
from umzug.
Related Issues (20)
- Example migration not working HOT 5
- Alter colum or drop colum migration in SQLITE generates a new table without onUpdate and onDelete configurations HOT 2
- Migrate to ESM-first HOT 16
- Issue with identifying migration files as input to umzug instance HOT 1
- SequelizeStorage model uses options that are rejected by sequelize v7 + postgres et al HOT 5
- Breaking change in v3.3.0 HOT 5
- Migration timeouts HOT 1
- `RunAsCLI()` swallows exceptions HOT 4
- UP ALLOW not working correctly HOT 1
- Do not set charset and collate options on postgresql HOT 12
- mjs extension support HOT 1
- Snyk find issue in [email protected] > [email protected] > [email protected] HOT 2
- Update `type-fest` to `^4.10.2` to ensure compatibility with TypeScript 5.4 HOT 1
- Logging inside a migration script HOT 1
- TypeError: The "original" argument must be of type function. Received undefined HOT 6
- Glob v10 does not support Node 12 HOT 1
- bug: error with charset & collate in postgres with v7 HOT 2
- Only URLs with a scheme in: file, data, and node are supported by the default ESM loader
- Type 'ErrorWithCause' is not generic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umzug.