orchid-orm 1.5.4 → 1.5.5

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,5 +1,11 @@
1
1
  # orchid-orm
2
2
 
3
+ ## 1.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - ESM support for orm
8
+
3
9
  ## 1.5.4
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -30,6 +30,7 @@ function _interopNamespace(e) {
30
30
  var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
31
31
  var path__namespace = /*#__PURE__*/_interopNamespace(path);
32
32
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
33
+ var typescript__default = /*#__PURE__*/_interopDefaultLegacy(typescript);
33
34
 
34
35
  const createBaseTable = (options) => {
35
36
  return class BaseTable {
@@ -1446,6 +1447,7 @@ class FileChanges {
1446
1447
  }
1447
1448
  }
1448
1449
 
1450
+ const { createSourceFile, ScriptTarget, SyntaxKind } = typescript__default["default"];
1449
1451
  const iterate = (kind) => {
1450
1452
  return function* (statements) {
1451
1453
  for (const node of statements) {
@@ -1462,47 +1464,47 @@ const isNode = (kind) => {
1462
1464
  };
1463
1465
  const ts = {
1464
1466
  getStatements(content) {
1465
- const { statements } = typescript.createSourceFile(
1467
+ const { statements } = createSourceFile(
1466
1468
  "file.ts",
1467
1469
  content,
1468
- typescript.ScriptTarget.Latest,
1470
+ ScriptTarget.Latest,
1469
1471
  true
1470
1472
  );
1471
1473
  return statements;
1472
1474
  },
1473
1475
  is: {
1474
- call: isNode(typescript.SyntaxKind.CallExpression),
1476
+ call: isNode(SyntaxKind.CallExpression),
1475
1477
  objectLiteral: isNode(
1476
- typescript.SyntaxKind.ObjectLiteralExpression
1478
+ SyntaxKind.ObjectLiteralExpression
1477
1479
  ),
1478
1480
  propertyAssignment: isNode(
1479
- typescript.SyntaxKind.PropertyAssignment
1481
+ SyntaxKind.PropertyAssignment
1480
1482
  ),
1481
1483
  shorthandPropertyAssignment: isNode(
1482
- typescript.SyntaxKind.ShorthandPropertyAssignment
1484
+ SyntaxKind.ShorthandPropertyAssignment
1483
1485
  ),
1484
- identifier: isNode(typescript.SyntaxKind.Identifier),
1485
- stringLiteral: isNode(typescript.SyntaxKind.StringLiteral),
1486
+ identifier: isNode(SyntaxKind.Identifier),
1487
+ stringLiteral: isNode(SyntaxKind.StringLiteral),
1486
1488
  arrayLiteral: isNode(
1487
- typescript.SyntaxKind.ArrayLiteralExpression
1489
+ SyntaxKind.ArrayLiteralExpression
1488
1490
  ),
1489
- numericLiteral: isNode(typescript.SyntaxKind.NumericLiteral),
1491
+ numericLiteral: isNode(SyntaxKind.NumericLiteral),
1490
1492
  computedPropertyName: isNode(
1491
- typescript.SyntaxKind.ComputedPropertyName
1493
+ SyntaxKind.ComputedPropertyName
1492
1494
  ),
1493
- privateIdentifier: isNode(typescript.SyntaxKind.PrivateIdentifier),
1494
- this: isNode(typescript.SyntaxKind.ThisKeyword),
1495
+ privateIdentifier: isNode(SyntaxKind.PrivateIdentifier),
1496
+ this: isNode(SyntaxKind.ThisKeyword),
1495
1497
  propertyAccess: isNode(
1496
- typescript.SyntaxKind.PropertyAccessExpression
1498
+ SyntaxKind.PropertyAccessExpression
1497
1499
  ),
1498
- arrowFunction: isNode(typescript.SyntaxKind.ArrowFunction),
1500
+ arrowFunction: isNode(SyntaxKind.ArrowFunction),
1499
1501
  parenthesizedExpression: isNode(
1500
- typescript.SyntaxKind.ParenthesizedExpression
1502
+ SyntaxKind.ParenthesizedExpression
1501
1503
  ),
1502
- spreadAssignment: isNode(typescript.SyntaxKind.SpreadAssignment)
1504
+ spreadAssignment: isNode(SyntaxKind.SpreadAssignment)
1503
1505
  },
1504
1506
  import: {
1505
- iterate: iterate(typescript.SyntaxKind.ImportDeclaration),
1507
+ iterate: iterate(SyntaxKind.ImportDeclaration),
1506
1508
  *iterateWithSource(statements, path) {
1507
1509
  for (const node of ts.import.iterate(statements)) {
1508
1510
  if (ts.import.getSource(node) !== path)
@@ -1544,7 +1546,7 @@ const ts = {
1544
1546
  }
1545
1547
  },
1546
1548
  variable: {
1547
- iterate: iterate(typescript.SyntaxKind.VariableStatement),
1549
+ iterate: iterate(SyntaxKind.VariableStatement),
1548
1550
  *iterateDeclarations(statements) {
1549
1551
  for (const node of ts.variable.iterate(statements)) {
1550
1552
  for (const dec of node.declarationList.declarations) {
@@ -1554,7 +1556,7 @@ const ts = {
1554
1556
  }
1555
1557
  },
1556
1558
  class: {
1557
- iterate: iterate(typescript.SyntaxKind.ClassDeclaration)
1559
+ iterate: iterate(SyntaxKind.ClassDeclaration)
1558
1560
  },
1559
1561
  prop: {
1560
1562
  getName({ name }) {