Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Lodash dependency + build ESM output #45

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Name of the pipeline
name: CI

# When pushing to `master` or when there is a PR for the branch.
on:
pull_request:
push:
branches:
- 'master'

jobs:
ci:
name: Lint & Test (Node ${{ matrix.version }})
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
version:
- 18
- 20
- 22
- current
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.version }}
cache: 'npm'

- name: Install Packages
run: npm ci

- name: Build
run: npm run build

- if: ${{ matrix.version == 'current' }}
name: Lint
run: npm run lint

- name: Test
run: npm run cover

- if: ${{ matrix.version == 'current' }}
name: Coveralls
uses: coverallsapp/github-action@v2

# Cancel running workflows for the same branch when a new one is started.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

52 changes: 29 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,75 @@
# Changelog

## 1.0.0.alpha-4

- 🚨 **Breaking**: remove `collection.reduce`, `collection.orderBy`, and `collection.chunk`
- Remove dependency on Lodash, the remaining collection functions now use native array methods
- `libx` now exports both ES Modules and CommonJS

## 1.0.0.alpha-3

* Remove the `model` builder as I have never seen or heard of it used.
* Upgrade packages, including MobX to v6.
* Remove `peerDependencies` as they cause more trouble than they are worth.
* Remove dependency on `mobx-utils` and copy over the the `moveItems` from there.
- Remove the `model` builder as I have never seen or heard of it used.
- Upgrade packages, including MobX to v6.
- Remove `peerDependencies` as they cause more trouble than they are worth.
- Remove dependency on `mobx-utils` and copy over the the `moveItems` from there.

## 1.0.0.alpha-2

* Conditional types for better inference of `T` in `ICollection<T>` [(#8](https://github.com/jeffijoe/libx/pull/8), [dezayasa](https://github.com/dezayasa))
* Upgrade all packages
- Conditional types for better inference of `T` in `ICollection<T>` [(#8](https://github.com/jeffijoe/libx/pull/8), [dezayasa](https://github.com/dezayasa))
- Upgrade all packages

## 1.0.0.alpha-1

* Fluid model builder
- Fluid model builder

## 1.0.0

* 🚨 **Breaking**: upgraded to MobX v4. To keep using MobX <= v3, use the LibX 0.x release.
* ✨ **New**: add `referenceOne` and `referenceMany` utility functions.
- 🚨 **Breaking**: upgraded to MobX v4. To keep using MobX <= v3, use the LibX 0.x release.
- ✨ **New**: add `referenceOne` and `referenceMany` utility functions.

## 0.3.0

* Added factory-based model API.
* Internal ID map for faster `get` lookups.
- Added factory-based model API.
- Internal ID map for faster `get` lookups.

## 0.2.2

* Added `collection.forEach` and `collection.at`.
- Added `collection.forEach` and `collection.at`.

## 0.2.1

* Added `collection.move(fromIndex: number, toIndex: number)` which calls `items.move` on the inner Observable Array
- Added `collection.move(fromIndex: number, toIndex: number)` which calls `items.move` on the inner Observable Array

## 0.2.0

* parsing a 3+ level deep parent->child->parent structure no longer results in duplicate models. This works by checking the collection _after parsing_ to see if a model with the same ID was added to the collection. If it was, parse the data _again_ but while _updating the existing model_. Refer to the README for an example.
- parsing a 3+ level deep parent->child->parent structure no longer results in duplicate models. This works by checking the collection _after parsing_ to see if a model with the same ID was added to the collection. If it was, parse the data _again_ but while _updating the existing model_. Refer to the README for an example.

## 0.1.7

* Calling `collection.get(undefined)` no longer errors when passed null or undefined.
- Calling `collection.get(undefined)` no longer errors when passed null or undefined.

## 0.1.6

* Added LoDash `orderBy` - [#2](https://github.com/jeffijoe/libx/issues/2)
- Added LoDash `orderBy` - [#2](https://github.com/jeffijoe/libx/issues/2)

## 0.1.4

* Added more docs
* More LoDash functions
- Added more docs
- More LoDash functions

## 0.1.3

* Moved LoDash and MobX out of dependencies and into peerDependencies.
- Moved LoDash and MobX out of dependencies and into peerDependencies.

## 0.1.2

* Fixed a stack overflow in `create`
- Fixed a stack overflow in `create`

## 0.1.1

* More tests
* Rearranged overloads
- More tests
- Rearranged overloads

## 0.1.0

* First official release
- First official release
Loading
Loading