uql-codemod 0.46.0 → 0.47.1

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.
@@ -5,10 +5,7 @@ export type TsconfigResult = {
5
5
  readonly unresolved: readonly string[];
6
6
  };
7
7
  /**
8
- * Rewrites a `tsconfig.json` for the standard decorator spec.
9
- *
10
- * Edited as text through `ts.parseJsonText`, not by reading and re-serialising: a tsconfig is JSON with
11
- * comments and someone's formatting, and rewriting the whole file to change two lines would throw both
12
- * away.
8
+ * Rewrites a `tsconfig.json` for the standard decorator spec, as text through `ts.parseJsonText` rather than
9
+ * re-serialised: a tsconfig is JSON with comments and someone's formatting, which a rewrite would throw away.
13
10
  */
14
11
  export declare function transformTsconfig(fileName: string, text: string): TsconfigResult;
package/dist/tsconfig.js CHANGED
@@ -1,13 +1,11 @@
1
1
  import ts from 'typescript';
2
2
  import { applyEdits, removeFromList } from './edits.js';
3
+ import { propertyAssignment, propertyValue } from './syntax.js';
3
4
  /** The flags the standard spec has no use for. Their presence is what keeps a project on the old one. */
4
5
  const LEGACY_FLAGS = ['experimentalDecorators', 'emitDecoratorMetadata'];
5
6
  /**
6
- * Rewrites a `tsconfig.json` for the standard decorator spec.
7
- *
8
- * Edited as text through `ts.parseJsonText`, not by reading and re-serialising: a tsconfig is JSON with
9
- * comments and someone's formatting, and rewriting the whole file to change two lines would throw both
10
- * away.
7
+ * Rewrites a `tsconfig.json` for the standard decorator spec, as text through `ts.parseJsonText` rather than
8
+ * re-serialised: a tsconfig is JSON with comments and someone's formatting, which a rewrite would throw away.
11
9
  */
12
10
  export function transformTsconfig(fileName, text) {
13
11
  const source = ts.parseJsonText(fileName, text);
@@ -40,9 +38,3 @@ export function transformTsconfig(fileName, text) {
40
38
  }
41
39
  return { text: applyEdits(text, edits), changed: edits.length > 0, unresolved };
42
40
  }
43
- function propertyAssignment(object, name) {
44
- return object.properties.find((property) => ts.isPropertyAssignment(property) && ts.isStringLiteral(property.name) && property.name.text === name);
45
- }
46
- function propertyValue(object, name) {
47
- return propertyAssignment(object, name)?.initializer;
48
- }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uql-codemod",
3
3
  "description": "Upgrade uql-orm across versions that introduce breaking changes",
4
4
  "license": "MIT",
5
- "version": "0.46.0",
5
+ "version": "0.47.1",
6
6
  "type": "module",
7
7
  "engines": {
8
8
  "node": ">=24"