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

Postfixing characters #322

Comments

@komyg
Copy link

komyg commented Dec 5, 2023

Hi, I saw that you've added the option to prefix characters.

Would you consider adding the option to postfix characters as well? For example: keeping the underscore at the end of type_?

We are using change-case to generate typescript code, and it would be useful for us to be able to keep some postfixed characters, so that we don't accidentally generate a reserved keyword such as type or const.

@blakeembrey
Copy link
Owner

SGTM. Done and released.

hoonoh referenced this issue in hoonoh/ts-pg-model Dec 12, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [change-case](https://togithub.com/blakeembrey/change-case/tree/master/packages/change-case#readme) ([source](https://togithub.com/blakeembrey/change-case)) | [`4.1.2` -> `5.3.0`](https://renovatebot.com/diffs/npm/change-case/4.1.2/5.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/change-case/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/change-case/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/change-case/4.1.2/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/change-case/4.1.2/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>blakeembrey/change-case (change-case)</summary>

### [`v5.3.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.3.0): Add `suffixCharacters` option

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.3.0)

**Added**

-   New `suffixCharacters` option to retain characters during case conversion. Useful for retaining something like the `_` in `type_`. Closes [https:/blakeembrey/change-case/issues/322](https://togithub.com/blakeembrey/change-case/issues/322).

### [`v5.2.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.2.0): New `delimiter` and `mergeAmbiguousCharacters` options

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

**Added**

-   Add `delimiter` option for customizing join character in any change case method
-   Add `mergeAmbiguousCharacters` for camel and pascal case to avoid prefixing `_` before numbers

### [`v5.1.2`](https://togithub.com/blakeembrey/change-case/compare/[email protected])

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

### [`v5.1.1`](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.1.1)

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.1.1)

### [`v5.1.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.1.0): Add `prefixCharacters` option

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

**Added**

-   New `prefixCharacters` option to retain characters during case conversion. Useful for something like `_$` to keep "private".

### [`v5.0.2`](https://togithub.com/blakeembrey/change-case/compare/0d8e4d9e2dbb0e60eda50a5deafd57b4d227ef60...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9)

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/0d8e4d9e2dbb0e60eda50a5deafd57b4d227ef60...8d3793fa2fc1646c4c2e1fba036681a42f8cdab9)

### [`v5.0.1`](https://togithub.com/blakeembrey/change-case/compare/[email protected])

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

### [`v5.0.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.0.0): Huge ESM rewrite

[Compare Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.0.0)

**Changed:**

-   The package is now only supported using ESM imports in node.js
-   Merged all core case changing libraries into `change-case`
-   Added support for internationalization using unicode regex features
-   Renamed `paramCase` to `kebabCase`

**Removed:**

-   Removed ability to specify word split and strip regexes

**Added:**

-   Exposed a new `split` function for accessing behavior of word splitting before case change
-   Added `locale` and `separateNumbers` options
-   Added `pascalSnakeCase` support
-   Added `change-case/keys` for transforming objects into the requested case

**Deprecated packages:**

-   `camel-case` (use `change-case`)
-   `capital-case` (use `change-case`)
-   `constant-case` (use `change-case`)
-   `dot-case` (use `change-case`)
-   `header-case` (use `change-case` -> `trainCase`)
-   `is-lower-case` (prefer manual: `input.toLocaleLowerCase(locale) === input`)
-   `is-upper-case` (prefer manual: `input.toLocaleUpperCase(locale) === input`)
-   `lower-case-first` (prefer manual: `input.charAt(0).toLowerCase() + input.slice(1)`)
-   `lower-case` (prefer manual: `input.toLowerCase()` or `input.toLocaleLowerCase(locale)`)
-   ` no-case (use  `change-case\`)
-   `param-case` (use `change-case` -> `kebabCase`)
-   `pascal-case` (use `change-case`)
-   `path-case` (use `change-case`)
-   `sentence-case` (use `change-case`)
-   `snake-case` (use `change-case`)
-   `upper-case-first` (prefer manual: `input.charAt(0).toLowerCase() + input.slice(1)`)
-   `upper-case` (prefer manual: `input.toUpperCase()` or `input.toLocaleUpperCase(locale)`)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Friday" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/hoonoh/ts-pg-model).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy44MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: hoonoh <[email protected]>

BREAKING CHANGE: configuration changed due to change-case v5
renovate bot referenced this issue in simonknittel/sinister-incorporated Dec 22, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[change-case](https://togithub.com/blakeembrey/change-case/tree/master/packages/change-case#readme)
([source](https://togithub.com/blakeembrey/change-case)) | [`5.1.2` ->
`5.3.0`](https://renovatebot.com/diffs/npm/change-case/5.1.2/5.3.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/change-case/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/change-case/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/change-case/5.1.2/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/change-case/5.1.2/5.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>blakeembrey/change-case (change-case)</summary>

###
[`v5.3.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.3.0):
Add `suffixCharacters` option

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.3.0)

