Skip to content

Commit

Permalink
rename modules related DOM collections
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jan 2, 2018
1 parent 4eef5b4 commit c6a3942
Show file tree
Hide file tree
Showing 33 changed files with 35 additions and 34 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
- Changed namespaces:
- All features from ES5, ES2015, ES2016 and ES2017 moved to one ES namespace - it's available as `core-js/es`, all those features in `modules` folder has `es.` prefix.
- Prefix for ES proposals changed from `es7.` to `esnext.`, they no longer available in `core-js/es7`, use `core-js/stage/*` instead of that.
- `web.dom.iterable` module renamed to `web.dom-collections.iterator`.
- Finally removed `bower.json`

##### 2.5.3 - 2017.12.12
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ clearImmediate(setImmediate(() => {
}));
```
#### Iterable DOM collections
Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Module [`web.dom.iterable`](https://github.com/zloirock/core-js/blob/v3/modules/web.dom.iterable.js):
Some DOM collections should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass). That mean they should have `forEach`, `keys`, `values`, `entries` and `@@iterator` methods for iteration. So add them. Modules [`web.dom-collections.iterator`](https://github.com/zloirock/core-js/blob/v3/modules/web.dom-collections.iterator.js) and [`web.dom-collections.for-each`](https://github.com/zloirock/core-js/blob/v3/modules/web.dom-collections.for-each.js).
```js
class [
CSSRuleList,
Expand Down
6 changes: 3 additions & 3 deletions build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ module.exports = {
'esnext.asap',
'esnext.observable',
'web.immediate',
'web.dom.for-each',
'web.dom.iterable',
'web.dom-collections.for-each',
'web.dom-collections.iterator',
'web.timers',
'core.get-iterator-method',
'core.get-iterator',
Expand All @@ -213,7 +213,7 @@ module.exports = {
'es.date.to-string',
'es.date.to-primitive',
'esnext.symbol.description',
'web.dom.for-each',
'web.dom-collections.for-each',
],
/* eslint-disable prefer-template */
banner: '/**\n' +
Expand Down
2 changes: 1 addition & 1 deletion es/map.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/es.object.to-string');
require('../modules/es.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.map');
module.exports = require('../modules/_core').Map;
2 changes: 1 addition & 1 deletion es/promise.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/es.object.to-string');
require('../modules/es.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.promise');
module.exports = require('../modules/_core').Promise;
2 changes: 1 addition & 1 deletion es/set.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/es.object.to-string');
require('../modules/es.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.set');
module.exports = require('../modules/_core').Set;
2 changes: 1 addition & 1 deletion es/weak-set.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('../modules/es.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.weak-set');
module.exports = require('../modules/_core').WeakSet;
2 changes: 1 addition & 1 deletion fn/dom-collections/for-each.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require('../../modules/web.dom.for-each');
require('../../modules/web.dom-collections.for-each');
module.exports = require('../../modules/_array-for-each');
4 changes: 2 additions & 2 deletions fn/dom-collections/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../../modules/web.dom.for-each');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.for-each');
require('../../modules/web.dom-collections.iterator');
var $iterators = require('../../modules/es.array.iterator');
module.exports = {
keys: $iterators.keys,
Expand Down
2 changes: 1 addition & 1 deletion fn/dom-collections/iterator.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
module.exports = require('../../modules/_core').Array.values;
2 changes: 1 addition & 1 deletion fn/get-iterator-method.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.string.iterator');
module.exports = require('../modules/core.get-iterator-method');
2 changes: 1 addition & 1 deletion fn/get-iterator.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.string.iterator');
module.exports = require('../modules/core.get-iterator');
2 changes: 1 addition & 1 deletion fn/is-iterable.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.string.iterator');
module.exports = require('../modules/core.is-iterable');
2 changes: 1 addition & 1 deletion fn/map/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('../../modules/es.object.to-string');
require('../../modules/es.string.iterator');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
require('../../modules/es.map');
require('../../modules/esnext.map.of');
require('../../modules/esnext.map.from');
Expand Down
2 changes: 1 addition & 1 deletion fn/observable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('../modules/es.object.to-string');
require('../modules/es.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.promise');
require('../modules/esnext.symbol.observable');
require('../modules/esnext.observable');
Expand Down
2 changes: 1 addition & 1 deletion fn/promise.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('../modules/es.object.to-string');
require('../modules/es.string.iterator');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.promise');
require('../modules/esnext.promise.finally');
require('../modules/esnext.promise.try');
Expand Down
2 changes: 1 addition & 1 deletion fn/promise/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('../../modules/es.object.to-string');
require('../../modules/es.string.iterator');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
require('../../modules/es.promise');
require('../../modules/esnext.promise.finally');
require('../../modules/esnext.promise.try');
Expand Down
2 changes: 1 addition & 1 deletion fn/set/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('../../modules/es.object.to-string');
require('../../modules/es.string.iterator');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
require('../../modules/es.set');
require('../../modules/esnext.set.of');
require('../../modules/esnext.set.from');
Expand Down
2 changes: 1 addition & 1 deletion fn/symbol/iterator.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('../../modules/es.string.iterator');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
module.exports = require('../../modules/_wks-ext').f('iterator');
2 changes: 1 addition & 1 deletion fn/weak-map.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/es.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.weak-map');
require('../modules/esnext.weak-map.of');
require('../modules/esnext.weak-map.from');
Expand Down
2 changes: 1 addition & 1 deletion fn/weak-map/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../../modules/es.object.to-string');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
require('../../modules/es.weak-map');
require('../../modules/esnext.weak-map.of');
require('../../modules/esnext.weak-map.from');
Expand Down
2 changes: 1 addition & 1 deletion fn/weak-set.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/es.object.to-string');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.iterator');
require('../modules/es.weak-set');
require('../modules/esnext.weak-set.of');
require('../modules/esnext.weak-set.from');
Expand Down
2 changes: 1 addition & 1 deletion fn/weak-set/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../../modules/es.object.to-string');
require('../../modules/web.dom.iterable');
require('../../modules/web.dom-collections.iterator');
require('../../modules/es.weak-set');
require('../../modules/esnext.weak-set.of');
require('../../modules/esnext.weak-set.from');
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,6 @@ require('./modules/esnext.asap');
require('./modules/esnext.observable');
require('./modules/web.timers');
require('./modules/web.immediate');
require('./modules/web.dom.for-each');
require('./modules/web.dom.iterable');
require('./modules/web.dom-collections.for-each');
require('./modules/web.dom-collections.iterator');
module.exports = require('./modules/_core');
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/library/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ import './esnext.weak-set.from';
import './esnext.weak-set.of';

QUnit.module('Web');
import './web.dom.iterable';
import './web.dom-collections.iterator';
import './web.immediate';
import './web.timers';

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ import './esnext.weak-set.from';
import './esnext.weak-set.of';

QUnit.module('Web');
import './web.dom.for-each';
import './web.dom.iterable';
import './web.dom-collections.for-each';
import './web.dom-collections.iterator';
import './web.immediate';
import './web.timers';
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions web/dom-collections.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('../modules/web.dom.for-each');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.for-each');
require('../modules/web.dom-collections.iterator');
module.exports = require('../modules/_core');
4 changes: 2 additions & 2 deletions web/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require('../modules/web.timers');
require('../modules/web.immediate');
require('../modules/web.dom.for-each');
require('../modules/web.dom.iterable');
require('../modules/web.dom-collections.for-each');
require('../modules/web.dom-collections.iterator');
module.exports = require('../modules/_core');

0 comments on commit c6a3942

Please sign in to comment.