Skip to content

Commit

Permalink
BREAKING(json): rename /common to /types (#5103)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Jun 21, 2024
1 parent 21e8ece commit 32d46e9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion json/_common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import type { JsonValue } from "./common.ts";
import type { JsonValue } from "./types.ts";

/** JSON.parse with detailed error message. */
export function parse(text: string): JsonValue {
Expand Down
2 changes: 1 addition & 1 deletion json/concatenated_json_parse_stream.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { toTransformStream } from "@std/streams/to-transform-stream";
import type { JsonValue } from "./common.ts";
import type { JsonValue } from "./types.ts";
import { parse } from "./_common.ts";

function isBlankChar(char: string | undefined) {
Expand Down
2 changes: 1 addition & 1 deletion json/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.224.1",
"exports": {
".": "./mod.ts",
"./common": "./common.ts",
"./types": "./types.ts",
"./concatenated-json-parse-stream": "./concatenated_json_parse_stream.ts",
"./json-parse-stream": "./json_parse_stream.ts",
"./json-stringify-stream": "./json_stringify_stream.ts"
Expand Down
2 changes: 1 addition & 1 deletion json/json_parse_stream.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
// This module is browser compatible.

import type { JsonValue } from "./common.ts";
import type { JsonValue } from "./types.ts";
import { parse } from "./_common.ts";

const branks = /^[ \t\r\n]*$/;
Expand Down
2 changes: 1 addition & 1 deletion json/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
*/

export * from "./concatenated_json_parse_stream.ts";
export * from "./common.ts";
export * from "./types.ts";
export * from "./json_parse_stream.ts";
export * from "./json_stringify_stream.ts";
File renamed without changes.
4 changes: 2 additions & 2 deletions jsonc/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*
* @module
*/
import type { JsonValue } from "@std/json/common";
export type { JsonValue } from "@std/json/common";
import type { JsonValue } from "@std/json/types";
export type { JsonValue } from "@std/json/types";

/** Options for {@linkcode parse}. */
export interface ParseOptions {
Expand Down

0 comments on commit 32d46e9

Please sign in to comment.