diff --git a/package.json b/package.json index b112d81f..322683ae 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "typings": "index.d.ts", "homepage": "https://github.com/ocombe/ngx-translate", "peerDependencies": { - "@angular/core": ">=2.0.0" + "@angular/core": ">=4.0.0" }, "devDependencies": { "@angular/animations": "4.1.3", diff --git a/src/translate.service.ts b/src/translate.service.ts index ed7deeda..f7156be7 100644 --- a/src/translate.service.ts +++ b/src/translate.service.ts @@ -1,4 +1,4 @@ -import {Injectable, EventEmitter, Inject, OpaqueToken} from "@angular/core"; +import {Injectable, EventEmitter, Inject, InjectionToken} from "@angular/core"; import {Observable} from "rxjs/Observable"; import {Observer} from "rxjs/Observer"; import "rxjs/add/observable/of"; @@ -17,8 +17,8 @@ import {MissingTranslationHandler, MissingTranslationHandlerParams} from "./miss import {TranslateParser} from "./translate.parser"; import {mergeDeep, isDefined} from "./util"; -export const USE_STORE = new OpaqueToken('USE_STORE'); -export const USE_DEFAULT_LANG = new OpaqueToken('USE_DEFAULT_LANG'); +export const USE_STORE = new InjectionToken('USE_STORE'); +export const USE_DEFAULT_LANG = new InjectionToken('USE_DEFAULT_LANG'); export interface TranslationChangeEvent { translations: any; diff --git a/yarn.lock b/yarn.lock index 88abe6be..cd2e1760 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2339,7 +2339,7 @@ lodash.templatesettings@^3.0.0: lodash._reinterpolate "^3.0.0" lodash.escape "^3.0.0" -lodash@4.17.2, lodash@^4.2.0, lodash@^4.3.0: +lodash@4.17.2: version "4.17.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" @@ -2347,7 +2347,7 @@ lodash@^3.6.0, lodash@^3.8.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.5.0: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.5.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3003,11 +3003,10 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@~2.0.0, readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" dependencies: - buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" @@ -3015,10 +3014,11 @@ read-pkg@^1.0.0: string_decoder "~0.10.x" util-deprecate "~1.0.1" -readable-stream@^2.0.1, readable-stream@~2.0.0, readable-stream@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" +readable-stream@^2.1.0, readable-stream@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: + buffer-shims "^1.0.0" core-util-is "~1.0.0" inherits "~2.0.1" isarray "~1.0.0" @@ -3235,11 +3235,11 @@ resolve-dir@^0.1.0: expand-tilde "^1.2.2" global-modules "^0.2.3" -resolve@1.1.x, resolve@^1.1.6: +resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.3.2: +resolve@^1.1.6, resolve@^1.3.2: version "1.3.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" dependencies: @@ -3807,16 +3807,7 @@ typescript@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.3.tgz#9639f3c3b40148e8ca97fe08a51dd1891bb6be22" -uglify-js@^2.6: - version "2.8.15" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.15.tgz#835dd4cd5872554756e6874508d0d0561704d94d" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-js@^2.8.27: +uglify-js@^2.6, uglify-js@^2.8.27: version "2.8.27" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c" dependencies: