Open
Conversation
Snyk has created this PR to upgrade knockout from 3.4.0 to 3.5.1. See this package in NPM: https://www.npmjs.com/package/knockout See this project in Snyk: https://app.snyk.io/org/maurever/project/399018ed-ffa3-41d0-8e3f-ab10f80433f0?utm_source=github&utm_medium=upgrade-pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade knockout from 3.4.0 to 3.5.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version fixes:
npm:knockout:20180213
Release notes
Package name: knockout
-
3.5.1 - 2019-11-05
- Empty template with
- IE error from inserting a node before itself #2450
- Problem with initial
- Missing
- Template binding removes
-
3.5.0 - 2019-02-21
- Fix performance issue with nested
- Fix exception with
- Fix misplaced nodes with
- Fix duplicated nodes with
-
3.5.0-rc2 - 2018-09-08
- Fix to maintain an element's focus when it's moved by the
- Fix changes to
- Fix regression to
- Revert changes in
- Remove global
- Fix the interaction of
- Add an option for
- Throw an error for unbalanced virtual elements.
- Support an
- Support a custom rate-limit function as the
- Support setting custom CSS properties with the
- Optimize how many elements are moved by
- Update TypeScript declarations.
-
3.5.0-rc - 2018-04-26
- Expand
- Include TypeScript declarations.
- A few minor bug fixes.
-
3.5.0-beta - 2018-01-12
-
-
- You can react to the completion of bindings such as
- You can react to the completion of components, including nested components, by including a
- Binding strings can include template literals (backticks) and C++ and C-style comments.
- Observable arrays include
- The new
- The new
- The new
- The new
- Similarly to
- Performance improvement: String templates are no longer parsed each time they are referenced. Instead the parsed nodes are cached and cloned.
- Observables notify a new
- Computed observables include a
- The
- The
- The
- The
- Knockout will throw an error if it finds an unmatched closing virtual element (
-
3.4.2 - 2017-03-06
- stop infinite loop from dirty events in circular computeds (#1943)
- only update a computed if dependency has actually changed; not if it was just dirty (#2174)
- only notify subscriptions that exist when a change occurs; don't notify future subscribers (#2163)
- notify dependent computed of change in reverted observable if the computed previously read a different intermediate value (#1835)
- update a pure computed if a dependency has changed and notification is pending (#2197)
-
3.4.1 - 2016-11-08
- Knockout observable arrays leak memory when resubscribing to
- Export
-
3.4.0 - 2015-11-17
- Improves performance of components, templates, computeds, and observables.
- Includes a native version of deferred updates, along with a microtask queue (
- Calls a
- Includes
- #1903 - New
- #1905 - Endless recursion possible with
- Components now use microtasks to perform updates asynchronously instead of
- The new, native deferred updates feature has a slightly different API and is implemented differently than the Deferred Updates plugin. Migrating from the plugin will generally require some code changes (full details to come soon).
from knockout GitHub release notesThis release fixes a few regression bugs in 3.5.0:
ifoption throws an error #2446valuebinding on<select>when the options are generated via aforeachbinding #2452arrayChangenotifications when using deferred updates #2454<script>template contents #24843.5.1 also fixes some issues with and expands 3.5.0's TypeScript definitions.
Knockout 3.5.0 includes a few new bindings and new ways to interact with observables and bindings. The full list is detailed under 3.5.0 Beta, 3.5.0 RC, and 3.5.0 RC2.
The final 3.5.0 release includes fixes for a few regressions in the pre-production releases:
ifbindings (#2414)foreachandbeforeRemove(#2419)foreachand Punches plugin (#2433)foreachandif(#2439)This release includes a number of fixes for regressions in the previous 3.5.0 release candidate. Given the time since the RC, we also decided to include a few small improvements.
foreachbinding.stylebinding to correctly appendpx.ko.contextForwhen used afterko.applyBindingsToNode.ko.utilsto use native array methods.createChildContextWithAsoption and addnoChildContextbinding option. The default behavior forasmatches previous releases.descendantsCompleteandif/ifnot/withbindings.if/ifnot/withbindings:completeOn: "render"will have the binding wait to triggerdescendantsCompleteuntil it is rendered.ko.applyBindingsthrows an error if a non-Node is given as the second parameter.optionsobjects as a parameter tocreateChildContext.methodparameter to therateLimitextender.stylebinding.foreach.Changes since 3.5.0 Beta:
descendantsCompleteto include bindings other thancomponent, such asif,with, etc.ko.whenwill return a Promise if called without a callback function.Knockout 3.5.0 beta release notes
Full list of issues: https://github.com/knockout/knockout/milestone/9?closed=1
Important: This release includes some minor breaking changes to the
foreachbinding to improve performance and clarify features. These changes can be turned off using global options.When using the
asoption with theforeachbinding, Knockout will set the named value for each item in the array but won't create a child context. In other words, when usingas, you will have to use the named value in bindings:text: item.propertyrather thantext: property. This can be controlled by settingko.options.createChildContextWithAs = true. (See #907)To improve performance when array changes are from a known, single operation, such as
push, theforeachbinding no longer filters out destroyed items by default. To turn this off and filter out destroyed items, you can setincludeDestroyed: falsein theforeachbinding or setko.options.foreachHidesDestroyed = trueto use the previous behavior by default. (See #2324)Other enhancements
ifandwithusing the newchildrenCompletebinding or subscribing to thechildrenCompletebinding event.(See #2310)
koDescendantsCompletemethod in the component viewmodel or subscribing to thedescendantsCompletebinding event. (See #2319)sortedandreversedmethods that return a modified copy of the array. This is in contrast tosortandreversethat modify the array itself.classbinding supports dynamic class strings. This allows you to use thecssandclassbindings together to support both methods of setting CSS classes.usingbinding, similarly towith, binds its descendant elements in the context of the child viewmodel. Unlikewith, which re-renders its contents when the viewmodel changes,usingwill just trigger each descendant binding to update.hiddenbinding works oppositely tovisible.letbinding allows you to set values that can be used in all descendant element bindings, regardless of context.let, you can set such values at the root context by providing a function as the third parameter toko.applyBindings. (See #2024)spectateevent whenever their value changes. Unlike the standardchangeevent, this new event isn't necessarily delayed by rate-limiting or deferred updates. You can subscribe to the event without waking a sleeping pure computed; the computed will notify the event if it is accessed with a new value.getDependenciesmethod that returns an array of the observables that the computed is currently watching.attrbinding supports namespaced attributes such asxlink:hrefinsvgelements.ko.whenfunction allows you to run code once when an observable or condition becomes true.ko.isObservableArrayfunction can be used to check if something is ako.observableArray.stylebinding will usejQueryif present. Even without jQuery, the binding now supports standard style names, such asbackground-color, and automatically appendspxif needed to styles that expect it.<!--/ko-->).Fixes
30 or so separate fixes are included in this release,
This release fixes a number of bugs related to deferred updates and computed observables.
Fixed:
pureComputedsometimes doesn't pick up a change in a dependency (#1975 and #1992)arrayChangeevents (#1973 and #1974)$rawDatawithinwithbindings and rendered templates (#1415)computed._latestValuein debug mode (b3f24b1)New features and bug fixes
ko.tasks).ko.onErrorhandler, if defined, for errors from asynchronous code.ko.options.useOnlyNativeEventscan be set to tell Knockout to use only native (not jQuery) events.ko.isPureComputed().The 3.4.0 RC release notes has the full list of issues and pull requests included in this release. The final release fixes two regression bugs found in the RC:
beforeRemovebehavior can break retained items.ko.computed.Possible compatibility issues
setTimeout. Since microtasks are run before the browser repaints the page, all loaded components will be initialized and displayed in a single repaint. Although this reduces the overall time needed to display components, it could result in a longer delay before anything is displayed.ko.observableandko.computedno longer use a closure when defining their methods, such asdisposeandvalueHasMutated. These functions expectthisto be set correctly and so can't be used directly as a callback. Instead you'll need to usebind, such asobs.dispose.bind(obs).Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs