update babel config

This commit is contained in:
wryk 2020-01-20 12:23:00 +01:00
parent 133bd05558
commit efe384a1f2
5 changed files with 17 additions and 38 deletions

View File

@ -1,8 +1,11 @@
{ {
"plugins": [ "presets": [
["@babel/plugin-transform-runtime", { ["@babel/preset-env", {
"corejs": 3, "useBuiltIns": "usage",
"corejs": {
"version": 3,
"proposals": true "proposals": true
}
}] }]
] ]
} }

25
package-lock.json generated
View File

@ -2242,18 +2242,6 @@
} }
} }
}, },
"@babel/plugin-transform-runtime": {
"version": "7.7.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.7.6.tgz",
"integrity": "sha512-tajQY+YmXR7JjTwRvwL4HePqoL3DYxpYXIHKVvrOIvJmeHe2y1w4tz5qz9ObUDC9m76rCzIMPyn4eERuwA4a4A==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.7.4",
"@babel/helper-plugin-utils": "^7.0.0",
"resolve": "^1.8.1",
"semver": "^5.5.1"
}
},
"@babel/plugin-transform-shorthand-properties": { "@babel/plugin-transform-shorthand-properties": {
"version": "7.8.3", "version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz",
@ -2551,16 +2539,6 @@
"regenerator-runtime": "^0.13.2" "regenerator-runtime": "^0.13.2"
} }
}, },
"@babel/runtime-corejs3": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.8.3.tgz",
"integrity": "sha512-lrIU4aVbmlM/wQPzhEvzvNJskKyYptuXb0fGC0lTQTupTOYtR2Vqbu6/jf8vTr4M8Wt1nIzxVrSvPI5qESa/xA==",
"dev": true,
"requires": {
"core-js-pure": "^3.0.0",
"regenerator-runtime": "^0.13.2"
}
},
"@babel/template": { "@babel/template": {
"version": "7.7.4", "version": "7.7.4",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz",
@ -3625,8 +3603,7 @@
"core-js-pure": { "core-js-pure": {
"version": "3.6.4", "version": "3.6.4",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.4.tgz",
"integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw==", "integrity": "sha512-epIhRLkXdgv32xIUFaaAry2wdxZYBi6bgM7cB136dzzXXa+dFyRLTZeLUJxnd8ShrmyVXBub63n2NHo2JAt8Cw=="
"dev": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",

View File

@ -13,13 +13,13 @@
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@babel/core": "^7.7.7", "@babel/core": "^7.7.7",
"@babel/plugin-transform-runtime": "^7.7.6", "@babel/preset-env": "^7.8.3",
"parcel": "^1.12.4", "parcel": "^1.12.4",
"parcel-plugin-svelte": "^4.0.5", "parcel-plugin-svelte": "^4.0.5",
"svelte": "^3.16.7" "svelte": "^3.16.7"
}, },
"dependencies": { "dependencies": {
"@babel/runtime-corejs3": "^7.8.3", "core-js-pure": "^3.6.4",
"date-fns": "^2.9.0", "date-fns": "^2.9.0",
"get-urls": "^9.2.0", "get-urls": "^9.2.0",
"iter-tools": "^7.0.0-rc.0" "iter-tools": "^7.0.0-rc.0"

View File

@ -1,5 +1,5 @@
import Observable from 'core-js-pure/features/observable'
import { observableToAsyncIterator } from '/services/misc.js' import { observableToAsyncIterator } from '/services/misc.js'
import 'core-js/es7/observable.js'
const LINK_RE = /<(.+?)>; rel="(\w+)"/gi const LINK_RE = /<(.+?)>; rel="(\w+)"/gi

View File

@ -83,17 +83,16 @@ export const secondsToElapsedTime = (seconds) => {
} }
export async function* mkTracksIterator(statusesIterator) { export async function* mkTracksIterator(statusesIterator) {
// const known = new Set() const knownStatus = new Set()
const knownStatus = {} const knownYoutube = new Set()
const knownYoutube = {}
const tracks = execPipe( const tracks = execPipe(
statusesIterator, statusesIterator,
asyncFilter(status => { asyncFilter(status => {
if (knownStatus.hasOwnProperty(status.id)) { if (knownStatus.has(status.id)) {
return false return false
} else { } else {
knownStatus[status.id] = null knownStatus.add(status.id)
return true return true
} }
}), }),
@ -102,10 +101,10 @@ export async function* mkTracksIterator(statusesIterator) {
if (!data) { if (!data) {
return false return false
} else { } else {
if (knownYoutube.hasOwnProperty(data.id)) { if (knownYoutube.has(data.id)) {
return false return false
} else { } else {
knownYoutube[data.id] = null knownYoutube.add(data.id)
return true return true
} }
} }