Skip to content

fix: add explicit import of performance to fix bazel compatibility issues #1772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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