@travetto/transformer 2.1.0 → 2.1.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@travetto/transformer",
3
3
  "displayName": "Transformation",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "description": "Functionality for AST transformations, with transformer registration, and general utils",
6
6
  "keywords": [
7
7
  "typescript",
@@ -25,7 +25,7 @@
25
25
  "directory": "module/transformer"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/base": "^2.1.0"
28
+ "@travetto/base": "^2.1.1"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"
package/src/visitor.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as ts from 'typescript';
2
- import * as fs from 'fs';
2
+ import { createWriteStream } from 'fs';
3
3
 
4
4
  import { ConsoleManager } from '@travetto/base/src/console';
5
5
  import { AppCache } from '@travetto/boot';
@@ -85,7 +85,7 @@ export class VisitorFactory<S extends State = State> {
85
85
  return (context: ts.TransformationContext) => (file: ts.SourceFile): ts.SourceFile => {
86
86
  try {
87
87
  const c = new console.Console({
88
- stdout: fs.createWriteStream(AppCache.toEntryName(this.#logTarget), { flags: 'a' }),
88
+ stdout: createWriteStream(AppCache.toEntryName(this.#logTarget), { flags: 'a' }),
89
89
  inspectOptions: { depth: 4 },
90
90
  });
91
91
 
@@ -1,5 +1,5 @@
1
1
  import * as ts from 'typescript';
2
- import * as fs from 'fs';
2
+ import { readFileSync } from 'fs';
3
3
 
4
4
  import { FsUtil, ScanFs } from '@travetto/boot';
5
5
  import { Util } from '@travetto/base';
@@ -7,9 +7,9 @@ import { Util } from '@travetto/base';
7
7
  import { VisitorFactory, TransformerState, getAllTransformers } from '..';
8
8
 
9
9
  /**
10
- * Utils for testing transformerse
10
+ * Utils for testing transformers
11
11
  */
12
- export class TranformerTestUtil {
12
+ export class TransformerTestUtil {
13
13
  /**
14
14
  * Compile a single file from a folder
15
15
  */
@@ -47,7 +47,7 @@ export class TranformerTestUtil {
47
47
 
48
48
  await Util.wait('1s'); // Wait for file buffer to sync
49
49
  try {
50
- console.info(fs.readFileSync(log, 'utf8'));
50
+ console.info(readFileSync(log, 'utf8'));
51
51
  } catch { }
52
52
 
53
53
  await FsUtil.unlinkRecursive(log);