@alpha.consultings/eloquent-orm.js 1.0.9 → 1.0.10
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [1.0.10](https://github.com/MetalDz/Eloquent-ORM.js/compare/v1.0.9...v1.0.10) (2026-03-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* make latest release summary mdx-safe for docs lint ([a4149bd](https://github.com/MetalDz/Eloquent-ORM.js/commit/a4149bd672972ed952c2e1d7d4092214d64ca058))
|
|
7
|
+
* support nodenext local ts imports in cli ts runtime ([27d383e](https://github.com/MetalDz/Eloquent-ORM.js/commit/27d383e547034d5ab1978872af167e15abe36376))
|
|
8
|
+
|
|
1
9
|
## [1.0.9](https://github.com/MetalDz/Eloquent-ORM.js/compare/v1.0.8...v1.0.9) (2026-03-28)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Package Update Summary
|
|
2
2
|
|
|
3
|
-
Version: `1.0.
|
|
3
|
+
Version: `1.0.10`
|
|
4
4
|
|
|
5
5
|
This file is the source of truth for the release-focused quick info block that appears in `README.md`.
|
|
6
6
|
|
|
@@ -14,12 +14,18 @@ npm run docs:sync-package-metadata
|
|
|
14
14
|
|
|
15
15
|
<!-- release-lineup:start -->
|
|
16
16
|
Latest Release:
|
|
17
|
-
- `v1.0.
|
|
17
|
+
- `v1.0.10 latest`
|
|
18
18
|
|
|
19
19
|
Old Release:
|
|
20
|
-
- `v1.0.
|
|
20
|
+
- `v1.0.9`
|
|
21
21
|
<!-- release-lineup:end -->
|
|
22
22
|
|
|
23
|
+
## Latest Release Headline
|
|
24
|
+
|
|
25
|
+
<!-- latest-package-headline:start -->
|
|
26
|
+
- Patched. Added an ESM-safe package entry for NodeNext consumers and stabilized CommonJS `Factory` export behavior.
|
|
27
|
+
<!-- latest-package-headline:end -->
|
|
28
|
+
|
|
23
29
|
## Latest Release Summary
|
|
24
30
|
|
|
25
31
|
<!-- latest-package-update:start -->
|
|
@@ -31,10 +37,10 @@ Old Release:
|
|
|
31
37
|
<!-- package-quick-info:start -->
|
|
32
38
|
Quick info:
|
|
33
39
|
- Package: `@alpha.consultings/eloquent-orm.js`
|
|
34
|
-
- Version: `v1.0.
|
|
35
|
-
- Latest release: `v1.0.
|
|
36
|
-
- What's new:
|
|
37
|
-
- Old release: `v1.0.
|
|
40
|
+
- Version: `v1.0.10`
|
|
41
|
+
- Latest release: `v1.0.10 latest`
|
|
42
|
+
- What's new: [Patched. Added an ESM-safe package entry for NodeNext consumers and stabilized CommonJS `Factory` export behavior.](https://alphaconsultings.mintlify.app/release/latest-release-summary)
|
|
43
|
+
- Old release: `v1.0.9`
|
|
38
44
|
- Latest update: Add an ESM-safe package entry for NodeNext consumers, keep CommonJS root imports from eagerly loading `Factory`, and verify installed-package ESM imports in pack-smoke.
|
|
39
45
|
- Official docs: https://alphaconsultings.mintlify.app
|
|
40
46
|
- Quick start: https://alphaconsultings.mintlify.app/getting-started/quick-start
|
|
@@ -44,6 +50,7 @@ Quick info:
|
|
|
44
50
|
|
|
45
51
|
## Update Rule
|
|
46
52
|
|
|
53
|
+
- Refresh the `latest-package-headline` summary on every fix, minor, or major release.
|
|
47
54
|
- Refresh the `latest-package-update` summary on every fix, minor, or major release.
|
|
48
|
-
- Keep the
|
|
49
|
-
- Let the sync script refresh package name, version, docs URL, and
|
|
55
|
+
- Keep the headline short and linkable, and keep the detailed update exact and release-specific.
|
|
56
|
+
- Let the sync script refresh package name, version, docs URL, README output, and the latest release summary docs page.
|
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ Laravel-inspired ORM + CLI for Node.js + TypeScript with SQL and MongoDB runtime
|
|
|
17
17
|
<!-- package-quick-info:start -->
|
|
18
18
|
Quick info:
|
|
19
19
|
- Package: `@alpha.consultings/eloquent-orm.js`
|
|
20
|
-
- Version: `v1.0.
|
|
21
|
-
- Latest release: `v1.0.
|
|
22
|
-
- What's new:
|
|
23
|
-
- Old release: `v1.0.
|
|
20
|
+
- Version: `v1.0.10`
|
|
21
|
+
- Latest release: `v1.0.10 latest`
|
|
22
|
+
- What's new: [Patched. Added an ESM-safe package entry for NodeNext consumers and stabilized CommonJS `Factory` export behavior.](https://alphaconsultings.mintlify.app/release/latest-release-summary)
|
|
23
|
+
- Old release: `v1.0.9`
|
|
24
24
|
- Latest update: Add an ESM-safe package entry for NodeNext consumers, keep CommonJS root imports from eagerly loading `Factory`, and verify installed-package ESM imports in pack-smoke.
|
|
25
25
|
- Official docs: https://alphaconsultings.mintlify.app
|
|
26
26
|
- Quick start: https://alphaconsultings.mintlify.app/getting-started/quick-start
|
|
@@ -186,6 +186,7 @@ async function makeMigration(modelName, options = {}) {
|
|
|
186
186
|
}
|
|
187
187
|
const loadedModels = [];
|
|
188
188
|
const pendingPivotMigrations = new Map();
|
|
189
|
+
const failedFiles = new Set();
|
|
189
190
|
const timestampSeed = new Date()
|
|
190
191
|
.toISOString()
|
|
191
192
|
.replace(/[-:.TZ]/g, "")
|
|
@@ -227,6 +228,7 @@ async function makeMigration(modelName, options = {}) {
|
|
|
227
228
|
});
|
|
228
229
|
}
|
|
229
230
|
catch (err) {
|
|
231
|
+
failedFiles.add(file);
|
|
230
232
|
console.error(chalk_1.default.red(`ERROR: Error processing ${file}:`));
|
|
231
233
|
console.error(err instanceof Error ? err.message : err);
|
|
232
234
|
}
|
|
@@ -454,6 +456,7 @@ export async function down(db: { query(sql: string): Promise<void> }) {
|
|
|
454
456
|
}
|
|
455
457
|
}
|
|
456
458
|
catch (err) {
|
|
459
|
+
failedFiles.add(file);
|
|
457
460
|
console.error(chalk_1.default.red(`ERROR: Error processing ${file}:`));
|
|
458
461
|
console.error(err instanceof Error ? err.message : err);
|
|
459
462
|
}
|
|
@@ -488,6 +491,16 @@ export async function down(db: { query(sql: string): Promise<void> }) {
|
|
|
488
491
|
catch {
|
|
489
492
|
console.warn(chalk_1.default.yellow("WARN: Could not close DB connections cleanly."));
|
|
490
493
|
}
|
|
494
|
+
if (failedFiles.size > 0) {
|
|
495
|
+
const failureSummary = `ERROR: Migration generation failed for ${failedFiles.size} model` +
|
|
496
|
+
`${failedFiles.size === 1 ? "" : "s"}: ${[...failedFiles].join(", ")}`;
|
|
497
|
+
console.error(chalk_1.default.red(failureSummary));
|
|
498
|
+
if (options.exit !== false) {
|
|
499
|
+
process.exit(1);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
throw new Error(failureSummary);
|
|
503
|
+
}
|
|
491
504
|
console.log(chalk_1.default.cyanBright(`OK: Migration generation complete in ${isTest ? "TEST" : "DEVELOPMENT"} mode.\n`));
|
|
492
505
|
if (options.exit !== false) {
|
|
493
506
|
process.exit(0);
|
|
@@ -23,13 +23,42 @@ const PACKAGE_NAME = (() => {
|
|
|
23
23
|
}
|
|
24
24
|
})();
|
|
25
25
|
function resolveExistingModulePath(basePath) {
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
const extension = path_1.default.extname(basePath).toLowerCase();
|
|
27
|
+
const withoutExtension = extension.length > 0 ? basePath.slice(0, -extension.length) : basePath;
|
|
28
|
+
const candidates = [];
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
const addCandidate = (candidate) => {
|
|
31
|
+
if (seen.has(candidate)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
seen.add(candidate);
|
|
35
|
+
candidates.push(candidate);
|
|
36
|
+
};
|
|
37
|
+
if (extension === ".js" || extension === ".mjs" || extension === ".cjs") {
|
|
38
|
+
// NodeNext TypeScript source commonly imports local modules using `.js`
|
|
39
|
+
// specifiers even though the source file on disk is `.ts`.
|
|
40
|
+
addCandidate(`${withoutExtension}.ts`);
|
|
41
|
+
addCandidate(`${withoutExtension}.tsx`);
|
|
42
|
+
addCandidate(`${withoutExtension}.mts`);
|
|
43
|
+
addCandidate(`${withoutExtension}.cts`);
|
|
44
|
+
}
|
|
45
|
+
addCandidate(basePath);
|
|
46
|
+
if (!extension) {
|
|
47
|
+
addCandidate(`${basePath}.ts`);
|
|
48
|
+
addCandidate(`${basePath}.tsx`);
|
|
49
|
+
addCandidate(`${basePath}.mts`);
|
|
50
|
+
addCandidate(`${basePath}.cts`);
|
|
51
|
+
addCandidate(`${basePath}.js`);
|
|
52
|
+
addCandidate(`${basePath}.mjs`);
|
|
53
|
+
addCandidate(`${basePath}.cjs`);
|
|
54
|
+
addCandidate(path_1.default.join(basePath, "index.ts"));
|
|
55
|
+
addCandidate(path_1.default.join(basePath, "index.tsx"));
|
|
56
|
+
addCandidate(path_1.default.join(basePath, "index.mts"));
|
|
57
|
+
addCandidate(path_1.default.join(basePath, "index.cts"));
|
|
58
|
+
addCandidate(path_1.default.join(basePath, "index.js"));
|
|
59
|
+
addCandidate(path_1.default.join(basePath, "index.mjs"));
|
|
60
|
+
addCandidate(path_1.default.join(basePath, "index.cjs"));
|
|
61
|
+
}
|
|
33
62
|
return candidates.find((candidate) => fs_1.default.existsSync(candidate)) ?? null;
|
|
34
63
|
}
|
|
35
64
|
function resolveLocalRequest(request, fromFilePath) {
|
package/package.json
CHANGED