v7.0.0
New & Noteworthy
The core maintainer of this project moved to @Shinigami92 (also core maintainer of FakerJS and core member of Vite).
The project is and remains under the MIT license.
This version is a mostly compatible to v6.2.2, but (should) supports ESM in addition to CJS 🎉
If you found any bugs while moving from version v6.2.2 to version v7.0.0, please open an issue and report what was broken for you.
If you need to contact me somehow directly, you can do so on Mastodon @[email protected]
I (@Shinigami92) worked hard the last 1.5 month on refactoring node-pg-migrate
and I plan to convert the source code to ESM in the next major version. However I will need to drop support for Node <18 and TS <5 for that. So the next major version could potentially be released "quickly".
The code base is now stable to ship new features and fix more known bugs.
Here are the most important changes
- This release fixes some whitespace issues (dropColumns, createMaterializedView) as well as an invalid swapped operation type #1024.
- The minimum supported Node version is v16.18 and the minimum supported TypeScript version is 4.8 #998
Migration.create
does not accept the deprecated params anymore #1002
if you did not ignored the runtime warning, you should not be affected by this- The CLI is now TypeScript checked and therefore also got some slightly rework #1066
hopefully nothing broke - The internal
createSchemalize
function now uses options instead of two boolean args #1058
You should mostly not be affected by this, expect from extreme programmatic use-cases utils
got restructured #1053
this should not have changed anything from the usage- The
src
folder got a bit restructure, so you should only be affected by breaking changes if you use node-pg-migrate progammatically (not CLI) - When using
ts-node
,tsconfig.json
's'ts-node'
override is now respected (thx to @BriungRi) - The plain JS template now generates with JSDoc so you get improved autosuggestions (thx to @codermarcos)
- Remove dependencies to
mkdirp
#1102 anddecamilized
#1099 - Add JSDoc to
pgm
methods #1104 - Refactored some base files (renamed
migration-builder
tomigrationBuilder
) and usednode:*
imports #1101 - Throw error when using string expression and try infer drop constraint #1094
What's Changed
- infra: add codeowners file by @Shinigami92 in #958
- infra: add semantic pr validation by @Shinigami92 in #960
- infra: switch to pnpm by @Shinigami92 in #962
- infra: add ci pipeline by @Shinigami92 in #961
- infra: update license file by @Shinigami92 in #963
- infra: reorder package.json by @Shinigami92 in #964
- infra: reconfigure renovate by @Shinigami92 in #965
- infra: rename master to main by @Shinigami92 in #966
- infra: unit test via github action by @Shinigami92 in #967
- infra: integration test via github action by @Shinigami92 in #968
- infra: add clean and preflight scripts by @Shinigami92 in #969
- infra: remove lint-staged by @Shinigami92 in #970
- infra: remove codeql by @Shinigami92 in #971
- infra: upgrade prettier by @Shinigami92 in #972
- infra: upgrade eslint by @Shinigami92 in #973
- chore: organize pack output by @Shinigami92 in #974
- feat: support esm by @Shinigami92 in #975
- chore: enable consistent-type-imports by @Shinigami92 in #976
- chore: enable prefer-includes by @Shinigami92 in #977
- chore: enable no-confusing-void-expression by @Shinigami92 in #978
- infra: add publish workflow by @Shinigami92 in #979
- release: 7.0.0-alpha.0 by @Shinigami92 in #980
- chore: enable no-unnecessary-boolean-literal-compare by @Shinigami92 in #981
- chore: enable no-unnecessary-type-assertion by @Shinigami92 in #982
- chore: enable no-unused-vars by @Shinigami92 in #983
- chore: enable prefer-promise-reject-errors by @Shinigami92 in #984
- chore: enable require-await by @Shinigami92 in #985
- chore: enable no-implied-eval by @Shinigami92 in #986
- chore: enable throw-literal by @Shinigami92 in #987
- infra: add issue templates by @Shinigami92 in #988
- chore(deps): update devdependencies by @renovate in #989
- fix(deps): update dependency yargs to ~17.7.0 by @renovate in #991
- fix(deps): mark dependency @types/pg as optional peer dependency by @Shinigami92 in #996
- infra: add ts-check by @Shinigami92 in #997
- chore!: set min node to v16.18 and typescript to v4.8 by @Shinigami92 in #998
- chore: use export type by @Shinigami92 in #999
- infra: set editor configs by @Shinigami92 in #1000
- chore: manual formatting by @Shinigami92 in #1001
- refactor!: remove deprecated create params by @Shinigami92 in #1002
- refactor: use ts for bin by @Shinigami92 in #1003
- infra: remove specific tsconfig by @Shinigami92 in #1004
- test: switch to vitest by @Shinigami92 in #1005
- test: add domains unit tests by @Shinigami92 in #1007
- chore(deps): update dependency json5 to v2.2.3 by @Shinigami92 in #1008
- test: add extensions unit tests by @Shinigami92 in #1009
- test: indent domains tests by @Shinigami92 in #1010
- test: add functions unit tests by @Shinigami92 in #1011
- test: add indexes unit tests by @Shinigami92 in #1012
- infra: enable quotes by @Shinigami92 in #1013
- infra: add vitest coverage report by @Shinigami92 in #1015
- infra: use slugify-value by @Shinigami92 in #1016
- infra: use matrix.branch in report by @Shinigami92 in #1017
- infra: try sha for coverage by @Shinigami92 in #1018
- infra: try run-id for coverage by @Shinigami92 in #1019
- infra: file-coverage-mode all by @Shinigami92 in #1020
- test: add operators unit tests by @Shinigami92 in #1022
- test: add sql unit tests by @Shinigami92 in #1025
- test: add policies unit tests by @Shinigami92 in #1026
- chore(deps): update typescript-eslint to v7.1.1 by @renovate in #1028
- chore(deps): update dependency @types/node to v18.19.22 by @renovate in #1027
- chore(deps): lock file maintenance by @renovate in #995
- test: add roles unit tests by @Shinigami92 in #1029
- test: add schemas unit tests by @Shinigami92 in #1030
- test: add sequences unit tests by @Shinigami92 in #1031
- test: add tables unit tests by @Shinigami92 in #1032
- test: add columns unit tests by @Shinigami92 in #1033
- test: add constraints unit tests by @Shinigami92 in #1034
- test: add runner unit tests by @Shinigami92 in #1035
- test: add triggers unit tests by @Shinigami92 in #1036
- chore(deps): update pnpm to v8.15.5 by @renovate in #1038
- chore(deps): update dependency @types/node to v18.19.24 by @renovate in #1037
- chore(deps): update typescript-eslint to v7.2.0 by @renovate in #1039
- chore(deps): update vitest to v1.4.0 by @renovate in #1040
- test: add types unit tests by @Shinigami92 in #1042
- chore(deps): lock file maintenance by @renovate in #1041
- test: add more types unit tests by @Shinigami92 in #1043
- test: prefer toBe over toStrictEqual by @Shinigami92 in #1044
- test: add views unit tests by @Shinigami92 in #1045
- test: add materialized views unit tests by @Shinigami92 in #1050
- test: reorganize tests by @Shinigami92 in #1051
- chore(deps): update devdependencies by @renovate in #1047
- chore(deps): lock file maintenance by @renovate in #1049
- fix(operators)!: swap operator types by @Shinigami92 in #1024
- release: 7.0.0-alpha.1 by @Shinigami92 in #1052
- chore(utils): restructure utils by @Shinigami92 in #1053
- chore(utils): improve createTransformer by @Shinigami92 in #1054
- test(utils): enhance escapeValue by @Shinigami92 in #1055
- test(utils): enhance StringIdGenerator by @Shinigami92 in #1056
- chore(utils): allow immutable in utils types by @Shinigami92 in #1057
- refactor(utils): improve createSchemalize by @Shinigami92 in #1058
- test(utils): test utils formatLines by @Shinigami92 in #1059
- chore(utils): allow immutable in utils format by @Shinigami92 in #1060
- test(utils): test utils getMigrationTableSchema by @Shinigami92 in #1061
- chore(utils): allow immutable in utils getSchema by @Shinigami92 in #1062
- chore(utils): add shortcut to isPgLiteral by @Shinigami92 in #1063
- chore(utils): improve makeComment by @Shinigami92 in #1064
- infra: ts-check tests by @Shinigami92 in #1065
- chore(cli): cleanup cli by @Shinigami92 in #1066
- release: 7.0.0-alpha.2 by @Shinigami92 in #1067
- docs(cli): document all possible migration languages by @daniel-digital-innovation in #953
- docs(template): add JSDoc to js migration template by @codermarcos in #1068
- chore(deps): update pnpm to v8.15.6 by @renovate in #1069
- chore(deps): update devdependencies by @renovate in #1070
- chore(deps): update typescript-eslint to v7.5.0 by @renovate in #1048
- refactor(domains): reorganize operations domains by @Shinigami92 in #1072
- refactor(extensions): reorganize operations extensions by @Shinigami92 in #1073
- refactor(functions): reorganize operations functions by @Shinigami92 in #1074
- refactor(indexes): reorganize operations indexes by @Shinigami92 in #1075
- refactor(policies): reorganize operations policies by @Shinigami92 in #1076
- refactor(operators): reorganize operations operators by @Shinigami92 in #1077
- refactor(sql): reorganize operations sql by @Shinigami92 in #1078
- refactor(roles): reorganize operations roles by @Shinigami92 in #1079
- refactor(schemas): reorganize operations schemas by @Shinigami92 in #1080
- refactor(sequences): reorganize operations sequences by @Shinigami92 in #1081
- refactor(tables): reorganize operations tables by @Shinigami92 in #1082
- refactor(triggers): reorganize operations triggers by @Shinigami92 in #1083
- refactor(types): reorganize operations types by @Shinigami92 in #1084
- refactor(views): reorganize operations views by @Shinigami92 in #1085
- refactor(mViews): reorganize operations materialized views by @Shinigami92 in #1086
- refactor(pgLiteral): reorganize utils PgLiteral by @Shinigami92 in #1087
- feat: accept ts-node tsconfig overrides by @BriungRi in #929
- chore(deps): update typescript-eslint to v7.6.0 by @renovate in #1089
- chore(deps): update devdependencies by @renovate in #1088
- release: 7.0.0-alpha.3 by @Shinigami92 in #1090
- chore(deps): update all non-major dependencies by @renovate in #1092
- chore(deps): update vitest to v1.5.0 by @renovate in #1093
- chore(deps): lock file maintenance by @renovate in #1071
- fix(constraint)!: throw error on string expression by @Shinigami92 in #1094
- chore(deps): update pnpm to v9 by @renovate in #1096
- chore(deps): update typescript-eslint to v7.7.0 by @renovate in #1097
- chore(deps): lock file maintenance by @renovate in #1098
- chore: add Reversible type by @Shinigami92 in #1095
- refactor(deps): inline decamelize dependency by @Shinigami92 in #1099
- chore(deps): update pnpm to v9.0.2 by @renovate in #1100
- refactor!: refactor base files by @Shinigami92 in #1101
- refactor: use native mkdir recursive by @Shinigami92 in #1102
- docs: update README.md by @Shinigami92 in #1103
- docs: add JSDoc for pgm by @Shinigami92 in #1104
- infra: configure package-manager-strict by @Shinigami92 in #1105
- release: 7.0.0-alpha.4 by @Shinigami92 in #1106
- docs: update doc website by @Shinigami92 in #1107
- release: 7.0.0 by @Shinigami92 in #1108
New Contributors
- @daniel-digital-innovation made their first contribution in #953
- @codermarcos made their first contribution in #1068
- @BriungRi made their first contribution in #929
Full Changelog: v6.2.2...v7.0.0