5.0.0
Big changes
This release includes:
- can-query-logic, a simplified replacement for can-set.
- New service layer packages, moving can-connect to an infrastructure project
- Support for tree-shaking.
- Builds of core and ecosystem modules that can be used directly in the browser.
- Routing broken into separate modules, paving the way for future improvements.
can-query-logic
The can-query-logic package exports a constructor function that builds query logic
from:
- an optional schema or type argument, and
- an optional
options
argument used to convert alternate parameters to
the expected query format.
For example, the following builds query logic from a DefineMap:
import { DefineMap, QueryLogic } from "can";
const Todo = DefineMap.extend({
id: {
identity: true,
type: "number"
},
name: "string",
complete: "boolean"
});
var todoQueryLogic = new QueryLogic(Todo);
New service layer packages
can-connect is the backbone for integrating with your service layer. But most never take advantage of the flexibility using can-connect directly provides.
To make things easier, the following new packages were created which bundles together various connect behaviors:
- can-realtime-rest-model. This allows you to build models that are connected to your service layer and can receive realtime updates (using Socket.io, WebSockets, or any other real-time library).
- can-rest-model. Contains the most basic features needed for connecting a map to your service layer. It is like can-realtime-rest-model but without the realtime.
- can-super-model. The kitchen sink. This model layer contains real-time, fall through caching, and everything else that can-connect contains.
Tree-shaking
Using a bundler / module loader capable of tree-shaking, such as steal 2.0, webpack, or rollup you can import items from the can
package directly, and anything not used will be removed from your production build.
import { DefineMap, fixture } from "can";
DefineMap.extend("ViewModel", { ... });
In the above example, can-define, can-fixture, and any packages they rely upon will be included in the build. Other unrelated packages, such as can-observe, will not.
Web compatible ES module builds
The can package now contains 2 modules that can be consumed directly from the browser. They can be used like:
<script type="module">
import { Component } from "//unpkg.com/can@5/core.mjs";
Component.extend({
tag: "my-app",
view: `CanJS {{feels}} modules`,
ViewModel: {
feels: { default: "😍" }
}
});
</script>
Both core and ecosystem packages include these ES module builds (available via can/core.mjs
and can/ecosystem.mjs
respectively). Minified versions are available as well.
This is useful for building demos, demonstrating bugs, or even for small apps. See the Setting Up CanJS guide for more information on using these packages.
route.urlData and can-route-pushstate 5.0
Due to adding support for tree-shaking, we needed a way to make can-route-pushstate not have side-effects, otherwise simply importing can
would result in pushstate routing being enabled.
We added a new .urlData
property that can be set in can-route, that works similarly to the .data
property for connecting a view model. To enable pushstate do this:
import { route, RoutePushstate } from "can";
route.urlData = new RoutePushstate();
route.register("{page}", { page: "home" });
route.start();
Updates to individual packages
can-ajax
- can-ajax v1.2.0-pre.0
- can-ajax v1.2.0 - Let XHR handle FormData object
canjs/can-ajax#31 - can-ajax v1.2.1
- can-ajax v1.3.0
- can-ajax v2.0.0
- can-ajax v2.0.1 - 2.0.1
Removes a few items from .npmignore that are needed for the canjs/canjs tests. - can-ajax v2.0.2 - 2.0.2
Removes a few items from .npmignore that are needed for the canjs/canjs tests.
can-assign
can-attribute-encoder
- can-attribute-encoder v1.0.5 - Encode/decode :raw bindings
This patch release fixes an issue with bindings ending in:raw
not being encoded/decoded like other bindings.
See canjs/can-attribute-encoder#21
can-attribute-observable
- can-attribute-observable v0.2.1 - making sure properties are writable before using them
#4 - can-attribute-observable v0.2.2 - not using cached element in attribute getter/setter
canjs/can-attribute-observable#7 - can-attribute-observable v0.2.3
- can-attribute-observable v0.3.0
- can-attribute-observable v0.3.1
- can-attribute-observable v1.0.0
can-bind
can-child-nodes
can-cid
-
can-cid v1.0.1 - correctly dependency injecting can-namespace
canjs/can-cid#6 -
can-cid v1.0.2 - Upgrade StealJS
Thesteal
,steal-tools
, and related testing plugins have been updated to the latest versions. -
can-cid v1.0.3 - Fixing tests to work with Steal 0.16
canjs/can-cid#11 -
can-cid v1.1.1 - Fixing map and set in IE9 & IE10
canjs/can-cid#27 -
can-cid v1.1.2 - Fixing @module and @parent in set docs
canjs/can-cid#30
can-component
- can-component v4.1.0-pre.2
- can-component v4.1.0 - Remove can-util deps
- can-component v4.1.1
- can-component v4.1.2 - upgrades can-view-nodelist dependency
- can-component v4.1.3 - Register stache bindings using stache.addBindings
- can-component v4.2.0-pre.1
- can-component v4.2.0
- can-component v4.2.1
- can-component v4.2.2
can-compute
- Unbinding temporary computes now uses (polyfilled) setImmediate instead of a 10ms timeout. This is to make dependent events happen in queue more consistently with mutation observer events (which also use setImmediate in vdom, and native immediate timeouts with real DOM).
- COMPUTE.truthy now doesn't automatically evaluate functions if computes return them as values. This supports using "@" expressions (which do not evaluate a reference function to its returned value) with {{#if}} in can-stache.
- Some external dev dependencies updated: testee and generator-donejs
can-connect
- can-connect v3.0.0-pre.9
- can-connect v3.0.0-pre.10
- can-connect v3.0.0-pre.11
- can-connect v3.0.0-pre.12
- can-connect v3.0.0-pre.13
- can-connect v3.0.0-pre.14
- can-connect v3.0.0-pre.15
- can-connect v3.0.0-pre.16
- can-connect v3.0.0
- can-connect v3.0.1 - 3.0.0
This is a new major release of can-connect!
This change migrates can-connect to being an infrastructure package. can-rest-model
, can-rest-realtime-model
, can-super-model
and others will serve as the primary way in which users will use can-connect.
can-connect-feathers
- can-connect-feathers 3.0.0-pre.20
- can-connect-feathers 3.0.0-pre.21
- can-connect-feathers 3.0.0-pre.22
- can-connect-feathers 3.0.0-pre.23
- can-connect-feathers 3.0.0-pre.24
- can-connect-feathers 3.0.1
- can-connect-feathers 3.0.3
- can-connect-feathers 3.0.4
- can-connect-feathers 3.0.5
- can-connect-feathers 3.0.6 - Catch 'not-authenticated' errors in Session.current
PR: canjs/can-connect-feathers#48
can-connect-tag
can-construct
- can-construct v3.4.0
- can-construct v3.4.1
- can-construct v3.4.2
- can-construct v3.4.3
- can-construct v3.4.4
- can-construct v3.5.0
can-construct-super
can-control
can-data-types
can-debug
- can-debug v1.0.2 - Exposing graph functions
This addsget-graph/get-graph
anddraw-graph/format-graph
to thecan-debug
export. Documentation for these methods will be added in a future minor release. - can-debug v1.0.4
- can-debug v1.1.0 - Registering with CanJS Devtools when available
This automatically sets up the CanJS Devtools extension if can-debug is loaded.
- can-debug v1.2.0 - passing specific can modules required by devtools to register function
This ensures that CanJS Devtools has all of the methods it needs from CanJS modules --Symbol
,Reflect
,queues
,getGraph
,formatGraph
,mergeDeep
. - can-debug v1.2.1 - making sure CANJS_DEVTOOLS.register is called
canjs/can-debug#49 - can-debug v1.2.2 - making sure to actually set CANJS_DEVTOOLS global
canjs/can-debug#50 - can-debug v1.3.0
can-define
- can-define v2.2.5 - identity
Adds theidentity
property definition:
import {DefineMap, Reflect} from "can";
const Todo = DefineMap.extend("Todo",{
id: {type: "number", identity: true},
name: "string",
complete: "boolean"
});
var todo = new Todo({id: 6, name: "mow lawn"});
Reflect.getIdentity(todo) //-> 6
- can-define v2.3.0 - Bye can-util, hello can-data-types
This removes can-util by usingcan-diff
and some other packages. It also usescan-data-type
'sMaybeString
,MaybeNumber
, etc types. - can-define v2.3.1
- can-define v2.3.2 - fix warning messages for default values
canjs/can-define#332 - can-define v2.3.3
- can-define v2.3.4 - Makes Type: Type work with enum types for can-query-logic
- can-define v2.3.5 - fixes getOwnKeys on a basic DefineMap
- can-define v2.3.6 - Removes previously deprecated documentation on Map/List.prototype.set
- can-define v2.3.7
- can-define v2.4.0
can-define-backup
- can-define-backup v1.1.0
- can-define-backup v2.0.0-pre.1
- can-define-backup v2.0.0-pre.2
- can-define-backup v2.0.0
can-define-lazy-value
can-define-stream
can-define-stream-kefir
can-define-validate-validatejs
can-deparam
- can-deparam v1.0.0
- can-deparam v1.0.1
- can-deparam v1.0.2 - Updated docs and added cycle detection
- Add a cycle detection script to test process #9
- Update docs with new @parent & @collection #10
canjs/can-deparam@v1.0.1...v1.0.2
can-diff
- can-diff v0.4.0
- can-diff v0.4.1
- can-diff v0.4.2
- can-diff v1.0.0
- can-diff v1.0.1
- can-diff v1.0.2
- can-diff v1.0.3
- can-diff v1.0.4
- can-diff v1.1.0
- can-diff v1.2.0
can-dom-events
can-dom-mutate
can-event-dom-enter
can-event-dom-radiochange
can-event-queue
can-fixture
- can-fixture v3.0.0-pre.3
- can-fixture v3.0.0-pre.4
- can-fixture v3.0.0-pre.5
- can-fixture v3.0.0-pre.6
- can-fixture v3.0.0-pre.7
- can-fixture v3.0.0-pre.8
- can-fixture v3.0.0-pre.9
- can-fixture v3.0.0-pre.10
- can-fixture v3.0.0-pre.11
- can-fixture v3.0.0 - 3.0.0
This is a major release, upgrading to usecan-query-logic
instead of can-set.
can-fixture-socket
-
can-fixture-socket v0.7.1 - Remove pre-release package references
The post-can-reflect releases from CanJS 3.9 are all stable, so packages shouldn't be depending on pre-releases now. -
can-fixture-socket v0.7.2 - Updated docs, dependencies, and added cycle detection
-
Add a cycle detection script to test process #55
-
Update testee to the latest version 🚀 #47
-
Update documentjs to the latest version 🚀 #49
-
Hide docs that can’t show up in the navigation #58
canjs/can-fixture-socket@v0.7.1...v0.7.2
- can-fixture-socket v1.0.0-pre.1
- can-fixture-socket v1.0.0
- can-fixture-socket v1.0.1
- can-fixture-socket v1.1.0
- can-fixture-socket v2.0.0-pre.1
- can-fixture-socket v2.0.0
can-fragment
can-globals
- can-globals v1.1.0 - add base-url
allows one to get/set the base url of the application - can-globals v1.1.1 - fix merge conflict
I fixed some unmerged previous commits. - can-globals v1.2.0
can-kefir
can-key
- can-key v0.0.1
- can-key v0.1.0
- can-key v0.2.0
- can-key v0.2.1
- can-key v0.3.0
- can-key v0.4.0
- can-key v0.5.0
- can-key v1.0.0
can-key-tree
can-list
can-local-store
- can-local-store v0.1.0
- can-local-store v0.1.1
- can-local-store v0.1.2
- can-local-store v0.1.3
- can-local-store v0.1.4
- can-local-store v1.0.0
can-map
- can-map v4.0.2 - Bug fixes
Fixing
var map = new Map({ 0: "zero" });
canReflect.getKeyValue(map, 0);
and
var map = new Map({ 0: "zero" });
map.attr({ 1: "one" }, "true");
can-map-define
- can-map-define v4.1.0 - implementing can.hasKey Symbol
#65 - can-map-define v4.1.1 - making hasKey work for functions
#66 - can-map-define v4.2.0
can-memory-store
- can-memory-store v0.0.1
- can-memory-store v0.1.0
- can-memory-store v0.1.1
- can-memory-store v0.1.2
- can-memory-store v0.1.3
- can-memory-store v0.1.4
- can-memory-store v0.1.5
- can-memory-store v0.1.6
- can-memory-store v0.1.7
- can-memory-store v1.0.0
can-ndjson-stream
- can-ndjson-stream v1.0.0 - 1.0.0
This is a major release, bumping to 1.0.0 because can-ndjson-stream is already production ready. - Fixed issue with starting chrome headless in CI canjs/can-ndjson-stream#37
- Add "use strict" canjs/can-ndjson-stream#34
can-observation
can-observation-recorder
- can-observation-recorder v1.1.0-pre.0
- can-observation-recorder v1.1.0
- can-observation-recorder v1.1.1
- can-observation-recorder v1.1.2 - Doc fixes
canjs/can-observation-recorder@d110142 - can-observation-recorder v1.2.0
can-observe
can-param
can-parse-uri
can-query-logic
- can-query-logic v0.8.3
- can-query-logic v0.8.4
- can-query-logic v0.8.5
- can-query-logic v0.8.6
- can-query-logic v0.8.7
- can-query-logic v0.8.8
- can-query-logic v0.8.9
- can-query-logic v0.8.10
- can-query-logic v0.8.11
- can-query-logic v1.0.0
can-queues
can-realtime-rest-model
can-reflect
-
can-reflect v1.16.0 - convert, getIdentity, getSchema, cloneKeySort
This adds 4 methods: -
.convert(value, Type)
- convert one value to another -
.getIdentity( value [, schema])
- get a unique value that represents the value -
.getSchema( valueOrType )
- get a schema on the object or the type -
.cloneKeySort( obj )
- return a copy of obj with its properties sorted -
can-reflect v1.16.2 - .size(null) and .size(undefined) return 0
instead of throwing, we give 0 for size(null) and size(undefined) -
can-reflect v1.16.5 - Serialize objects to primitives works
Closes canjs/can-reflect#63 -
can-reflect v1.16.6 - Fixes bug with internal state for serialize() being shared
-
can-reflect v1.16.7 - Properly fast-path size for arrays and strings
canjs/can-reflect#121
can-reflect-dependencies
can-reflect-promise
can-rest-model
- can-rest-model v0.1.0
- can-rest-model v0.1.1
- can-rest-model v0.1.2
- can-rest-model v0.1.3
- can-rest-model v0.1.4
- can-rest-model v1.0.0
can-route
can-route-hash
can-route-mock
can-route-pushstate
- can-route-pushstate v4.0.5
- can-route-pushstate v4.1.0
- can-route-pushstate v4.1.1 - Fixes description docs
- can-route-pushstate v5.0.0-pre.0
- can-route-pushstate v5.0.0 - 5.0.0
This is a major, breaking change for can-route-pushstate. This creates a new API to use can-route-pushstate, by exporting a constructor function that can be set on the can-route.
import route from "can-route";
import RoutePushstate from "can-route-pushstate";
route.urlData = new RoutePushstate();
route.register("{page}");
can-set-legacy
- can-set-legacy v0.1.0
- can-set-legacy v0.2.0
- can-set-legacy v0.2.1
- can-set-legacy v0.3.0
- can-set-legacy v1.0.0
can-simple-dom
can-simple-map
can-simple-observable
- can-simple-observable v2.0.5
- can-simple-observable v2.1.0-pre.1
- can-simple-observable v2.1.0-pre.2
- can-simple-observable v2.1.0-pre.3
- can-simple-observable v2.1.0
- can-simple-observable v2.1.1
- can-simple-observable v2.2.0
can-stache
- can-stache v4.5.9 - cache call expression scopeKeyData arguments for faster performance
#550 - can-stache v4.5.10 - avoid looking up the context unless actually needed
improves performance canjs/can-stache@3182889 - can-stache v4.6.0-pre.1
- can-stache v4.6.0-pre.2
- can-stache v4.6.0 - Allow addHelper to take an object and add addBindings
- can-stache v4.7.0 - addBindings now looks for a symbol
This changes it so thatstache.addBindings(obj)
will first look forobj[Symbol.for('can.stacheBindings')]
to provide a mechanism for slightly better APIs. - can-stache v4.7.1 - Updates addBindings to use viewCallbacks.attrs instead
- can-stache v4.8.0-pre.1
- can-stache v4.8.0
- can-stache v4.9.0
can-stache-bindings
- can-stache-bindings v4.1.4
- can-stache-bindings v4.2.0 - removes can-util deps
- can-stache-bindings v4.2.1
- can-stache-bindings v4.2.2 - on:event:value:bind is initialized
fixes #457 - can-stache-bindings v4.2.3
- can-stache-bindings v4.2.4 - actually fix attribute binding teardown order
an actual fix for #459 - can-stache-bindings v4.2.5
- can-stache-bindings v4.2.6 - Upgrades to can-view-callbacks 4.2 and registers with new callbacks.attrs API
This is a patch release, only changing the way that bindings are registered. It has no affect on outside code. - can-stache-bindings v4.3.0
- can-stache-bindings v5.0.0-pre.0
can-stache-converters
can-stache-key
- can-stache-key v1.1.0
- can-stache-key v1.2.0 - .read() now returns parentHasKey property
canjs/can-stache-key#30 - can-stache-key v1.3.0 - .read() now returns foundLastParent property
Readingfoo.bar.baz
will now returnfoundLastParent: true
iffoo.bar
was found.
- can-stache-key v1.3.1
- can-stache-key v1.3.2 - Writing object performance improvement
canjs/can-stache-key#36 - can-stache-key v1.4.0
can-stache-route-helpers
can-stream
can-stream-kefir
can-string
- can-string v0.0.1
- can-string v0.0.2
- can-string v0.0.3
- can-string v0.0.4
- can-string v0.0.5
- can-string v1.0.0 - 1.0.0
This is the first major release of can-string.
can-string-to-any
can-super-model
can-validate
can-validate-interface
can-validate-legacy
can-validate-validatejs
can-value
can-vdom
can-view-autorender
- can-view-autorender v4.1.0
- can-view-autorender v4.2.0
- can-view-autorender v5.0.0-pre.0
- can-view-autorender v5.0.0-pre.1
- can-view-autorender v5.0.0
- can-view-autorender v5.0.1
can-view-callbacks
- can-view-callbacks v4.1.0
- can-view-callbacks v4.1.1
- can-view-callbacks v4.1.2 - Avoiding use of Object.setPrototypeOf
canjs/can-view-callbacks#90 - can-view-callbacks v4.2.0
- can-view-callbacks v4.3.0
can-view-live
- can-view-live v4.0.6 - using can-attribute-observable.set instead of setAttrOrProp
#102 - can-view-live v4.1.0-pre.1
- can-view-live v4.1.0
- can-view-live v4.1.1
- can-view-live v4.1.2
- can-view-live v4.1.3
- can-view-live v4.1.4-0
- can-view-live v4.1.4 - Only add changesDeps in development
canjs/can-view-live#111
for faster performance
can-view-nodelist
- can-view-nodelist v4.1.0 - isUnregistered
Related to canjs/can-stache#542, adds an isUnregistered flag to know if a nodeList has been unregistered
canjs/can-view-nodelist@ee27a53
can-view-parser
can-view-scope
- can-view-scope v4.1.1 - Preventing errors in getPathsForKey when a context is not an object
canjs/can-view-scope#162 - can-view-scope v4.2.0 - implementing can.hasKey Symbol on Scope.prototype
canjs/can-view-scope#163 - can-view-scope v4.3.0
- can-view-scope v4.3.1
- can-view-scope v4.3.2 - not including notContext scopes in correct paths
canjs/can-view-scope#167 - can-view-scope v4.4.0 - read returns parentHasKey data
var VM = DefineMap.extend({
foo: "string"
});
var vm = new VM();
var scope = new Scope(vm);
scope.read("foo").parentHasKey; // -> true
This also makes it so that getPathsForKey
will return back paths where the key returns a function.
- can-view-scope v4.4.1 - Not removing scope.getPathsForKey in production
scope.getPathsForKey
should only be used in development-mode, but there is at least one thing using it in production, so leaving it in for now. Will remove it once this has been fixed.
- can-view-scope v4.4.2 - refactoring Scope.prototype.hasKey to avoid using getPathsForKey
canjs/can-view-scope#173 - can-view-scope v4.4.3 - Remove dev-only comments for updating thisArg
- can-view-scope v4.5.0