Skip to content

Commit

Permalink
chore: update project architecture
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Jan 31, 2023
1 parent 2809f28 commit d9b3565
Show file tree
Hide file tree
Showing 49 changed files with 1,622 additions and 948 deletions.
9 changes: 6 additions & 3 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"**/*.snap",
"**/.gitconfig",
"**/.gitignore",
"**/CHANGELOG.md",
"**/LICENSE.md",
"**/RELEASE_NOTES.md",
"**/dist/",
".cspell.json",
".env*",
Expand All @@ -26,10 +29,10 @@
".vercel/",
".vscode/settings.json",
".yarn/",
"CHANGELOG.md",
"LICENSE.md",
"__tests__/report.json",
"patches/",
"tsconfig*temp.json",
"vitest.config.*.timestamp-*.mjs",
"yarn.lock"
],
"ignoreRegExpList": [
Expand All @@ -45,5 +48,5 @@
"useGitignore": true,
"usePnP": false,
"version": "0.2",
"words": ["fldv", "flexdevelopmentllc"]
"words": ["fldv"]
}
3 changes: 2 additions & 1 deletion .dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ fbca
gpgsign
hmarr
iife
infile
jsonifiable
keyid
larsgw
lcov
lintstagedrc
micnncim
mkbuild
mlly
nocheck
npmrc
nums
Expand All @@ -30,5 +32,4 @@ preid
promisable
syncer
vates
vitest
yarnrc
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
**/node_modules/
__tests__/report.json
coverage/
tsconfig*temp.json
vitest.config.*.timestamp-*.mjs
yarn.lock

