Skip to content

Commit

Permalink
Revert "[Console] Add support for JSON with long numerals (opensearch…
Browse files Browse the repository at this point in the history
…-project#4562) (opensearch-project#4967) (opensearch-project#4973)"

This reverts commit e3cebe7.

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Sep 8, 2023
1 parent e3cebe7 commit 9e7d64f
Show file tree
Hide file tree
Showing 30 changed files with 76 additions and 1,097 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"@hapi/vision": "^6.1.0",
"@hapi/wreck": "^17.1.0",
"@opensearch-project/opensearch": "^1.1.0",
"@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.3.1",
"@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.2.0",
"@osd/ace": "1.0.0",
"@osd/analytics": "1.0.0",
"@osd/apm-config-loader": "1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/osd-opensearch-archiver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
},
"dependencies": {
"@osd/dev-utils": "1.0.0",
"@osd/std": "1.0.0",
"@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.3.1"
"@opensearch-project/opensearch": "^1.1.0"
},
"devDependencies": {}
}
2 changes: 1 addition & 1 deletion packages/osd-opensearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"osd:watch": "../../scripts/use_node scripts/build --watch"
},
"dependencies": {
"@opensearch-project/opensearch-next": "npm:@opensearch-project/opensearch@^2.3.1",
"@opensearch-project/opensearch": "^1.1.0",
"@osd/dev-utils": "1.0.0",
"abort-controller": "^3.0.0",
"chalk": "^4.1.0",
Expand Down
72 changes: 1 addition & 71 deletions packages/osd-std/README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,3 @@
# `@osd/std` — OpenSearch Dashboards standard library

This package is a set of utilities that can be used both on server-side and client-side.

## API

#### `assertNever`

Can be used in switch statements to ensure we perform exhaustive checks.

#### `deepFreeze`

Apply `Object.freeze` to a value recursively and convert the return type to `Readonly` variant recursively.

#### `get`

Retrieve the value for the specified path of an object.

#### `getFlattenedObject`

Flatten a deeply nested object to a map of dot-separated paths, pointing to all of its primitive values and arrays.

#### `stringify` and `parse`

Drop-in replacement for `JSON.stringify` and `JSON.parse`, capable of handling long numerals and `BigInt` values.

#### `mapToObject`

Convert a map to an object.

#### `mapValuesOfMap`

Create a new `Map` populated with the results of calling a provided function on every element in the input `Map`.

#### `groupIntoMap`

Group elements of an `Array` into a `Map` based on a provided function.

#### `merge`

Deeply merge two objects, omitting undefined values, and not deeply merging arrays.

#### `pick`

Create a new `Object` of specified keys and their values from an input `Object`.

#### `withTimeout`

Apply a `timeout` duration to a `Promise` before throwing an `Error` with the provided message.

#### `firstValueFrom` and `lastValueFrom`

Get a `Promise` that resolves as soon as the first or last value arrives from an observable.

#### `unset`

Unset a (potentially nested) key from given object.

#### `modifyUrl`

Get an `Object` resulting from applying a provided function to the meaningful parts of a URL.

#### `isRelativeUrl`

Determine if a url is relative.

#### `getUrlOrigin`

Get the origin URL of a provided URL.

#### `validateObject`

Deeply validate that an `Object` does not contain any `__proto__` or `constructor.prototype` keys, or circular references.
This package is a set of utilities that can be used both on server-side and client-side.
19 changes: 0 additions & 19 deletions packages/osd-std/src/__snapshots__/json.test.ts.snap

This file was deleted.

1 change: 0 additions & 1 deletion packages/osd-std/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,3 @@ export { unset } from './unset';
export { getFlattenedObject } from './get_flattened_object';
export { validateObject } from './validate_object';
export * from './rxjs_7';
export { parse, stringify } from './json';
176 changes: 0 additions & 176 deletions packages/osd-std/src/json.test.ts

This file was deleted.

Loading

0 comments on commit 9e7d64f

Please sign in to comment.