Browse Source

Use url-parse @types package instead of our homegrown one.

Jason Grout 4 years ago
parent
commit
bdf732c1d3
3 changed files with 6 additions and 27 deletions
  1. 1 0
      packages/coreutils/package.json
  2. 0 27
      packages/coreutils/src/url-parse.d.ts
  3. 5 0
      yarn.lock

+ 1 - 0
packages/coreutils/package.json

@@ -49,6 +49,7 @@
     "@jupyterlab/testutils": "^3.0.0-rc.5",
     "@types/jest": "^26.0.10",
     "@types/minimist": "^1.2.0",
+    "@types/url-parse": "^1.1.0",
     "jest": "^26.4.2",
     "rimraf": "~3.0.0",
     "ts-jest": "^26.3.0",

+ 0 - 27
packages/coreutils/src/url-parse.d.ts

@@ -1,27 +0,0 @@
-// Type definitions for url-parse v1.1.8
-// Project: https://github.com/unshiftio/url-parse
-// Definitions by: Steven Silvester <https://github.com/blink1073>
-
-// We use the hack mentioned in https://github.com/Microsoft/TypeScript/issues/5073
-// to enable `import * as urlparse from 'url-parse';`
-
-declare module 'url-parse' {
-  interface IURL {
-    protocol: string;
-    slashes: boolean;
-    auth: string;
-    username: string;
-    password: string;
-    host: string;
-    hostname: string;
-    port: string;
-    pathname: string;
-    query: any;
-    hash: string;
-    href: string;
-    origin: string;
-  }
-  function parse(url: string, parseQuery?: boolean): IURL;
-  namespace parse {}
-  export = parse;
-}

+ 5 - 0
yarn.lock

@@ -3370,6 +3370,11 @@
   dependencies:
     source-map "^0.6.1"
 
+"@types/url-parse@^1.1.0":
+  version "1.4.3"
+  resolved "https://registry.yarnpkg.com/@types/url-parse/-/url-parse-1.4.3.tgz#fba49d90f834951cb000a674efee3d6f20968329"
+  integrity sha512-4kHAkbV/OfW2kb5BLVUuUMoumB3CP8rHqlw48aHvFy5tf9ER0AfOonBlX29l/DD68G70DmyhRlSYfQPSYpC5Vw==
+
 "@types/webpack-env@^1.14.1", "@types/webpack-env@^1.15.2":
   version "1.15.2"
   resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.2.tgz#927997342bb9f4a5185a86e6579a0a18afc33b0a"