@mikro-orm/entity-generator 7.2.6-dev.38 → 7.2.6-dev.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/SourceFile.js +2 -1
  2. package/package.json +3 -3
package/SourceFile.js CHANGED
@@ -736,7 +736,8 @@ export class SourceFile {
736
736
  if (typeof prop.defaultRaw !== 'undefined' &&
737
737
  prop.defaultRaw !== 'null' &&
738
738
  prop.defaultRaw !== '' &&
739
- prop.defaultRaw !== (typeof prop.default === 'string' ? this.quote(prop.default) : `${prop.default}`)) {
739
+ prop.defaultRaw !==
740
+ (typeof prop.default === 'string' ? `'${prop.default.replaceAll("'", "''")}'` : `${prop.default}`)) {
740
741
  // kept as a template literal for readability, but raw SQL may contain `${`, which would otherwise interpolate
741
742
  options.defaultRaw = `\`${prop.defaultRaw.replaceAll('\\', '\\\\').replaceAll('`', '\\`').replaceAll('${', '\\${')}\``;
742
743
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/entity-generator",
3
- "version": "7.2.6-dev.38",
3
+ "version": "7.2.6-dev.39",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "keywords": [
6
6
  "data-mapper",
@@ -47,13 +47,13 @@
47
47
  "copy": "node ../../scripts/copy.mjs"
48
48
  },
49
49
  "dependencies": {
50
- "@mikro-orm/sql": "7.2.6-dev.38"
50
+ "@mikro-orm/sql": "7.2.6-dev.39"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@mikro-orm/core": "^7.2.5"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.2.6-dev.38"
56
+ "@mikro-orm/core": "7.2.6-dev.39"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"