Skip to content

Commit

Permalink
fix: add explicit import of performance to fix bazel compatibility is…
Browse files Browse the repository at this point in the history
…sues (#1772)

* fix: add explicit import of performance to fix bazel compatibility issues

* add changeset

---------

Co-authored-by: Ashwin Madavan <ashwin.madavan@wager.systems>
  • Loading branch information
ashwin153 and Ashwin Madavan authored Jul 19, 2024
1 parent 2793049 commit 41cb9a2
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-radios-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-typescript": patch
---

fix: add explicit import of performance to fix bazel compatibility issues
1 change: 1 addition & 0 deletions packages/openapi-typescript/bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { createConfig, findConfig, loadConfig } from "@redocly/openapi-core";
import fs from "node:fs";
import path from "node:path";
import { performance } from "node:perf_hooks";
import parser from "yargs-parser";
import openapiTS, { COMMENT_HEADER, astToString, c, error, formatTime, warn } from "../dist/index.js";

Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/scripts/download-schemas.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import degit from "degit";
import fs from "node:fs";
import path from "node:path";
import { performance } from "node:perf_hooks";
import { fileURLToPath } from "node:url";
import { error } from "../src/lib/utils.js";
import { multiFile, singleFile } from "./schemas.js";
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/scripts/update-examples.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { execa } from "execa";
import path from "node:path";
import { performance } from "node:perf_hooks";
import { multiFile, singleFile } from "./schemas.js";

async function generateSchemas() {
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createConfig } from "@redocly/openapi-core";
import type { Readable } from "node:stream";
import { performance } from "node:perf_hooks";
import type ts from "typescript";
import { validateAndBundle } from "./lib/redoc.js";
import { debug, resolveRef, scanDiscriminators } from "./lib/utils.js";
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/src/lib/redoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
type Document,
lintDocument,
} from "@redocly/openapi-core";
import { performance } from "node:perf_hooks";
import { Readable } from "node:stream";
import { fileURLToPath } from "node:url";
import parseJson from "parse-json";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ts from "typescript";
import { performance } from "node:perf_hooks";
import { NEVER, QUESTION_TOKEN, addJSDocComment, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
import { createRef, debug, getEntries } from "../lib/utils.js";
import type { ComponentsObject, GlobalContext, SchemaObject, TransformNodeOptions } from "../types.js";
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/src/transform/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ts, { type InterfaceDeclaration, type TypeLiteralNode } from "typescript";
import { performance } from "node:perf_hooks";
import { NEVER, STRING, stringToAST, tsModifiers, tsRecord } from "../lib/ts.js";
import { createRef, debug } from "../lib/utils.js";
import type { GlobalContext, OpenAPI3 } from "../types.js";
Expand Down
1 change: 1 addition & 0 deletions packages/openapi-typescript/src/transform/paths-object.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ts from "typescript";
import { performance } from "node:perf_hooks";
import { addJSDocComment, oapiRef, stringToAST, tsModifiers, tsPropertyIndex } from "../lib/ts.js";
import { createRef, debug, getEntries } from "../lib/utils.js";
import type {
Expand Down

0 comments on commit 41cb9a2

Please sign in to comment.