**Added**

- New `suffixCharacters` option to retain characters during case
conversion. Useful for retaining something like the `_` in `type_`.
Closes
[https:/blakeembrey/change-case/issues/322](https://togithub.com/blakeembrey/change-case/issues/322).

###
[`v5.2.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.2.0):
New `delimiter` and `mergeAmbiguousCharacters` options

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

**Added**

- Add `delimiter` option for customizing join character in any change
case method
- Add `mergeAmbiguousCharacters` for camel and pascal case to avoid
prefixing `_` before numbers

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/simonknittel/sinister-incorporated).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9-->
renovate bot referenced this issue in runtime-env/import-meta-env Jul 6, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[change-case](https://togithub.com/blakeembrey/change-case/tree/master/packages/change-case#readme)
([source](https://togithub.com/blakeembrey/change-case)) | [`5.1.2` ->
`5.4.4`](https://renovatebot.com/diffs/npm/change-case/5.1.2/5.4.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/change-case/5.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/change-case/5.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/change-case/5.1.2/5.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/change-case/5.1.2/5.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>blakeembrey/change-case (change-case)</summary>

###
[`v5.4.4`](https://togithub.com/blakeembrey/change-case/compare/[email protected])

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.4.4)

###
[`v5.4.3`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.4.3):
Fix recursive options in keys change case

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

**Fixed**

- Fixes options used recursively in `change-case/keys` - previously
options were ignored after the first level
[https:/blakeembrey/change-case/pull/334](https://togithub.com/blakeembrey/change-case/pull/334)
by [@&#8203;Quicksaver](https://togithub.com/Quicksaver)

###
[`v5.4.2`](https://togithub.com/blakeembrey/change-case/compare/[email protected])

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

###
[`v5.4.1`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.4.1):
Remove regex lookbehind

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.4.1)

**Fixed**

- Remove lookbehind from regex for older browser support
(blakeembrey/change-case@6512635)

###
[`v5.4.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.4.0):
Add `split` option to `change-case`

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.4.0)

**Added**

- Added a `split` option to the `change-case` transform functions to
allow for customization on how words are extracted from input

**Changed**

- The package exports are now `default` instead of `import` to fix some
tooling that doesn't work properly with `import`
- The exported `split` utility no longer accepts a second options
argument

###
[`v5.3.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.3.0):
Add `suffixCharacters` option

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected]@5.3.0)

**Added**

- New `suffixCharacters` option to retain characters during case
conversion. Useful for retaining something like the `_` in `type_`.
Closes
[https:/blakeembrey/change-case/issues/322](https://togithub.com/blakeembrey/change-case/issues/322).

###
[`v5.2.0`](https://togithub.com/blakeembrey/change-case/releases/tag/change-case%405.2.0):
New `delimiter` and `mergeAmbiguousCharacters` options

[Compare
Source](https://togithub.com/blakeembrey/change-case/compare/[email protected])

**Added**

- Add `delimiter` option for customizing join character in any change
case method
- Add `mergeAmbiguousCharacters` for camel and pascal case to avoid
prefixing `_` before numbers

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/runtime-env/import-meta-env).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuOSIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment