oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
1.95k stars 94 forks source link

Bugfix/mikro orm knex upgrade #351

Closed knixeur closed 8 months ago

knixeur commented 1 year ago

Had to change where mikro-orm set names query is catch as it seems the new version does not execute it in a single query.

All unit tests passing both in master with knex 0 and mikro-orm 4 and with the new versions.

Relates to #270 #255 #313 #214 #361

knixeur commented 1 year ago

Thanks for the heads up @sangaman, I've updated the PR accordingly.

murbanowicz commented 11 months ago

@sangaman could you please approve workflows and get it released please as it's been reviewed and approved already?

sangaman commented 11 months ago

@sangaman could you please approve workflows and get it released please as it's been reviewed and approved already?

I wish I could, but I'm not a maintainer 😄. Maybe this repo isn't being maintained currently and ought to be transferred or forked, but I don't think I have the time/expertise to do that myself.

murbanowicz commented 11 months ago

@oguimbal ?

knixeur commented 11 months ago

Related https://github.com/oguimbal/pgsql-ast-parser/pull/140 to add SET NAMES 'utf8' support and avoid the ugly hack

knixeur commented 8 months ago

@oguimbal hey! glad to see you back! are you solving the conflicts or do you want me to do it? AST parser version should be bumped too to remove the ugly set names hack.

oguimbal commented 8 months ago

If you could resolve it, that would be great :)

knixeur commented 8 months ago

Done :)

Btw, I tried to remove the set names hack but it threw another error so I'll leave it until it can be fixed in the parser

oguimbal commented 8 months ago

thanks.

see my comment on #377

oguimbal commented 8 months ago

Not sure why the tests did not pass for node 14 though ?

knixeur commented 8 months ago

That's weird, I've just tested locally and seems to work fine.

❯ node --version
v14.21.3
❯ npm test

> pg-mem@2.7.4 test /home/gb/projects/gpb/pg-mem
> mochapack src/**/*.spec.ts --webpack-config ./tools/webpack.config.js

 WEBPACK  Compiling...

  [=========================] 100% (completed)

 WEBPACK  Compiled successfully in 7226ms

 MOCHA  Testing...
...
...
  792 passing (5s)
  25 pending

 MOCHA  Tests completed successfully
knixeur commented 8 months ago

And... reproduced... I did the same test but deleted node_modules and package-lock.json and did npm install same node version v14.21.3

 MOCHA  Tests completed with 464 failure(s)

Considering neither Node 14/16 are supported maybe it's time to bump it? https://nodejs.org/en/about/previous-releases

knixeur commented 8 months ago

Resolved in #377 integrating ast parser change