Skip to content

Commit

Permalink
Bump decamelize from 5.0.1 to 6.0.0 (#30)
Browse files Browse the repository at this point in the history
* Bump decamelize from 5.0.1 to 6.0.0

Bumps [decamelize](https://github.com/sindresorhus/decamelize) from 5.0.1 to 6.0.0.
- [Release notes](https://github.com/sindresorhus/decamelize/releases)
- [Commits](sindresorhus/decamelize@v5.0.1...v6.0.0)

---
updated-dependencies:
- dependency-name: decamelize
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* remove decamalize dependency and replace with regex

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Bush <[email protected]>
  • Loading branch information
dependabot[bot] and DaveMBush authored Jan 1, 2025
1 parent f68e5fc commit 0e32783
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 16 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"dependencies": {
"@typescript-eslint/utils": "^8.18.1",
"common-tags": "^1.8.2",
"decamelize": "^5.0.1",
"tslib": "^2.8.1",
"tsutils": "^3.21.0",
"tsutils-etc": "^1.4.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-rxjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@typescript-eslint/utils": "^8.13.0",
"@typescript-eslint/rule-tester": "^8.13.0",
"common-tags": "^1.8.2",
"decamelize": "^5.0.1",
"decamelize": "^6.0.0",
"typescript": "~5.5.4",
"tsutils": "^3.21.0",
"tsutils-etc": "^1.4.2",
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-rxjs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"assets": [
"packages/eslint-plugin-rxjs/*.md"
],
"generatePackageJson": true,
"format": [
"cjs"
],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-rxjs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const { name, version } = require('../package.json') as {
version: string;
};

export const meta = {
const meta = {
name,
version,
} satisfies Linter.PluginMeta;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TSESTree as es } from '@typescript-eslint/utils';
import { stripIndent } from 'common-tags';
import decamelize from 'decamelize';

import {
getTypeServices,
isCallExpression,
Expand Down Expand Up @@ -96,6 +96,13 @@ export default ESLintUtils.RuleCreator(() => __filename)({

const { couldBeObservable } = getTypeServices(context);

function decamelize(str: string): string {
return str
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
.replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1_$2')
.toLowerCase();
}

function shouldDisallow(args: es.Node[]): boolean {
const names = args
.map((arg) => {
Expand Down
4 changes: 3 additions & 1 deletion packages/eslint-plugin-rxjs/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"declaration": true,
"types": ["node"],
"module": "NodeNext",
"moduleResolution": "NodeNext"
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/lib/tests/**/*.ts"]
Expand Down
16 changes: 6 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0e32783

Please sign in to comment.