Releases: poppinss/utils
Releases · poppinss/utils
Fix for v3.0.0
Adding a bunch of new helpers & re-arrange exports
Breaking Changes
The version 3.0 re-format the exports to expose an "helpers" subpath to be used within the AdonisJS apps as well.
The idea is to separate helpers that we need to share with AdonisJS core inside its own module, accessible as @poppinss/utils/build/helpers
.
Inside helpers subpath
Following modules are now moved to a subpath.
MessageBuilder
base64
compose
fsReadAll
interpolate
requireAll
resolveDir
resolveFrom
// Earlier
import {
MessageBuilder,
base64,
compose,
fsReadAll,
interpolate,
requireAll,
resolveDir,
resolveFrom,
safeEqual
} from '@poppinss/utils'
// After version 3.0
import {
MessageBuilder,
base64,
compose,
fsReadAll,
interpolate,
requireAll,
resolveDir,
resolveFrom,
safeEqual
} from '@poppinss/utils/build/helpers'
randomString
The randomString
is now part of the string
helpers.
// Earlier
import { randomString } from '@poppinss/utils'
randomString(32)
// After version 3.0
import { string } from '@poppinss/utils/build/helpers'
string.generateRandom(32)
lodash
The following lodash functions have been removed with new alternatives.
snakeCase
camelCase
startCase
// Earlier
import { lodash } from '@poppinss/utils'
lodash.snakeCase()
lodash.camelCase()
lodash.startCase()
// After version 3.0
import { string } from '@poppinss/utils/build/helpers'
string.snakeCase()
string.camelCase()
string.titleCase()
Commits
- chore: generate lodash builder before typescript build 0c2575b
- docs(README): fix typos 754e087
- feat: adding bunch of new helpers and reformatting exports 081029e
- chore: remove redundant typedoc.js file 82baa6f
- style: fix linter errors 3cee2df
- chore: reformat source files fec4cd4
- chore: remove npm-audit hook in favor of synk 18b32b4
Add `compose` helper
Add support for defining a custom strategy function
- feat: add support for defining custom strategy function 4eefea7
Fix a bug with `defineStaticProperties` method
Update underlying dependencies
Update underlying dependencies
- chore: update dependencies and remove ts-node in favor of require-ts d64d7a0
Improve types for the defineStaticProperty method
- improvement: make defineStaticProperty helper typed 56d1657
Adding defineStaticProperty helper
Add `resolveDir` method
- feat: add resolve dir method d7a1d0f