Skip to content

Commit

Permalink
fix(Intl.js): update intl.js
Browse files Browse the repository at this point in the history
updates the used version of the Intl.js polyfill and switches
to installing it from NPM.
  • Loading branch information
zewa666 committed Feb 2, 2016
1 parent 3374c20 commit 79d26ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
6 changes: 5 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ System.config({
},

map: {
"Intl.js": "github:andyearnshaw/Intl.js@0.1.4",
"Intl.js": "npm:intl@1.0.1",
"aurelia-binding": "npm:[email protected]",
"aurelia-dependency-injection": "npm:[email protected]",
"aurelia-event-aggregator": "npm:[email protected]",
"aurelia-loader": "npm:[email protected]",
"aurelia-loader-default": "npm:[email protected]",
"aurelia-pal": "npm:[email protected]",
"aurelia-pal-browser": "npm:[email protected]",
Expand Down Expand Up @@ -111,6 +112,9 @@ System.config({
"npm:[email protected]": {
"util": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"process": "github:jspm/[email protected]"
},
"npm:[email protected]": {
"process": "github:jspm/[email protected]"
},
Expand Down
28 changes: 5 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,19 @@
},
"jspm": {
"registry": "npm",
"jspmPackage": true,
"main": "aurelia-i18n",
"format": "amd",
"directories": {
"dist": "dist/amd"
},
"dependencies": {
"Intl.js": "andyearnshaw/Intl.js@^0.1.4",
"i18next": "i18next/i18next@^1.9.0"
},
"peerDependencies": {
"aurelia-binding": "^1.0.0-beta.1.1.0",
"aurelia-dependency-injection": "^1.0.0-beta.1.1.2",
"Intl.js": "intl@^1.0.1",
"aurelia-binding": "^1.0.0-beta.1.1.1",
"aurelia-event-aggregator": "^1.0.0-beta.1.1.0",
"aurelia-loader-default": "^1.0.0-beta.1.1.1",
"aurelia-pal": "^1.0.0-beta.1.1.1",
"aurelia-loader": "^1.0.0-beta.1.1.0",
"aurelia-templating": "^1.0.0-beta.1.1.0",
"aurelia-templating-resources": "^1.0.0-beta.1.1.0"
"aurelia-templating-resources": "^1.0.0-beta.1.1.0",
"i18next": "i18next/i18next@^1.9.0"
},
"devDependencies": {
"aurelia-pal-browser": "^1.0.0-beta.1.1.2",
Expand All @@ -48,19 +43,6 @@
"text": "github:systemjs/plugin-text@^0.0.2"
}
},
"peerDependencies": {
"aurelia-binding": "^1.0.0-beta.1.1.0",
"aurelia-dependency-injection": "^1.0.0-beta.1.1.2",
"aurelia-event-aggregator": "^1.0.0-beta.1.1.0",
"aurelia-loader-default": "^1.0.0-beta.1.1.1",
"aurelia-pal": "^1.0.0-beta.1.1.1",
"aurelia-templating": "^1.0.0-beta.1.1.0",
"aurelia-templating-resources": "^1.0.0-beta.1.1.0"
},
"dependencies": {
"Intl.js": "andyearnshaw/Intl.js@^0.1.4",
"i18next": "i18next/i18next@^1.9.0"
},
"devDependencies": {
"aurelia-tools": "^0.1.15",
"babel": "^5.8.23",
Expand Down
4 changes: 2 additions & 2 deletions src/aurelia-i18n.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {EventAggregator} from 'aurelia-event-aggregator';
import {ViewResources} from 'aurelia-templating';
import {DefaultLoader} from 'aurelia-loader-default';
import {Loader} from 'aurelia-loader';
import {BindingSignaler} from 'aurelia-templating-resources';

import {I18N} from './i18n';
Expand Down Expand Up @@ -51,7 +51,7 @@ function configure(frameworkConfig, cb): Promise<void> {

// check whether Intl is available, otherwise load the polyfill
if (window.Intl === undefined) {
let loader = frameworkConfig.container.get(DefaultLoader);
let loader = frameworkConfig.container.get(Loader);

return loader.normalize('aurelia-i18n').then((i18nName) => {
return loader.normalize('Intl.js', i18nName).then((intlName) => {
Expand Down
1 change: 1 addition & 0 deletions test/unit/numberformat.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {I18N} from '../../src/i18n';
import {BindingSignaler} from 'aurelia-templating-resources';
import {EventAggregator} from 'aurelia-event-aggregator';
import Intl from 'Intl.js';
import * as allData from 'Intl.js/locale-data/complete';

describe('numberformat tests', () => {
let sut;
Expand Down

0 comments on commit 79d26ee

Please sign in to comment.