Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ package-lock.json
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.yarnrc.yml


# Ignore build artifacts from version control
lib
Expand Down
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
npx lint-staged
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.2.cjs

This file was deleted.

894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@ojkelly/plugin-all.cjs
spec: 'https://yarn.build/latest'

yarnPath: .yarn/releases/yarn-3.2.2.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Be a part of this project! You can run the tests using the following.

#### Adding new packages and or enhancing functionality of existing packages !

To add a new package like @chancejs/person or @chancejs/web you can run `npm run package:create`
To add a new package like @johnallentech/person or @johnallentech/web you can run `npm run package:create`

To add functions to that (or any other) package you can run `npm run function:create`

Expand All @@ -66,7 +66,7 @@ This project is licensed under the [MIT License](http://en.wikipedia.org/wiki/MI

Run tests for all packages with `npm run test:all `

Run test for individual package with `yarn workspace @chancejs/${PACKAGE_TO_TEST} test` ie `yarn workspace @chancejs/letter test`
Run test for individual package with `yarn workspace @johnallentech/${PACKAGE_TO_TEST} test` ie `yarn workspace @johnallentech/letter test`

Proudly written in Washington, D.C. 🇺🇸

Expand Down
2 changes: 1 addition & 1 deletion docs/basics/hex.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Return a random hex number as string.

```ts
import { hex } from '@chancejs/hex'
import { hex } from '@johnallentech/hex'

// returns either '9', 'a' or 'b'.
hex({ min: 9, max: 11, casing: 'lower' })
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
"description": "Chance - Utility library to generate anything random",
"homepage": "http://chancejs.com",
"author": "Victor Quinn <mail@victorquinn.com>",
"private": true,
"workspaces": [
"packages/*"
],
"engines": {
"yarn": ">=3",
"yarn": ">=4",
"node": ">=18"
},
"bugs": {
Expand All @@ -21,26 +20,27 @@
},
"license": "MIT",
"devDependencies": {
"@nx/jest": "19.0.0",
"docpress": "0.7.1",
"@changesets/cli": "^2.27.7",
"@nx/jest": "19.4.2",
"docpress": "0.8.2",
"git-update-ghpages": "1.3.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
"nx": "19.0.0",
"lint-staged": "^15.2.7",
"nx": "19.4.2",
"nyc": "^15.1.0",
"plop": "^3.1.0",
"prettier": "3.2.5",
"@changesets/cli": "^2.27.5"
"plop": "^3.1.2",
"prettier": "3.3.2"
},
"scripts": {
"package:create": "plop --plopfile ./scripts/create-package/plopfile.js",
"generator:create": "plop --plopfile ./scripts/create-generator/plopfile.js",
"function:create": "plop --plopfile ./scripts/create-function/plopfile.js",
"test:all": "yarn nx run-many -t test",
"build:all": "yarn nx run-many -t build",
"build:all": "yarn nx run-many -t build --parallel=5",
"graph": "yarn nx graph",
"version": "yarn changeset"
"version": "yarn changeset",
"publish": "yarn workspaces foreach -A npm publish"
},
"keywords": [
"chance",
Expand All @@ -63,5 +63,5 @@
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"packageManager": "yarn@3.2.2"
"packageManager": "yarn@4.2.2"
}
26 changes: 17 additions & 9 deletions packages/animal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chancejs/animal",
"version": "1.0.0",
"name": "@johnallentech/animal",
"version": "1.0.2",
"description": "gives a random &#x27;animal&#x27; based on what you specify",
"homepage": "https://chancejs.com/",
"author": "Victor Quinn <mail@victorquinn.com>",
Expand All @@ -21,19 +21,27 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/chancejs/chancejs.git"
"url": "git+https://github.com/JohnAllenTech/chancejs.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/chancejs/chancejs/issues"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^18.7.2",
"eslint": "^8.14.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.19.39",
"eslint": "^8.57.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"ts-jest": "^27.1.5",
"ts-node": "^10.9.2",
"typescript": "^4.6.3"
}
},
"dependencies": {
"@johnallentech/generator": "1.0.2",
"@johnallentech/pick": "1.0.0"
},
"directories": {
"lib": "lib"
},
"types": "./lib/cjs/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/animal/src/animal.generator.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Generator } from '@chancejs/generator'
import { Generator } from '@johnallentech/generator'
import { AnimalOptionTypeException } from './exceptions'
import { AnimalOptions, AnimalTypes, IAnimalGenerator } from './interfaces'
import { animals } from './constants'
import { pickOne } from '@chancejs/pick'
import { pickOne } from '@johnallentech/pick'

export class AnimalGenerator extends Generator implements IAnimalGenerator {
animal(options?: AnimalOptions): string {
Expand Down
2 changes: 0 additions & 2 deletions packages/animal/src/exceptions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { AnimalTypes } from './interfaces'

export class AnimalOptionTypeException extends TypeError {
constructor() {
super(
Expand Down
14 changes: 7 additions & 7 deletions packages/blue-imp-md5/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@chancejs/blue-imp-md5",
"name": "@johnallentech/blue-imp-md5",
"version": "1.0.0",
"description": "The Blue Imp MD5 implementation for Chance.js.",
"homepage": "http://chancejs.com",
Expand All @@ -21,19 +21,19 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/chancejs/chancejs.git"
"url": "git+https://github.com/JohnAllenTech/chancejs.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/chancejs/chancejs/issues"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^18.7.2",
"eslint": "^8.14.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.19.39",
"eslint": "^8.57.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"ts-jest": "^27.1.5",
"ts-node": "^10.9.2",
"typescript": "^4.6.3"
}
}
16 changes: 8 additions & 8 deletions packages/bool/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@chancejs/bool",
"name": "@johnallentech/bool",
"version": "1.0.0",
"description": "Generate a random boolean with Chance.js.",
"homepage": "https://chancejs.com/basics/bool.html",
Expand All @@ -21,22 +21,22 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/chancejs/chancejs.git"
"url": "git+https://github.com/JohnAllenTech/chancejs.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/chancejs/chancejs/issues"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^18.7.2",
"eslint": "^8.14.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.19.39",
"eslint": "^8.57.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"ts-jest": "^27.1.5",
"ts-node": "^10.9.2",
"typescript": "^4.6.3"
},
"dependencies": {
"@chancejs/generator": "1.0.0"
"@johnallentech/generator": "1.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/bool/src/bool.function.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { times } from '@chancejs/generator'
import { times } from '@johnallentech/generator'
import { bool } from './bool.function'
import { BooleanLiklihoodRangeException } from './exceptions'

Expand Down
2 changes: 1 addition & 1 deletion packages/bool/src/boolean.generator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Generator } from '@chancejs/generator'
import { Generator } from '@johnallentech/generator'
import { BooleanLiklihoodRangeException } from './exceptions'
import { BooleanOptions, IBooleanGenerator } from './interfaces'

Expand Down
1 change: 0 additions & 1 deletion packages/chance/index.ts

This file was deleted.

13 changes: 0 additions & 13 deletions packages/chance/jest.config.json

This file was deleted.

53 changes: 0 additions & 53 deletions packages/chance/package.json

This file was deleted.

60 changes: 0 additions & 60 deletions packages/chance/src/basics/bool.test.ts

This file was deleted.

Loading