Skip to content

Commit

Permalink
build: use import instead of require for fast-json-stable-stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
Keen Yee Liau authored and vikerman committed Oct 2, 2019
1 parent c5869f5 commit 8497d9a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"@types/clean-css": "^4.2.1",
"@types/copy-webpack-plugin": "^4.4.1",
"@types/express": "^4.16.0",
"@types/fast-json-stable-stringify": "^2.0.0",
"@types/find-cache-dir": "^2.0.0",
"@types/glob": "^7.0.0",
"@types/inquirer": "^0.0.44",
Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ts_library(
deps = [
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/fast-json-stable-stringify",
"@npm//ajv",
"@npm//magic-string",
"@npm//source-map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as stableStringify from 'fast-json-stable-stringify';
import { Observable, Subject, concat, of } from 'rxjs';
import { finalize, ignoreElements, share, shareReplay, tap } from 'rxjs/operators';
import { JsonValue } from '../../json';
Expand All @@ -16,8 +17,6 @@ import {
JobOutboundMessageKind,
} from './api';

const stableStringify = require('fast-json-stable-stringify');

export namespace strategy {

export type JobStrategy<
Expand Down
3 changes: 1 addition & 2 deletions packages/angular_devkit/core/src/workspace/json/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as stableStringify from 'fast-json-stable-stringify';
import {
JsonAstArray,
JsonAstKeyValue,
Expand All @@ -14,8 +15,6 @@ import {
JsonValue,
} from '../../json';

const stableStringify = require('fast-json-stable-stringify');

interface CacheEntry {
value?: JsonValue;
node?: JsonAstNode;
Expand Down
6 changes: 5 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,11 @@
"@types/express-serve-static-core" "*"
"@types/serve-static" "*"

"@types/fast-json-stable-stringify@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#40363bb847cb86b2c2e1599f1398d11e8329c921"
integrity sha512-mky/O83TXmGY39P1H9YbUpjV6l6voRYlufqfFCvel8l1phuy8HRjdWc1rrPuN53ITBJlbyMSV6z3niOySO5pgQ==

"@types/find-cache-dir@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/find-cache-dir/-/find-cache-dir-2.0.0.tgz#6ee79b947b8e51ce8c565fc8278822b2605609db"
Expand Down Expand Up @@ -9073,7 +9078,6 @@ sauce-connect-launcher@^1.2.4:

"sauce-connect-proxy@https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz":
version "0.0.0"
uid dc5efcd2be24ddb099a85b923d6e754754651fa8
resolved "https://saucelabs.com/downloads/sc-4.5.4-linux.tar.gz#dc5efcd2be24ddb099a85b923d6e754754651fa8"

saucelabs@^1.5.0:
Expand Down

0 comments on commit 8497d9a

Please sign in to comment.