Skip to content

Commit

Permalink
V2 (#31)
Browse files Browse the repository at this point in the history
* update dependencies to latest

* initial implementation of working transform with existing unit tests

* fix eslint and get all tests passing

* abstract out templates

* abstract out traverse configs

* abstract out utils

* abstract handlers

* delete previous setup

* rename `callback` to `handler`

* refine types

* convert to TS and ESM

* code cleanup

* hoist type

* Release 2.0.0-beta.0

* clean up README

* add CHANGELOG

* rename tests and fix bad transforms

* forgot one more

* support usage in conditionals

* Release 2.0.0-beta.1

* support unary and binary expressions

* also add `await` expressions

* better handling of lazy usages

* prevent `dist` from being stored in github

* remove dist from git

* centralize and improve IIFE wrapping

* Release 2.0.0-beta.2

* ensure top-level conditionals are respected

* Release 2.0.0-beta.3

* improve README

* remove unused variable in template

* rename `logic` to `returned` and fix unit tests
  • Loading branch information
planttheidea committed Dec 18, 2023
1 parent 11437d1 commit 69b7e93
Show file tree
Hide file tree
Showing 242 changed files with 8,631 additions and 8,379 deletions.
16 changes: 16 additions & 0 deletions .babelrc
@@ -0,0 +1,16 @@
{
"plugins": [
"babel-plugin-macros",
[
"@babel/plugin-transform-runtime",
{
"absoluteRuntime": false,
"corejs": false,
"helpers": true,
"regenerator": false,
"useESModules": false
}
]
],
"presets": ["@babel/preset-env", "@babel/preset-typescript"]
}
13 changes: 13 additions & 0 deletions .eslintrc
@@ -0,0 +1,13 @@
{
"env": {
"node": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "commonjs"
},
"plugins": ["@typescript-eslint"],
"root": true
}
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
node_modules
node_modules
dist
13 changes: 13 additions & 0 deletions .npmignore
@@ -0,0 +1,13 @@
__tests__
src
.babelrc
.eslintrc
.gitignore
.npmignore
.npmrc
.prettierrc
.release-it.beta.json
.release-it.json
jest.config.js
tsconfig.json
yarn.lock
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

8 changes: 8 additions & 0 deletions .prettierrc
@@ -0,0 +1,8 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all"
}
46 changes: 46 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,46 @@
## CHANGELOG

# 2.0.0

## Breaking change

- `findRight` has been renamed to `findLast`
- `findIndexRight` has been renamed to `findLastIndex`

## Enhancements

- Support for conditional and lazy scenarios (ternaries, logical expressions, default parameter assignments, etc.)
- Better TS typing
- Better inline handling of complex logic

# 1.2.2

- Fix types related to `ArrayHandler` / `ObjectHandler` [#12](https://github.com/planttheidea/inline-loops.macro/pull/12)

# 1.2.1

- Add console warnings for deopt scenarios [#10](https://github.com/planttheidea/inline-loops.macro/pull/10)

# 1.2.0

- Expand aggressive inliner [#8](https://github.com/planttheidea/inline-loops.macro/pull/8)

# 1.1.0

- Add `flatMap` / `flatMapRight` [#6](https://github.com/planttheidea/inline-loops.macro/pull/6)

# 1.0.3

- Republish for bad version

# 1.0.2

- Allow inline of reduce [#1](https://github.com/planttheidea/inline-loops.macro/pull/1)

# 1.0.1

- fix description

# 1.0.0

- Initial release!

0 comments on commit 69b7e93

Please sign in to comment.