# NEGATED PATTERNS
Expand Down
3 changes: 3 additions & 0 deletions .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const config = {
'plugin:prettier/recommended'
],
globals: {
BufferEncoding: 'readonly',
Chai: 'readonly',
Console: 'readonly',
JSX: jsx ? 'readonly' : false,
Expand Down Expand Up @@ -474,6 +475,7 @@ const config = {
'no-magic-numbers': 0,
'no-restricted-imports': 0,
'no-shadow': 0,
'no-sparse-arrays': 0,
'no-unused-expressions': 0,
'no-unused-vars': 0,
'no-use-before-define': 0,
Expand Down Expand Up @@ -1035,6 +1037,7 @@ const config = {
'unicorn/error-message': 0,
'unicorn/explicit-length-check': 0,
'unicorn/no-array-for-each': 0,
'unicorn/no-hex-escape': 0,
'unicorn/no-useless-undefined': 0,
'unicorn/prefer-at': 0,
'unicorn/prefer-dom-node-append': 0,
Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# TEXT FILE ATTRIBUTES
# ------------------------------------------------------------------------------
*.cjs text eol=lf
*.cts text eol=lf
*.gql text eol=lf
*.hbs text eol=lf
*.json text eol=lf
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ body:
type: input
attributes:
label: TypeScript version
description: Version of TypeScript you are using
description: TypeScript version you are using
validations:
required: true
- id: os
Expand Down
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ A list of linked issues and/or pull requests.

## Additional context

<!-- Include additional details here. Be sure to note if any tolerable vulnerabilities or warnings have been introduced. -->
<!--
Include additional details here. Be sure to note if any tolerable vulnerabilities or warnings have been introduced.
-->

## Submission checklist

Expand Down
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ updates:
prefix: build
include: scope
directory: /
ignore:
- dependency-name: '@vitest/*'
- dependency-name: vitest
labels:
- scope:dependencies
- type:build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
# - https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs
# - https://docs.github.com/actions/learn-github-actions/contexts
# - https://docs.github.com/actions/learn-github-actions/expressions
# - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
run: yarn add -D typescript@${{ matrix.typescript-version }}
- id: typecheck
name: Run typecheck
run: yarn check:types
run: yarn typecheck
test:
needs: setup
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/integrity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# References:
#
# - https://docs.github.com/actions/learn-github-actions/expressions
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#create
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://github.com/actions/checkout
# - https://yarnpkg.com/cli/dedupe

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
gpr:
needs: metadata
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
environment:
Expand Down Expand Up @@ -90,8 +89,6 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm:
needs: [metadata, gpr]
permissions:
contents: write
runs-on: ubuntu-latest
environment:
name: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
NODE_ENV: production
- id: release-notes
name: Generate release notes
run: yarn conventional-changelog -o $NOTES_FILE
run: yarn changelog -w -o $NOTES_FILE
env:
NODE_NO_WARNINGS: 1
- id: tag
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/typescript-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ jobs:
NODE_ENV: production
- id: typecheck
name: Run typecheck
run: yarn typecheck
- id: typecheck-build
name: Run typecheck-build
run: yarn check:types:build
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ yarn-error.log*
__tests__/report.json
codecov
coverage/
tsconfig.temp.json
tsconfig*temp.json
vitest.config.*.timestamp-*.mjs
!__fixtures__/node_modules/

Expand All @@ -58,6 +58,10 @@ vitest.config.*.timestamp-*.mjs
dist/
!typings/**/dist/

# Releases
# ------------------------------------------------------------------------------
RELEASE_NOTES.md

# Misc
# ------------------------------------------------------------------------------
scratch.ts
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@
#
# - https://github.com/okonet/lint-staged#command-line-flags

yarn check:types
yarn check:types:build
lint-staged --config=.lintstagedrc.json
cross-env LINT_STAGED=1 lint-staged --config=.lintstagedrc.json --relative --verbose
5 changes: 0 additions & 5 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/bin/sh

# Pre-Push Workflow
#
# References:
#
# - https://vitest.dev/guide/cli.html#changed

yarn test --changed HEAD^
yarn build
8 changes: 4 additions & 4 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"*": ["prettier --check", "cspell lint --color --no-progress --relative $@"],
"**/*.{cjs,cts,gql,json,jsonc,md,mjs,ts,yml}": [
"eslint --exit-on-fatal-error"
],
"**/yarn.lock": "yarn dedupe --check"
"**/*.{cjs,gql,json,jsonc,md,mjs,ts,yml}": ["eslint --exit-on-fatal-error"],
"**/*.{cjs,mjs,ts}": "vitest typecheck --changed --run",
"**/yarn.lock": "yarn dedupe --check",
"src/**/*.ts": "vitest --changed --coverage --run"
}
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
# DIRECTORIES & FILES
**/CHANGELOG.md
**/LICENSE.md
**/RELEASE_NOTES.md
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
19
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
.eslintignore
.husky/_/
.markdownlintignore
.npmrc
.nvmrc
.prettierignore
.yarn/
Expand All @@ -20,5 +21,6 @@ __tests__/report.json
coverage/
dist/
node_modules/
tsconfig.temp.json
tsconfig*temp.json
vitest.config.*.timestamp-*.mjs
yarn.lock
5 changes: 5 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// https://code.visualstudio.com/docs/editor/debugging
{
"version": "0.2.0",
"configurations": []
}
37 changes: 36 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@
"!**/node_modules",
"!**/.git",
"!**/CHANGELOG.md",
"!**/LICENSE.md"
"!**/LICENSE.md",
"!**/RELEASE_NOTES.md"
],
"npm-intellisense.scanDevDependencies": true,
"prettier.configPath": ".prettierrc.json",
Expand All @@ -232,6 +233,40 @@
"shellformat.flag": "-ci -fn -i=2 -sr",
"shellformat.useEditorConfig": true,
"terminal.integrated.copyOnSelection": true,
"todo-tree.filtering.ignoreGitSubmodules": true,
"todo-tree.filtering.includeHiddenFiles": false,
"todo-tree.filtering.useBuiltInExcludes": "file and search excludes",
"todo-tree.general.debug": true,
"todo-tree.general.enableFileWatcher": true,
"todo-tree.general.revealBehaviour": "start of todo",
"todo-tree.general.showActivityBarBadge": true,
"todo-tree.general.showIconsInsteadOfTagsInStatusBar": true,
"todo-tree.general.statusBar": "current file",
"todo-tree.general.statusBarClickBehaviour": "reveal",
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"[ ]",
"[x]",
"@todo"
],
"todo-tree.highlights.enabled": true,
"todo-tree.regex.regex": "((/?\\*|//|#|<!--|^)\\s*($TAGS)|^\\s*- \\[ \\])",
"todo-tree.tree.autoRefresh": true,
"todo-tree.tree.buttons.expand": true,
"todo-tree.tree.buttons.filter": true,
"todo-tree.tree.buttons.refresh": true,
"todo-tree.tree.buttons.reveal": false,
"todo-tree.tree.buttons.viewStyle": true,
"todo-tree.tree.expanded": true,
"todo-tree.tree.filterCaseSensitive": true,
"todo-tree.tree.scanMode": "workspace",
"todo-tree.tree.showBadges": true,
"todo-tree.tree.showCountsInTree": true,
"todo-tree.tree.showCurrentScanMode": true,
"todo-tree.tree.trackFile": true,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"typescript.format.insertSpaceAfterTypeAssertion": true,
"typescript.format.semicolons": "remove",
Expand Down
4 changes: 3 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ defaultSemverRangePrefix: ''

