Browse Source

chore: Update a whole bunch of dependencies

Michael Bromley 5 years ago
parent
commit
3524153552

+ 4 - 3
package.json

@@ -36,6 +36,7 @@
     "@graphql-codegen/typescript-compatibility": "1.2.0",
     "@graphql-codegen/typescript-operations": "1.2.0",
     "@types/graphql": "^14.0.5",
+    "@types/jest": "^25.1.4",
     "@types/klaw-sync": "^6.0.0",
     "@types/node": "^12.12.0",
     "concurrently": "^5.0.0",
@@ -44,12 +45,12 @@
     "graphql": "^14.5.8",
     "graphql-tools": "^4.0.0",
     "husky": "^3.0.0",
-    "jest": "^24.5.0",
+    "jest": "^25.2.1",
     "klaw-sync": "^6.0.0",
     "lerna": "^3.16.4",
     "lint-staged": "^9.2.0",
-    "prettier": "^1.15.2",
-    "ts-jest": "^24.1.0",
+    "prettier": "^2.0.2",
+    "ts-jest": "^25.2.1",
     "ts-node": "^8.4.1",
     "tslint": "^5.11.0",
     "typescript": "3.7.5"

+ 1 - 1
packages/admin-ui-plugin/package.json

@@ -26,6 +26,6 @@
     "typescript": "3.7.5"
   },
   "dependencies": {
-    "fs-extra": "^8.0.1"
+    "fs-extra": "^9.0.0"
   }
 }

+ 1 - 1
packages/asset-server-plugin/package.json

@@ -30,7 +30,7 @@
     "typescript": "3.7.5"
   },
   "dependencies": {
-    "fs-extra": "^8.0.1",
+    "fs-extra": "^9.0.0",
     "sharp": "0.25.2"
   }
 }

+ 0 - 1
packages/common/package.json

@@ -17,7 +17,6 @@
     "lib/**/*"
   ],
   "devDependencies": {
-    "@types/jest": "^24.0.21",
     "rimraf": "^3.0.0",
     "typescript": "3.7.5"
   }

+ 11 - 13
packages/core/package.json

@@ -47,25 +47,25 @@
     "@nestjs/typeorm": "7.0.0",
     "@types/fs-extra": "^8.0.1",
     "@vendure/common": "^0.10.1",
-    "apollo-server-express": "2.9.7",
-    "bcrypt": "^3.0.6",
-    "body-parser": "^1.18.3",
-    "chalk": "^2.4.2",
-    "commander": "^3.0.2",
+    "apollo-server-express": "2.11.0",
+    "bcrypt": "^4.0.1",
+    "body-parser": "^1.19.0",
+    "chalk": "^3.0.0",
+    "commander": "^5.0.0",
     "cookie-session": "^2.0.0-beta.3",
     "csv-parse": "^4.6.5",
     "express": "^4.16.4",
-    "fs-extra": "^8.0.1",
+    "fs-extra": "^9.0.0",
     "graphql": "14.6.0",
     "graphql-iso-date": "^3.6.1",
     "graphql-tag": "^2.10.0",
     "graphql-tools": "^4.0.6",
     "graphql-type-json": "^0.3.0",
-    "http-proxy-middleware": "^0.20.0",
-    "i18next": "^18.0.1",
-    "i18next-express-middleware": "^1.7.1",
-    "i18next-icu": "^1.0.1",
-    "i18next-node-fs-backend": "^2.1.1",
+    "http-proxy-middleware": "^1.0.3",
+    "i18next": "^19.3.3",
+    "i18next-express-middleware": "^1.9.1",
+    "i18next-icu": "^1.3.0",
+    "i18next-node-fs-backend": "^2.1.3",
     "image-size": "^0.8.3",
     "mime-types": "^2.1.21",
     "ms": "^2.1.1",
@@ -84,8 +84,6 @@
     "@types/graphql-iso-date": "^3.3.1",
     "@types/graphql-type-json": "^0.3.2",
     "@types/gulp": "^4.0.5",
-    "@types/http-proxy-middleware": "^0.19.2",
-    "@types/jest": "^24.0.21",
     "@types/mime-types": "^2.1.0",
     "@types/ms": "^0.7.30",
     "@types/nanoid": "^2.1.0",

+ 3 - 3
packages/core/src/api/common/request-context.ts

@@ -1,6 +1,6 @@
 import { LanguageCode } from '@vendure/common/lib/generated-types';
 import { ID } from '@vendure/common/lib/shared-types';
-import i18next from 'i18next';
+import i18next, { TFunction } from 'i18next';
 
 import { DEFAULT_LANGUAGE_CODE } from '../../common/constants';
 import { Channel } from '../../entity/channel/channel.entity';
