- fix bug: removeEventListener isn't working, due to asymmetry in eventListener wrapper
- fix bug: scoping caused unexpected behavior when library check
event.source == window, where hereevent.sourceis the real window object, butwindowis our proxy object.
- use Proxy + Reflect to replace
<<<for preparing function attributes inaccessible due tobind - use callback mechanism to update local variable to sync members in window with local variables (rspvarsetcb)
- extend the attr import from original function from
prototypeto all attributes.
- in Proxy
get, return the bound function withprototypeupdated from original value. - prevent declaration of variables with illegal variable names in
_wrap.
- remove sandbox attribute from iframe since we do need to interact between iframe and its host.
- fix bug: strict mode workaround in the previous version doesn't work
- workaround: cancel strict mode for correct prop parsing
- fix bug: bundler incorrect ignores
httpprotocol
- fix bug: object set via
definePropertycan't be reached again.
- catch library error and provide additional information for this error in log for better debugging experience.
- fix bug: some libs may access local vars but prepare it via global object, leading to variable not found issue.
- fix bug:
asyncin 5.0.4 is not required and causes issues.
- fix bug:
asyncfeature isn't supported correctly
- remove unnecessary log
- fix bug: will try using
fsonce defined even in browser.
- fix bug:
_refpollutes the input bid.
registryshould not return Promise now, and should considerurlparameter now.
- fix bug:
id()should generate path depending on the type in bid. - remove scoping since it's not necessary in node.js
- audit and fix dependencies vulnerabilities
- fix building issue
- scope script properly
- add missing
nsin cache / id parser
- restructure code for node / browser and bundler
- upgrade / audit fix modules for vulnerability fixing
- also consider
nsin rescope.id
- fix bug: self is undefined ( but should be window )
- fix bug: semantic version pattern matching incorrect
- add
dummy.jsfor testing libraries loading without rescope - fix bug:
windowshould bewinfor server side usage
- add missing
@plotdb/semver
- fix bug: for
windowfunction may not be in attributes, but we check forattrbefore looking infunc, which leads to function not found.
- downgrade
node-fetchback tov2.6.7to make it work in nodejs
- fix bug: registry.fetch is used even if not defined.
- default empty in version / path when building id
- lookup acceptable versions in cache if version range provided.
- support custom registry that return content + version directly.
- use minimized dist file as main / browser default file
- upgrade modules
- patch test code to make it work with upgraded modules
- release with compact directory structure
- dedup in bundler
- fix typo in id generation
- temporarily remove
genfrom bundled code since there are bugs yet to be fixed.
- adding a parameter for skipping ctx since bundler doesn't need to calculate exports and update ctx.
- fix bug: iframe context doesn't work since we never keep it result, causing multi-phase loading failed.
- fix bug:
prop-initingshould be true once we are going to init the lib
- rename
rescope.jstoindex.js- removerescope.jsandrescope.min.js contextno longer pollutewindowobject - a proxy forwindowis used instead.- support bundling, rebundling and bundle loading
- remove ldquery dependency
- support nodejs context
- prevent from accessing deprecated attributes.
- upgrade @zbryikt/template and fix test code building
- add
index.jsandindex.min.jsto deprecatedrescope.jsandrescope.min.js - fix bug: missing var decalration in
load-in-frame - use
index.jsasmainfile in package.json - support fetch in nodejs context
- prepare module by checking window against existence instead of value
- minimize js further
- upgrade modules for test code
- add
titlein iframe for accessibility
- rename
set-registrytoregistry. - update in-frame scope when calling
registry. - align registry logic with
@plotdb/csscopeand@plotdb/block. - change from
libtoassets/libfor default registry root
- add meta charset information in iframe HTML code to prevent some browser warning;
- add
prejsoption for injecting pre-requirement such as polyfills
- re-enable polluting global scope with context call, but only for in-frame context.
- support module style(
{name,version,path}) style url - support customizing
registryfor module style url
- mutex to prevent re-entrance of
loadfunction between simultaneously multiple calls.
- dont pollute global scope with context call since we can't store global scope when context calls overlap.
- remove dependency to
@loadingio/ldquery
- remove unused function
_wrapperand rename_wrapper-altto_wrapper. - hide global libraries temporarily if we are going to load them in rescope.
- add caching feature
- make position of delegator iframe to top left 0 to prevent from visual impact of the host document.
- make position of delegator iframe absolute to prevent from visual impact of the host document.
- track window injection and ignore injected members from capturing in context.
- keep window properties from iframe at initial time
- update dist folder
- merge local window and global window by prototype chain and
hasOwnProperychecking, so we can both- check custom members from libraries.
- provide access to window native members for libraries.
- correctly handling promise in recursive
loadcall. - load variables both into local scope and global scope in wrapper.
- force global related variables in wrapper to
this. may lead to some unwanted issue if libraries access - restore global session by iterating the correct object.
- add support to loading with custom context. this is useful with multiple stages loading.
- upgrade packages and fix vulnerabilities
- rewrite the entire module - wrap libraries in scope to prevent failure when running asynchronous task inside library context.
- bug fix: rejection during loading failure should be passed to rejection callback.
- bug fix: if context function return Promise, we should wait until it resolve to discharge scope.
- add
until-resolveparameter incontextfor enabling this. - this is only for script loading procedure.
- add
- add random name in delegator for identifying current scope.
- in context, passing only the loaded libraries instead of the whole global object to callback function.
- by default use
delegate. calculate imported variables withdelegate. - add
useDelegateLiboption for originaldelegateeffect.