enableInlineBuilds: true

nmHoistingLimits: none
enableTransparentWorkspaces: false

nmHoistingLimits: dependencies

nodeLinker: node-modules

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ Follow the steps below to setup your local development environment:
| name |
| ----------------------- |
| `GITHUB_TOKEN` |
| `NODE_ENV` |
| `NODE_NO_WARNINGS` |
| `PAT_BOT` |
| `ZSH_DOTENV_FILE` |
Expand Down Expand Up @@ -340,7 +339,8 @@ Before deploying, the following steps must be completed:
- `bump preminor --preid <dist-tag>`
- `bump prepatch --preid <dist-tag>`
- `bump prerelease --preid <dist-tag>`
4. `yarn conventional-changelog -i CHANGELOG.md -s`
4. Update `CHANGELOG.md`
- `yarn changelog -sw` (remove `w` to do a dry-run, i.e. `yarn changelog -s`)
5. `yarn release`
6. Open PR from `release/*` into `main`
- PR title should match `release: <release-tag>`
Expand Down
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# tutils

[![npm](https://img.shields.io/npm/v/@flex-development/tutils.svg)](https://npmjs.com/package/@flex-development/tutils)
[![license](https://img.shields.io/github/license/flex-development/tutils.svg)](LICENSE.md)
[![module type: cjs+esm](https://img.shields.io/badge/module%20type-cjs%2Besm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)
[![license](https://img.shields.io/github/license/flex-development/tutils.svg)](LICENSE.md)
[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits&logoColor=ffffff)](https://conventionalcommits.org/)
[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript&logoColor=ffffff)](https://typescriptlang.org/)
[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)](https://vitest.dev/)
[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat&logo=yarn&logoColor=ffffff)](https://yarnpkg.com/)

TypeScript utilities.
[TypeScript][1] utilities.

## Contents

Expand All @@ -19,26 +19,22 @@ TypeScript utilities.

## What is this?

This package contains [TypeScript][1] utilities used by the [Flex Development][2] (FLDV) team.

It includes enums, interfaces, types, and type guards.
This package contains a set of general [TypeScript][1] utilities. It includes enums, interfaces, types, and type guards.

## When should I use this?

Use this package when you need a variety of TypeScript utilities.

Note that although this project is publicly available, it is **intended for mainly internal use**.
**TODO**: when should i use this?

## Install

```sh
yarn add -D @flex-development/tutils
yarn add @flex-development/tutils
```

From Git:

```sh
yarn add -D @flex-development/tutils@flex-development/tutils
yarn add @flex-development/tutils@flex-development/tutils
```

<blockquote>
Expand Down Expand Up @@ -75,4 +71,3 @@ export type { IUser as default, UserAttribute }
```

[1]: https://typescriptlang.org/
[2]: https://flexdevelopment.llc
Empty file removed __fixtures__/.gitkeep
Empty file.
Empty file removed __mocks__/.gitkeep
Empty file.
Loading

0 comments on commit d9b3565

Please sign in to comment.