@directus/format-title
Advanced tools
Comparing version 9.15.0 to 10.0.0
declare const _default: string[]; | ||
export default _default; | ||
//# sourceMappingURL=acronyms.d.ts.map |
declare const _default: string[]; | ||
export default _default; | ||
//# sourceMappingURL=articles.d.ts.map |
declare const _default: string[]; | ||
export default _default; | ||
//# sourceMappingURL=conjunctions.d.ts.map |
declare const _default: string[]; | ||
export default _default; | ||
//# sourceMappingURL=prepositions.d.ts.map |
declare const _default: string[]; | ||
export default _default; | ||
//# sourceMappingURL=special-case.d.ts.map |
@@ -1,3 +0,2 @@ | ||
declare function formatTitle(title: string, separator?: RegExp): string; | ||
export { formatTitle as default, formatTitle }; | ||
export declare function formatTitle(title: string, separator?: RegExp): string; | ||
export default formatTitle; |
export declare function capitalize(word: string): string; | ||
//# sourceMappingURL=capitalize.d.ts.map |
export declare function combine(acc: string, str: string): string; | ||
//# sourceMappingURL=combine.d.ts.map |
export declare function decamelize(string: string): string; | ||
//# sourceMappingURL=decamelize.d.ts.map |
@@ -5,2 +5,1 @@ /** | ||
export declare function handleSpecialWords(str: string, index: number, words: string[]): string; | ||
//# sourceMappingURL=handle-special-words.d.ts.map |
{ | ||
"name": "@directus/format-title", | ||
"version": "9.15.0", | ||
"version": "10.0.0", | ||
"type": "module", | ||
"description": "Custom string formatter that converts any string into [Title Case](http://www.grammar-monster.com/lessons/capital_letters_title_case.htm)", | ||
@@ -16,19 +17,10 @@ "keywords": [ | ||
], | ||
"main": "dist/format-title.cjs.js", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"node": "./index.mjs", | ||
"default": "./dist/format-title.bundler.js" | ||
}, | ||
"require": "./dist/format-title.cjs.js" | ||
}, | ||
".": "./dist/index.js", | ||
"./package.json": "./package.json" | ||
}, | ||
"module": "dist/format-title.bundler.js", | ||
"unpkg": "dist/format-title.esm.min.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"index.mjs" | ||
"dist" | ||
], | ||
@@ -38,3 +30,3 @@ "author": "rijkvanzanten <rijkvanzanten@me.com>", | ||
"type": "git", | ||
"url": "git+https://github.com/directus/directus.git" | ||
"url": "git+https://github.com/directus/format-title.git" | ||
}, | ||
@@ -46,6 +38,2 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "21.1.0", | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-node-resolve": "13.3.0", | ||
"@types/jest": "^28.1.4", | ||
"@typescript-eslint/eslint-plugin": "^5.30.5", | ||
@@ -56,14 +44,9 @@ "@typescript-eslint/parser": "^5.30.5", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"jest": "^28.1.2", | ||
"lint-staged": "^13.0.3", | ||
"prettier": "^2.7.1", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.76.0", | ||
"rollup-plugin-dts": "4.2.2", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
"rollup-plugin-terser": "7.0.2", | ||
"rollup-plugin-typescript2": "0.32.1", | ||
"simple-git-hooks": "^2.8.0", | ||
"ts-jest": "^28.0.5", | ||
"typescript": "4.5.2" | ||
"tsx": "^3.9.0", | ||
"typescript": "^4.8.2", | ||
"vitest": "^0.23.1" | ||
}, | ||
@@ -79,8 +62,9 @@ "simple-git-hooks": { | ||
"prebuild": "rimraf dist", | ||
"build": "rollup -c", | ||
"dev": "rollup -c -w", | ||
"build": "tsc --build", | ||
"dev": "tsx watch ./src/index.ts", | ||
"lint": "eslint src", | ||
"test": "jest --coverage", | ||
"test:watch": "jest --coverage --watchAll" | ||
"test": "vitest run", | ||
"test:coverage": "vitest run --coverage", | ||
"test:watch": "vitest" | ||
} | ||
} |
@@ -45,1 +45,25 @@ ## Title Formatter | ||
[please open an issue](https://github.com/directus/format-title/issues/new) or submit a pull request! | ||
### Requirements | ||
- NodeJS LTS | ||
- pnpm 7.5.0 or newer | ||
### Commands | ||
The following `pnpm` scripts are available: | ||
- `pnpm lint` – Lint the code using Eslint / Prettier | ||
- `pnpm test` – Run the unit tests | ||
Make sure that both commands pass locally before creating a Pull Request. | ||
### Pushing a Release | ||
_This applies to maintainers only_ | ||
1. Create a new version / tag by running `pnpm version <version>`. Tip: use `pnpm version patch|minor|major` to | ||
auto-bump the version number | ||
1. Push the version commit / tag to GitHub (`git push && git push --tags`) | ||
The CI will automatically build and release to npm, and generate the release notes. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12
69
Yes
10683
23
282
1