Skip to content

Commit

Permalink
Removed Promise and TypedArray polyfills, since they're now supported…
Browse files Browse the repository at this point in the history
… in all modern runtimes
  • Loading branch information
JamesMessinger committed Oct 13, 2017
1 parent cb44fa6 commit 3ab377f
Show file tree
Hide file tree
Showing 19 changed files with 2,392 additions and 1,424 deletions.
1,371 changes: 97 additions & 1,274 deletions dist/ref-parser.js

Large diffs are not rendered by default.

22 changes: 9 additions & 13 deletions dist/ref-parser.js.map

Large diffs are not rendered by default.

20 changes: 7 additions & 13 deletions dist/ref-parser.min.js

Large diffs are not rendered by default.

122 changes: 33 additions & 89 deletions dist/ref-parser.min.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ var baseConfig = {
'www/bower_components/chai/chai.js',
'www/bower_components/sinon-js/sinon.js',

// TypedArray polyfill for IE 9
'node_modules/typedarray/index.js',
// Polyfills for older browsers
'www/polyfills/promise.js',
'www/polyfills/typedarray.js',

// Json Schema $Ref Parser
'dist/ref-parser.min.js',
Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var Promise = require('./util/promise'),
Options = require('./options'),
var Options = require('./options'),
$Refs = require('./refs'),
parse = require('./parse'),
resolveExternal = require('./resolve-external'),
Expand Down
3 changes: 1 addition & 2 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
var ono = require('ono'),
debug = require('./util/debug'),
url = require('./util/url'),
plugins = require('./util/plugins'),
Promise = require('./util/promise');
plugins = require('./util/plugins');

module.exports = parse;

Expand Down
2 changes: 0 additions & 2 deletions lib/parsers/json.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

var Promise = require('../util/promise');

module.exports = {
/**
* The order that this parser will run, in relation to other parsers.
Expand Down
3 changes: 1 addition & 2 deletions lib/parsers/yaml.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var Promise = require('../util/promise'),
YAML = require('../util/yaml');
var YAML = require('../util/yaml');

module.exports = {
/**
Expand Down
3 changes: 1 addition & 2 deletions lib/resolve-external.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var Promise = require('./util/promise'),
$Ref = require('./ref'),
var $Ref = require('./ref'),
Pointer = require('./pointer'),
parse = require('./parse'),
debug = require('./util/debug'),
Expand Down
1 change: 0 additions & 1 deletion lib/resolvers/file.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
var fs = require('fs'),
ono = require('ono'),
Promise = require('../util/promise'),
url = require('../util/url'),
debug = require('../util/debug');

Expand Down
3 changes: 1 addition & 2 deletions lib/resolvers/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ var http = require('http'),
https = require('https'),
ono = require('ono'),
url = require('../util/url'),
debug = require('../util/debug'),
Promise = require('../util/promise');
debug = require('../util/debug');

module.exports = {
/**
Expand Down
3 changes: 1 addition & 2 deletions lib/util/plugins.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var Promise = require('./promise'),
debug = require('./debug');
var debug = require('./debug');

/**
* Returns the given plugins as an array, rather than an object map.
Expand Down
4 changes: 0 additions & 4 deletions lib/util/promise.js

This file was deleted.

23 changes: 11 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@
"npm-check-updates": "^2.12.1",
"simplifyify": "^3.2.4",
"sinon": "^4.0.1",
"typedarray": "0.0.6",
"version-bump-prompt": "^3.1.2"
},
"dependencies": {
"call-me-maybe": "^1.0.1",
"debug": "^3.1.0",
"es6-promise": "^4.1.1",
"eslint-config-modular": "^4.1.0",
"js-yaml": "^3.9.1",
"ono": "^4.0.2",
Expand Down
4 changes: 4 additions & 0 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
<script src="../www/bower_components/chai/chai.js"></script>
<script src="../www/bower_components/sinon-js/sinon.js"></script>

<!-- Polyfills for older browsers -->
<script src="../www/polyfills/promise.js"></script>
<script src="../www/polyfills/typedarray.js"></script>

<!-- Json Schema Ref Parser -->
<script src="../dist/ref-parser.js"></script>

Expand Down
Loading

0 comments on commit 3ab377f

Please sign in to comment.