@openpkg-ts/extract 0.23.1 → 0.23.2

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/dist/bin/tspec.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  extract
4
- } from "../shared/chunk-qwkv7jxy.js";
4
+ } from "../shared/chunk-8898fs2f.js";
5
5
 
6
6
  // src/cli/spec.ts
7
7
  import * as fs from "node:fs";
@@ -1015,6 +1015,7 @@ function serializeClass(node, ctx) {
1015
1015
  const name = symbol?.getName() ?? node.name?.getText();
1016
1016
  if (!name)
1017
1017
  return null;
1018
+ const deprecated = isSymbolDeprecated(symbol);
1018
1019
  const declSourceFile = node.getSourceFile();
1019
1020
  const { description, tags, examples } = getJSDocComment(node);
1020
1021
  const source = getSourceLocation(node, declSourceFile);
@@ -1070,6 +1071,7 @@ function serializeClass(node, ctx) {
1070
1071
  signatures: signatures.length > 0 ? signatures : undefined,
1071
1072
  extends: extendsClause,
1072
1073
  implements: implementsClause?.length ? implementsClause : undefined,
1074
+ ...deprecated ? { deprecated: true } : {},
1073
1075
  ...examples.length > 0 ? { examples } : {}
1074
1076
  };
1075
1077
  }
@@ -1245,6 +1247,7 @@ function serializeEnum(node, ctx) {
1245
1247
  const name = symbol?.getName() ?? node.name?.getText();
1246
1248
  if (!name)
1247
1249
  return null;
1250
+ const deprecated = isSymbolDeprecated(symbol);
1248
1251
  const declSourceFile = node.getSourceFile();
1249
1252
  const { description, tags, examples } = getJSDocComment(node);
1250
1253
  const source = getSourceLocation(node, declSourceFile);
@@ -1277,6 +1280,7 @@ function serializeEnum(node, ctx) {
1277
1280
  tags,
1278
1281
  source,
1279
1282
  members,
1283
+ ...deprecated ? { deprecated: true } : {},
1280
1284
  ...examples.length > 0 ? { examples } : {}
1281
1285
  };
1282
1286
  }
@@ -1287,6 +1291,7 @@ function serializeFunctionExport(node, ctx) {
1287
1291
  const name = symbol?.getName() ?? node.name?.getText();
1288
1292
  if (!name)
1289
1293
  return null;
1294
+ const deprecated = isSymbolDeprecated(symbol);
1290
1295
  const declSourceFile = node.getSourceFile();
1291
1296
  const { description, tags, examples } = getJSDocComment(node);
1292
1297
  const source = getSourceLocation(node, declSourceFile);
@@ -1313,6 +1318,7 @@ function serializeFunctionExport(node, ctx) {
1313
1318
  source,
1314
1319
  typeParameters,
1315
1320
  signatures,
1321
+ ...deprecated ? { deprecated: true } : {},
1316
1322
  ...examples.length > 0 ? { examples } : {}
1317
1323
  };
1318
1324
  }
@@ -1325,6 +1331,7 @@ function serializeInterface(node, ctx) {
1325
1331
  const name = symbol?.getName() ?? node.name?.getText();
1326
1332
  if (!name)
1327
1333
  return null;
1334
+ const deprecated = isSymbolDeprecated(symbol);
1328
1335
  const declSourceFile = node.getSourceFile();
1329
1336
  const { description, tags, examples } = getJSDocComment(node);
1330
1337
  const source = getSourceLocation(node, declSourceFile);
@@ -1365,6 +1372,7 @@ function serializeInterface(node, ctx) {
1365
1372
  typeParameters,
1366
1373
  members: members.length > 0 ? members : undefined,
1367
1374
  extends: extendsClause,
1375
+ ...deprecated ? { deprecated: true } : {},
1368
1376
  ...examples.length > 0 ? { examples } : {}
1369
1377
  };
1370
1378
  }
@@ -1484,6 +1492,7 @@ function serializeTypeAlias(node, ctx) {
1484
1492
  const name = symbol?.getName() ?? node.name?.getText();
1485
1493
  if (!name)
1486
1494
  return null;
1495
+ const deprecated = isSymbolDeprecated(symbol);
1487
1496
  const declSourceFile = node.getSourceFile();
1488
1497
  const { description, tags, examples } = getJSDocComment(node);
1489
1498
  const source = getSourceLocation(node, declSourceFile);
@@ -1500,6 +1509,7 @@ function serializeTypeAlias(node, ctx) {
1500
1509
  source,
1501
1510
  typeParameters,
1502
1511
  schema,
1512
+ ...deprecated ? { deprecated: true } : {},
1503
1513
  ...examples.length > 0 ? { examples } : {}
1504
1514
  };
1505
1515
  }
@@ -1673,6 +1683,7 @@ function serializeVariable(node, statement, ctx) {
1673
1683
  const name = symbol?.getName() ?? node.name.getText();
1674
1684
  if (!name)
1675
1685
  return null;
1686
+ const deprecated = isSymbolDeprecated(symbol);
1676
1687
  const declSourceFile = node.getSourceFile();
1677
1688
  const { description, tags, examples } = getJSDocComment(statement);
1678
1689
  const source = getSourceLocation(node, declSourceFile);
@@ -1694,6 +1705,7 @@ function serializeVariable(node, statement, ctx) {
1694
1705
  source,
1695
1706
  schema,
1696
1707
  ...flags ? { flags } : {},
1708
+ ...deprecated ? { deprecated: true } : {},
1697
1709
  ...examples.length > 0 ? { examples } : {}
1698
1710
  };
1699
1711
  }
package/dist/src/index.js CHANGED
@@ -46,7 +46,7 @@ import {
46
46
  valibotAdapter,
47
47
  withDescription,
48
48
  zodAdapter
49
- } from "../shared/chunk-qwkv7jxy.js";
49
+ } from "../shared/chunk-8898fs2f.js";
50
50
  // src/types/utils.ts
51
51
  function isExported(node) {
52
52
  const modifiers = node.modifiers;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpkg-ts/extract",
3
- "version": "0.23.1",
3
+ "version": "0.23.2",
4
4
  "description": "TypeScript export extraction to OpenPkg spec",
5
5
  "keywords": [
6
6
  "openpkg",