This repository has been archived by the owner on Mar 6, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCHANGES.txt
232 lines (190 loc) · 8.86 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
DEVELOPMENT VERSION
Global:
- Added source map generation.
Types:
- Removed validation from coerce().
- Removed coerceOnly().
0.2.0 : 2016-12-05
BREAKING:
- Attributes are now installed as properties instead of functions. This means
o.js is more in-line with modern JavaScript practices but completely breaks
backwards compatibility.
- Methods will now be installed *before* traits rather than after. This means
that a trait's requires setting may require methods, which is just about the
most important use of requires. This also means that a trait's
around/before/after modfiers will be applied to the object which is being
installed to. Note that attributes are still applied after traits.
Global:
- RIP Jam.
- Lots of documentation cleanup.
- Created a new bootstrap module that is used to simplify cases where a module
needs to access itself or access another module which requires it. This
also simplified the generation of the combined o.js slightly.
- Enabled strict mode in the combined o.js.
- Enabled strict mode inside of each module.
- Undo "Use a more condenced for loop, using `in`, when going over arrays" from
0.1.0 - turns out that wasn't a great idea.
Traits:
- The requires argument now uses the DuckType to validate the object which
the trait is being applied to. This is backwards compatible because a
duck type given an array works just like how requires worked with an array.
But, now, an object may be passed as well which can be used to require not
only the existence of the property, but its type.
- Added the `is` argument for applying built-in class traits.
- Added the `attributesAre` and `attributeTraits` arguments for defining
the `is` and `traits` arguments for new attributes.
Attributes:
- Attributes install on objects as properties now instead of functions. The
one exception is the installed clearer is still a function (because that
makes sense).
- Attribute attributes are now installed as properties. This really only
matters if you interact with attribute objects directly.
- Added the `is` argument for applying built-in attribute traits.
- A `traits` argument is now supported, allowing attribute behavior to be
customized.
Types:
- Types now throw a custom o.TypeValidationError object when validation fails.
- Errors thrown when validation fails now include much more information about
what failed and why it failed.
- Added the new o.TupleType and o.LazyType types.
Plumbing:
- Adjust o.augment() to set the constructor's protoytype's constructor to
the parent constructor.
- Added o.prependIdentifier().
- Removed o.proxy() and o.accessor().
0.1.0 : 2016-11-08
Global:
- Use a more condensed for loop, using `in`, when going over arrays.
- Added a current branch to the GitHub repo for tracking the latest
release from a single ref.
Traits:
- Add a declarative interface for defining new traits and classes.
Types:
- Added an o.disableTypeValidation() function for situations where validation
may be traded for better performance.
0.0.11 : 2015-01-16
Global:
- Added a .lvimrc file to enforce indentation style (requires the
vim-localvimrc plugin).
- Default o.Class, o.Trait, and o.Attribute constructor arguments to
an empty object (o.Type was already doing this).
- Moved wiki documentation into the main repo so that it is versioned
along with the code.
Traits:
- Recursively set child trait attribute arguments when calling setFromArgs.
This means that when making a class instance that arguments for child
trait attributes will now be applied as they should have been.
Attributes:
- Use the new identifier type instead of the nonEmptyString type for various
arguments such as key, predicate, etc.
Types:
- Added an identifier type to match against valid JavaScript identifiers
rules (does not currently support unicode characters), per:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals#Variables
0.0.10 : 2014-03-09
Global:
- Use Grunt for build tools.
- Lots of reworking of the build tools - much less room for human error.
- Created an Object.getPrototypeOf() shim which calls __proto__ if not
available in order to support older browsers. This is available as the
plumbing function o.getPrototypeOf().
0.0.9 : 2014-02-04
Global:
- Migrated everything to CommonJS format modules (no more hacks for the
web, those will be handled independently).
- Better error messaging across the board (no more "..." errors).
- Lots of adjustments to reduce the minified size by several kilobytes.
- Created several utilities in the bin directory for creating combined
and minified versions of o.js.
- Combined o.js and minified o-min.js are now shipped within the o-js
repository.
Classes:
- Renamed o.Constructor to o.Class, because that is what it is and it is
less to type.
Traits:
- Added requires attribute to o.Trait so that traits can declare a
base-line interface that they require to be installed onto an
object.
Types:
- Added o.simpleObjectType for checking if an object's constructor is Object.
- Added o.typeType, o.attributeType, o.traitType, and o.classType for validating
and coercing o.js's built-in object types.
- ArrayOfType and ObjectOfType now apply their inner type's coercions.
- Greatly simplify the trait type.
- InstanceOfType declares a coercion that will create a new instance using
the value as arguments to the constructor.
- Added o.positiveIntType due to this type being a common case.
Plumbing:
- Exposed o.ucFirst to the public.
0.0.8 : 2014-01-03
- In addition to accepting an Array, o.DuckType now accepts an Object,
allowing for type checking.
- Added o.PatternType for creating types that match against a RegExp.
- Added bower.json so that Bower has some more info about this package.
- Attribute/Trait.install() now supports a second argument for specifying
the value of the attribute(s).
- The attributes attribute of Trait is now an object instead of an array.
- Added o.local() to localize object property changes to a scope.
- Attribute properties reader, writer, predicate, and clearer now take
false instead of null.
- An attribute's writer property now defaults to false to support the best
practice of immutable objects.
- Avoid a race condition when filters depend on other attributes being
set during object construction.
- Added a builder argument to o.writer and o.Attribute which provides a
method-based alternative to devoid.
- Constructors now get a trait applied to them that exposes a type and
trait attribute.
- Traits now have a type attribute which returns a Duck type that can be
used to validate that an object exposes an interface compatible with
the trait.
0.0.7 : 2013-06-18
- Attributes on Traits (and Constructors) can now be pre-made o.Attribute
objects which may be re-used.
- Optimize some bits to produce a smaller minified output.
- Remove o.is functions.. again, they are a nice-to-have that just bloats things.
- Remove the special initArgs for attributes and traits in Attribute.
- Support Travis CI.
0.0.6 : 2013-05-27
- Merge o-types and o-attributes in to the main library.
- New Trait and Constructor objects.
- Redesign types so that each type is an object with coercions.
- Migrate tests for QUnit to tap, and add many new tests.
- Many many new tests.
- Redesign Attribute.
- Allow argKey to be nullable in attributes.
- Support Type objects in o.writer.
- Add a package.json for npm.
- o.writer now returns the original value.
- o.accessor returns the return value of o.writer if writing.
- o.predicate now treats an undefined value as a lack of having.
- Coercion now only validates against the first type, not parent types, since
the value, before being coerced, will often times fail a parent's validation.
0.0.5 : 2013-04-14
- Fix trailing commas in o-attribute.js breaking minification.
0.0.4 : 2013-04-14
- Remove the option definition property.
- Rename o.extend to o.augment.
- Rename the default definition property to devoid.
- Rename the extends definition property to augments.
- Rename the isa definition property to type.
- New primitive and object types for boolean, string, and number.
- Added the nonEmptyString type.
- Rename the extends type to instanceOf.
- Added the typeOf type.
- New arrayOf and objectOf types.
- New attribute extention (o-attribute.js).
- Add versions and version checking to the libraries.
0.0.3 : 2013-03-24
- New types extension (o-types.js).
0.0.2 : 2013-03-18
- Added o.construct.
- o.extend now accepts a third argument to specify properties for the
prototype.
- Full test coverage of the Core API.
- Fixed around to handle return values.
- Fixed o.extend to properly inherit the parent's prototype instead of merging
it with the child's.
- Default isa to "object" if extends is set.
0.0.1 : 2013-03-10
- First release!