@@ -24,7 +24,7 @@ export class RequestContext {
     private readonly _session?: Session;
     private readonly _isAuthorized: boolean;
     private readonly _authorizedAsOwnerOnly: boolean;
-    private readonly _translationFn: i18next.TFunction;
+    private readonly _translationFn: TFunction;
     private readonly _apiType: ApiType;
 
     /**
@@ -37,7 +37,7 @@ export class RequestContext {
         languageCode?: LanguageCode;
         isAuthorized: boolean;
         authorizedAsOwnerOnly: boolean;
-        translationFn?: i18next.TFunction;
+        translationFn?: TFunction;
     }) {
         const { apiType, channel, session, languageCode, translationFn } = options;
         this._apiType = apiType;

+ 3 - 3
packages/core/src/i18n/i18n.service.ts

@@ -1,7 +1,7 @@
 import { Injectable, OnModuleInit } from '@nestjs/common';
 import { Handler, Request } from 'express';
 import { GraphQLError } from 'graphql';
-import i18next from 'i18next';
+import i18next, { TFunction } from 'i18next';
 import i18nextMiddleware from 'i18next-express-middleware';
 import ICU from 'i18next-icu';
 import Backend from 'i18next-node-fs-backend';
@@ -12,7 +12,7 @@ import { ConfigService } from '../config/config.service';
 import { I18nError } from './i18n-error';
 
 export interface I18nRequest extends Request {
-    t: i18next.TFunction;
+    t: TFunction;
 }
 
 /**
@@ -52,7 +52,7 @@ export class I18nService implements OnModuleInit {
      */
     translateError(req: I18nRequest, error: GraphQLError) {
         const originalError = error.originalError;
-        const t: i18next.TFunction = req.t;
+        const t: TFunction = req.t;
 
         if (t && originalError instanceof I18nError) {
             let translation = originalError.message;

+ 6 - 6
packages/core/src/plugin/plugin-utils.ts

@@ -1,5 +1,5 @@
 import { RequestHandler } from 'express';
-import proxy from 'http-proxy-middleware';
+import { createProxyMiddleware } from 'http-proxy-middleware';
 
 import { Logger, VendureConfig } from '../config';
 
@@ -37,13 +37,13 @@ import { Logger, VendureConfig } from '../config';
 export function createProxyHandler(options: ProxyOptions): RequestHandler {
     const route = options.route.charAt(0) === '/' ? options.route : '/' + options.route;
     const proxyHostname = options.hostname || 'localhost';
-    const middleware = proxy({
+    const middleware = createProxyMiddleware({
         // TODO: how do we detect https?
         target: `http://${proxyHostname}:${options.port}`,
         pathRewrite: {
             [`^${route}`]: `/` + (options.basePath || ''),
         },
-        logProvider(provider: proxy.LogProvider): proxy.LogProvider {
+        logProvider(provider) {
             return {
                 log(message: string) {
                     Logger.debug(message, options.label);
@@ -116,9 +116,9 @@ export function logProxyMiddlewares(config: VendureConfig) {
             const { port, hostname, label, route, basePath } = (middleware.handler as any)
                 .proxyMiddleware as ProxyOptions;
             Logger.info(
-                `${label}: http://${config.hostname || 'localhost'}:${
-                    config.port
-                }/${route}/ -> http://${hostname || 'localhost'}:${port}${basePath ? `/${basePath}` : ''}`,
+                `${label}: http://${config.hostname || 'localhost'}:${config.port}/${route}/ -> http://${
+                    hostname || 'localhost'
+                }:${port}${basePath ? `/${basePath}` : ''}`,
             );
         }
     }

+ 6 - 7
packages/create/package.json

@@ -1,6 +1,6 @@
 {
   "name": "@vendure/create",
-  "version": "0.10.2",
+  "version": "0.10.1",
   "license": "MIT",
   "bin": {
     "create": "./index.js"
@@ -33,16 +33,15 @@
     "typescript": "3.7.5"
   },
   "dependencies": {
-    "chalk": "^2.4.2",
-    "commander": "^2.19.0",
-    "cross-spawn": "^6.0.5",
+    "chalk": "^3.0.0",
+    "commander": "^5.0.0",
+    "cross-spawn": "^7.0.1",
     "detect-port": "^1.3.0",
-    "fs-extra": "^8.0.1",
+    "fs-extra": "^9.0.0",
     "handlebars": "^4.1.1",
     "listr": "^0.14.3",
     "prompts": "^2.0.1",
     "rxjs": "^6.4.0",
-    "semver": "^6.0.0",
-    "tcp-port-used": "^1.0.1"
+    "semver": "^7.1.3"
   }
 }

+ 1 - 1
packages/email-plugin/package.json

@@ -21,7 +21,7 @@
   "dependencies": {
     "dateformat": "^3.0.3",
     "express": "^4.16.4",
-    "fs-extra": "^8.0.1",
+    "fs-extra": "^9.0.0",
     "handlebars": "^4.7.3",
     "mjml": "^4.3.0",
     "nodemailer": "^5.0.0"

+ 6 - 6
packages/ui-devkit/package.json

@@ -42,20 +42,20 @@
     "@vendure/admin-ui": "^0.10.2",
     "@vendure/common": "^0.10.1",
     "chalk": "^3.0.0",
-    "chokidar": "^3.0.2",
-    "fs-extra": "^8.1.0",
+    "chokidar": "^3.3.1",
+    "fs-extra": "^9.0.0",
     "glob": "^7.1.6",
     "rxjs": "^6.5.4"
   },
   "devDependencies": {
-    "@rollup/plugin-node-resolve": "^6.0.0",
+    "@rollup/plugin-node-resolve": "^7.1.1",
     "@types/fs-extra": "^8.1.0",
     "@types/glob": "^7.1.1",
     "@vendure/core": "^0.10.1",
     "rimraf": "^3.0.0",
-    "rollup": "^1.27.9",
-    "rollup-plugin-terser": "^5.1.2",
-    "rollup-plugin-typescript2": "^0.25.3",
+    "rollup": "^2.2.0",
+    "rollup-plugin-terser": "^5.3.0",
+    "rollup-plugin-typescript2": "^0.26.0",
     "tslib": "^1.10.0",
     "typescript": "3.7.5"
   }

File diff suppressed because it is too large
+ 324 - 264
yarn.lock


Some files were not shown because too many files changed in this diff