Releases: mtraynham/lodash-joins
Correcting umd export
The switch from babel to typescript dropped the babel-plugin-add-module-exports with this commit. This corrects that same issue for Typescript where an import would return an object with a single default
key. Instead it now correctly returns the default export.
3.1.0 - Bugfix/Webpack 5
Fixes a bug with the typings and upgrades to Webpack 5 for client bundling.
3.0.1 - Correction to package inclusion
- Incorporates
index.lodash.d.ts
in the install, #19
3.0.0 - Wow it's been a while :P
This release is a full restructure and migration of the project to using TypeScript. Some other additions are:
- Added a secondary distribution
dist/joins.js
. This is a bundle that does not wrap the join functions in a new lodash context. You instead require each join independently (import {hashLeftOuterJoin} from 'lodash-joins/dist/joins
). I eventually plan to move the project to this import structure, as it's much more modular. - Added a 5th parameter to join functions called a
merger
. Originally, lodash-joins would just assign both the left and right row to an object, but now users can provide a merger function to return whatever they want. This has been defaulted to the old assign method for compatibility.
Pre-Release: Update TypeScript definition and link with npm
#10 - update package.json to connect typings d.ts file (thanks goes to @breath103)
Pre-Release: Adding a merger function for merge type joins
The merger function offers an alternative to handling merge type joins (outer/inner/left-outer/right-outer). Instead of using lodash's _.assign
to create a new row, users can now provide a function that will create a merged row.
function defaultMerger (left: LeftType, right: RightType): LeftType & RightType {
return Object.assign({}, left, right);
}
function leftRightMerger (left: LeftType, right: RightType): {left: LeftType, right: RightType} {
return {left, right};
}
The merge function will be called for all records of the output array, including rows that are not merged. In those cases, either the left or right record will be null
.
Update Dependencies and Add TypeScript definition
No significant code changes.
- Add TypeScript definition file
- Webpack upgraded from 1.x to 3.x
- Use Jasmine instead of Mocha/Chai
- Use Chrome Headless for testing
Updates
Add JSDoc and ESLint
Minor changes to actual code. Changes to documentation and code style (using ESLint with AirBnB config).
2.0! Upgrade to Lodash 4
Lodash 4 is out and this release reflects those changes. On the browser, most of Lodash hasn't changed, but the node (modular) version has. Other than that, there have only been small optimizations to code since the last release.