dmnsgn / async-preloader Goto Github PK
View Code? Open in Web Editor NEWAssets preloader using ES2017 async/await and fetch.
Home Page: https://dmnsgn.github.io/async-preloader/
License: MIT License
Assets preloader using ES2017 async/await and fetch.
Home Page: https://dmnsgn.github.io/async-preloader/
License: MIT License
Failed to compile
./node_modules/async-preloader/lib/index.js 310:21
Module parse failed: Unexpected token (310:21)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| */
| static getFileExtension(path) {
> return (path?.match(/[^\\/]\.([^.\\/]+)$/) || [null]).pop();
| }
| /**
Hi, I found this error while testing this library.
here's a part of my package.json
"react": "^18.1.0",
"typescript": "^4.1.2",
"@craco/craco": "^6.4.3",
"@types/react-lottie": "^1.2.6",
"@types/react-sticky": "^6.0.4",
"craco-esbuild": "^0.5.0"
1.18.0
to 1.19.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 6 commits.
9af119d
1.19.0
b3f361c
Update changelog
456f4d2
Avoid variable from empty module name be empty (#3026)
17eaa43
Use id of last module in chunk as name base for auto-generated chunks (#3025)
871bfa0
Switch to a code-splitting build and update dependencies (#3020)
2443783
Unified file emission api (#2999)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.9.2
to 1.9.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
2019-04-10
The new version differs by 3 commits.
516a06d
1.9.3
a5526ea
Update changelog
c3d73ff
Handle out-of-order binding of identifiers to improve tree-shaking (#2803)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
11.11.6
to 11.11.7
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
10.12.7
to 10.12.8
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.4.1
to 1.4.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
2019-03-07
The new version differs by 6 commits.
adaa23e
1.4.2
2d03a67
Update changelog
858fea4
Resolve a situation where different default exports referencing the same (#2737)
6903425
Update changelog
af41561
Fix an issue where the same hash was generated when different variables (#2741)
d27c0f6
Docs: Fix return type (#2738)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
3.2.0
to 3.3.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
fontfaceobserver-es is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.
The new version differs by 12 commits.
c3ccfe7
3.3.0
93eb77d
Update to babel 7 + Update all dependencies
4b15e3f
Fix tests
4c6e59c
Merge branch 'master' of https://github.com/bramstein/fontfaceobserver
20e40d0
2.1.0
f810965
Add dist files.
969dc35
Fix calling phantomjs.
e154de9
Upgrade Grunt and Mocha.
8e1aacb
Merge pull request #119 from davidcornu/error-objects
eb705c2
Reject promises with Error objects
6c0d945
Merge pull request #122 from kennethormandy/ko-create-observers-example
61b8b10
Adds an example of dynamically creating observers, closes #121
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
24.0.9
to 24.0.10
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
1.14.2
to 1.14.3
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
2019-06-06
The new version differs by 4 commits.
c68bd95
1.14.3
d79aa57
Update changelog
7179390
Use browser relative path algorithm for chunks (#2902)
b1df517
Add funding button
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
11.10.5
to 11.10.6
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
12.6.9
to 12.7.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Building a project with [email protected]
yielded the following parse error:
C:\Users\bruno\Documents\jobs\2018\thirty-three\ee-careers\node_modules\lodash-es\get.js:1
import baseGet from './_baseGet.js';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Reverting to the previous version I had installed [email protected]
made the error disappear.
Just a quick issue report, I haven't had the time to investigate it any further.
11.12.1
to 11.12.2
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Hey @dmnsgn, i tried your async preloader, and i dont know why am i facing this problem on :
Safari Desktop : Version 11.0.3 (13604.5.6)
(Sometimes 'pending')'
Safari Mobile : Version iOS 11.4.1
(Always 'pending')'
Here is my code :
import './style.scss';
import './videos/screencastBoucle.mp4'
import './videos/screencastFeatureInterface.mp4'
import './videos/screencastForecast.mp4'
import './videos/screencastNotif.mp4'
import Scroll from './js/scroll'
import AsyncPreloader from "async-preloader";
const items = [
{ "id": "screencastBoucle", "src": "./video/screencastBoucle.mp4" },
{ "id": "screencastFeatureInterface", "src": "./video/screencastFeatureInterface.mp4" },
{ "id": "screencastForecast", "src": "./video/screencastForecast.mp4" },
{ "id": "screencastNotif", "src": "./video/screencastNotif.mp4" }
];
pItems
.then(items => {
// When pending do not enter
console.log('Items', items)
})
.then(() => {
// When pending do not enter
let scroll = new Scroll(items, AsyncPreloader)
animate.animateOnLoad()
})
Thanks @dmnsgn :) and cool the lib by the way
This line enforces the creation of a media element and prevent the return of data: if (item.body && item.body !== this.defaultBodyMethod)
24.0.0
to 24.0.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
ts-jest is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 23 commits.
b43b3c1
chore(release): 24.0.1
2d91a37
chore: update package-lock
485d3f7
build(deps): bump semver from 5.6.0 to 5.7.0 (#1043)
2bd2534
build(deps-dev): bump @types/node from 10.14.3 to 10.14.4 (#1041)
bdba560
build(deps-dev): bump @types/node from 10.14.2 to 10.14.3 (#1038)
08766bf
build(deps-dev): bump @types/node from 10.14.1 to 10.14.2 (#1036)
5f92fd2
build(deps-dev): bump js-yaml from 3.12.2 to 3.13.0 (#1034)
a9c79e9
build(deps-dev): bump @types/yargs from 12.0.9 to 12.0.10 (#1032)
245ab29
build(deps-dev): bump eslint from 5.15.2 to 5.15.3 (#1031)
4e72e59
build(deps-dev): bump eslint from 5.15.1 to 5.15.2 (#1030)
fb7dd55
feat(config): specify package.json location (#823) (#1013)
279edcd
build(deps-dev): bump tslint from 5.13.1 to 5.14.0 (#1028)
8b93228
build(deps-dev): bump @types/node from 10.12.30 to 10.14.1 (#1027)
b825c7f
build(deps-dev): bump @types/lodash.memoize from 4.1.4 to 4.1.6 (#1014)
6f0ab80
build(deps-dev): bump @types/lodash.merge from 4.6.5 to 4.6.6 (#1015)
There are 23 commits in total.
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
0.67.3
to 0.67.4
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Videos are not loading on iOS 11 Safari and no errors are caught. Consider the following example:
import AsyncPreloader from "async-preloader";
const items = [
{ "id": "myVideoFile", "src": "assets/video.mp4" }
];
const pItems = AsyncPreloader.loadItems(items);
pItems
.then(items => {
const element = AsyncPreloader.items.get("myVideoFile");
console.log(element); // <-- on iOS 11 Safari this is never reached
})
.catch(error => console.error("Error loading items", error));
It might be related to #4.
After Use srcObject for HTMLMediaElement the issues with videos never loading on Safari are back.
Example:
import AsyncPreloader from "async-preloader";
const items = [{ "id": "myVideoFile", "src": "assets/video.mp4" }];
const pItems = AsyncPreloader.loadItems(items);
[Error] Not allowed to load local resource: blob:blobinternal:///f036178f-fd56-4c6a-9cb5-29b27b9b11a4
Preloader fails silently. No errors.
--
Placing logs inside the try...catch
block in loadVideo shows that in all of the scenarios above the execution never goes inside catch
, hence stopping at video.srcObject = data;
By commenting out the try...catch
block and leaving only video.src = URL.createObjectURL(data);
the results change:
Preloader works.
canplaythrough
is fired.
error
is fired here and promise is rejected.
--
Safari's compatibility with srcObject
is listed as unknown on MDN.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.