This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
Releases: composor/composi
Releases · composor/composi
Version 2.4.7
Updated JSDoc types. 1. Changed HTMLElement types to Node. This required treating HTMLElement methods, such as “setAttribute” as expando properties escaped with [“”], because they do not exist on type Node. Browsers will automatically coerce a Node to an HTMLElement type to allow using its methods. Static type checkers can’t, sigh. 2. Switch from using generic Object type to Object.<string, any> to designate generic object literal type.
Version 2.4.6
v2.4.6 Using null instead of undefined for assignment and refined JSDoc comm…
Version 2.4.5
Renamed element.node to element.vnode for clarity. 1. Renamed element.node to element.vnode. This affects Component class, updateComponent.js and patch.js 2. Updated element property definition in Component class to include vnode property. 3. updateComponent function now checks for value of component.element.vnode for patching. 4. patch function stores computed VNode on element as vnode property and passes element.vnode as old VNode value. 5. Renamed node to newNode in patchElement as counterpoint to oldNode.
Version 2.4.4
Update for VNode type. 1. Specific VNode type definition was causing bug in Visual Studio Code that prevented intellisense from working. 2. Removed VNode type and replaced it with generic Object type.
Version 2.4.2
Refactor of setProp function. 1. Broke out setProp helper functions into separate files in folder: setPropHelpers. The setProp function imports these to use. 2. Helper function handleClassName converts className prop to class. 3. Helper function handleDangerousSetInnerHTML converts value of prop dangerouslySetInnerHTML into innerHTML value. 4. Helper function handleStyles converts object literal of style values into CSS styles. 5. Helper function handleXlinkHref converts Xlink-href prop into SVG 1.0 xlink:href attribute. 6. Fixed issue with Component.setState so that when using a callback, if the user fails to return prevState, the component will not try to update state. This avoids updates with bad state assignment. 7. Minor refactor of isSameNode function so that by default it returns false. 8. Updated new project jsconfig.json file to automatically support type checking with JSDoc comments in Visual Studio Code.
Version 2.4.1
v2.4.1 Added documentation about what Composi and React share, and how they …
Version 2.3.4
Renamed testIfVNodesDiffer to isSameNode. 1. Renamed testIfVNodesDiffer to isSameNode. Easier to say and write. 2. Updated JSDoc comments for h. 3. Updated JSDoc comments for Fragment.
Version 2.3.1
Updated new project build script. 1. Added specific import of rollup for package.json of new projects.
Version 2.3.0
Update for better type compliance and some minor bug fixes. 1. Updated JSDocs types to pass type checking with Visual Studio Code's JavaScript Language Service enabled. This uses Visual Studio Code's TypeScript Language Service for more accurate type analysis. 2. You can now get live type checking by using the following setting in your user preferences for Visual Studio Code: "javascript.implicitProjectConfig.checkJs": true. This will also flag misspelled types, typos for variables, properties, etc. This also enables features such as "go to definition", "peak definition", "definition on hover", code completion, renaming of symbols across files, etc. 3. Refactored setProp to handle boolean values closer to spec for setAttribute. Now if an attribute value is false, 'false', null, 'null', undefined, 'undefined', 'no' or 'off, the attribute will be removed. Any other value, include "", will result in the attribute being added. 4. Cleaned up requestAnimation polyfill to support modern browsers. Maintaining support for IE9 and later. 5. Refactored getKey to avoid edge cases where it returned the wrong value/type. 6. Refactored createElement to automatically convert numbers to strings before creating text nodes. 7. Refactored custom properties on native objects to use brackets [] to avoid type warnings about properties not existing on target object. 8. Added stubs to Component class for user-defined methods on the extended Component class for render, componentWillMount, componentDidMount, componentWillUpdate, componentDidUpdate and componentWillUnmount. This is to complete type expectations for these properties whether passed in as options during initialization or as methods when extending the Component class. This allows the type checker to identify when they are properties defined on the constructor and when they are methods. 9. Updated tests for component.html for updated behavior of setting attributes with boolean values.
Version 2.2.1
Cleaned up Component class. 1. Moved requestAnimationFrame polyfill from Component class to separate file in utils. 2. Moved testIfVNodesDiffer from Component class to separate file in utils. 3. Simplified execution of componentWillUpdate and componentDidUpdate in Component class. 4. Got rid of trailing spaces from many files.