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 <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Jan 2, 2023
1 parent 358a6f6 commit a7de0af
Show file tree
Hide file tree
Showing 15 changed files with 792 additions and 802 deletions.
7 changes: 2 additions & 5 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@
"**/*.snap",
"**/.gitconfig",
"**/.gitignore",
"**/.gitkeep",
"**/.npmignore",
"**/dist/",
".cspell.json",
".env*",
".eslintignore",
".git/",
".husky/_/",
".markdownlintignore",
".nvmrc",
".prettierignore",
".vscode/settings.json",
".yarn/",
"CHANGELOG.md",
"LICENSE.md",
"__tests__/report.json",
"dist/",
"patches/",
"tsconfig.temp.json",
"yarn.lock"
Expand Down
4 changes: 0 additions & 4 deletions .dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ dawidd
dedupe
dessant
dohm
esbenp
esbuild
fbca
gpgsign
graphqlrc
hmarr
iife
keyid
Expand All @@ -24,7 +22,5 @@ npmrc
pkgs
preid
syncer
testts
vates
vsicons
yarnrc
7 changes: 5 additions & 2 deletions .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ const config = {
'no-array-constructor': 0,
'no-case-declarations': 0,
'no-duplicate-imports': 0,
'no-empty': [2, { allowEmptyCatch: true }],
'no-empty-function': 0,
'no-ex-assign': 0,
'no-invalid-this': 0,
Expand Down Expand Up @@ -679,7 +680,7 @@ const config = {
'@typescript-eslint/no-base-to-string': [
2,
{
ignoredTypeNames: ['RegExp']
ignoredTypeNames: ['Error', 'RegExp', 'URL', 'URLSearchParams']
}
],
'@typescript-eslint/no-floating-promises': [
Expand Down Expand Up @@ -995,7 +996,7 @@ const config = {
}
},
{
files: ['**/__tests__/*.spec.*', '**/__tests__/*.spec-d.ts'],
files: ['**/__tests__/*.spec.ts', '**/__tests__/*.spec-d.ts'],
globals: {
afterAll: true,
afterEach: true,
Expand Down Expand Up @@ -1034,11 +1035,13 @@ const config = {
'promise/prefer-await-to-callbacks': 0,
'promise/valid-params': 0,
'unicorn/consistent-destructuring': 0,
'unicorn/error-message': 0,
'unicorn/explicit-length-check': 0,
'unicorn/no-array-for-each': 0,
'unicorn/no-useless-undefined': 0,
'unicorn/prefer-at': 0,
'unicorn/prefer-dom-node-append': 0,
'unicorn/prefer-json-parse-buffer': 0,
'unicorn/string-content': 0
}
},
Expand Down
13 changes: 6 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,32 @@
#
# - https://docs.github.com/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

---
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
commit-message:
prefix: ci
include: scope
directory: /
labels:
- scope:dependencies
- type:ci
reviewers:
- flex-development/dependabot-review
- flexdevelopment
- package-ecosystem: npm
directory: /
schedule:
interval: daily
- package-ecosystem: npm
commit-message:
prefix: build
include: scope
ignore:
- dependency-name: typescript
directory: /
labels:
- scope:dependencies
- type:build
reviewers:
- flex-development/dependabot-review
- flexdevelopment
schedule:
interval: daily
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
# References:
#
# - 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/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
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
# - https://github.com/actions/checkout
# - https://github.com/actions/setup-node
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#yarn2-configuration
# - https://github.com/actions/upload-artifact
# - https://github.com/hmarr/debug-action

Expand Down Expand Up @@ -56,13 +59,14 @@ jobs:
uses: actions/setup-node@v3.5.1
with:
cache: yarn
cache-dependency-path: yarn.lock
node-version: ${{ matrix.node-version }}
- id: debug
name: Print environment variables and event payload
uses: hmarr/debug-action@v2.1.0
- id: yarn
name: Install dependencies
run: yarn ${{ github.actor == 'dependabot[bot]' && '' || '--no-immutable' }}
run: yarn ${{ github.actor == 'dependabot[bot]' && '--no-immutable' || '--immutable' }}
- id: format
name: Check code formatting
run: yarn check:format
Expand All @@ -74,19 +78,19 @@ jobs:
run: yarn check:spelling
- id: typecheck
name: Run typecheck
run: yarn typecheck
run: yarn typecheck && yarn check:types:build
- id: pack
name: Pack project
run: yarn pack -o %s-%v.tgz
env:
NODE_ENV: production
- id: package-version
- id: version
name: Get package version
run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT
- id: package-archive
- id: archive
name: Archive production artifacts
uses: actions/upload-artifact@v3.1.1
with:
name: |
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }}
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.version.outputs.result) }}
path: '*.tgz'
2 changes: 2 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// MARKDOWNLINT CONFIGURATION
// https://github.com/DavidAnson/vscode-markdownlint#configure
{
"MD001": true,
"MD002": {
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REFERENCE: https://yarnpkg.com/configuration/yarnrc
# https://yarnpkg.com/configuration/yarnrc

changesetBaseRefs:
- main
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Follow the steps below to setup your local development environment:
git config --global user.username <username>
```

See [`.gitconfig`](.github/.gitconfig) for a global Git config example.

6. Install dependencies

```sh
Expand Down Expand Up @@ -95,11 +97,8 @@ Follow the steps below to setup your local development environment:
| name |
| ----------------------- |
| `CI` |
| `NODE_ENV` |
| `GITHUB_TOKEN` |
| `NODE_NO_WARNINGS` |
| `NODE_OPTIONS` |
| `VITEST_SEGFAULT_RETRY` |
| `ZSH_DOTENV_FILE` |
#### GitHub Actions
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![module type: esm](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)
[![license](https://img.shields.io/github/license/flex-development/pkg-types.svg)](LICENSE.md)
[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits&logoColor=ffffff)](https://conventionalcommits.org/)
[![github actions](http://img.shields.io/badge/-github%20actions-2088ff?style=flat&logo=github-actions&logoColor=ffffff)](https://github.com/features/actions)
[![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/)
Expand Down
2 changes: 1 addition & 1 deletion __tests__/reporters/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import notifier from 'node-notifier'
import type NotificationCenter from 'node-notifier/notifiers/notificationcenter'
import { performance } from 'node:perf_hooks'
import { promisify } from 'node:util'
import dedent from 'ts-dedent'
import { dedent } from 'ts-dedent'
import type { File, Reporter, Task, Test, Vitest } from 'vitest'

/**
Expand Down
38 changes: 20 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,29 @@
"@commitlint/config-conventional": "17.3.0",
"@flex-development/mkbuild": "1.0.0-alpha.9",
"@flex-development/tutils": "6.0.0-alpha.7",
"@graphql-eslint/eslint-plugin": "3.13.1",
"@graphql-eslint/eslint-plugin": "3.14.3",
"@types/chai": "4.3.4",
"@types/conventional-changelog": "3.1.1",
"@types/conventional-changelog-config-spec": "2.1.2",
"@types/conventional-changelog-writer": "4.0.1",
"@types/conventional-commits-parser": "3.0.2",
"@types/conventional-changelog-writer": "4.0.2",
"@types/conventional-commits-parser": "3.0.3",
"@types/dateformat": "5.0.0",
"@types/eslint": "8.4.10",
"@types/git-raw-commits": "2.0.1",
"@types/is-ci": "3.0.0",
"@types/node-notifier": "8.0.2",
"@types/prettier": "2.7.1",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"@types/prettier": "2.7.2",
"@typescript-eslint/eslint-plugin": "5.47.1",
"@typescript-eslint/parser": "5.47.1",
"@vates/toggle-scripts": "1.0.0",
"@vitest/coverage-c8": "0.25.3",
"@vitest/ui": "0.25.3",
"@vitest/coverage-c8": "0.26.3",
"@vitest/ui": "0.26.3",
"chai": "4.3.7",
"conventional-changelog-cli": "2.2.2",
"conventional-recommended-bump": "6.1.0",
"cspell": "6.15.0",
"eslint": "8.28.0",
"cspell": "6.18.1",
"esbuild": "0.16.12",
"eslint": "8.31.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-chai-expect": "3.0.0",
"eslint-plugin-jest-formatting": "3.1.0",
Expand All @@ -94,7 +95,7 @@
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-unicorn": "45.0.1",
"eslint-plugin-unicorn": "45.0.2",
"eslint-plugin-yml": "1.2.0",
"graphql": "16.6.0",
"graphql-config": "4.3.6",
Expand All @@ -110,21 +111,22 @@
"ts-dedent": "2.2.0",
"ts-node": "10.9.1",
"tsconfig": "7.0.0",
"tsconfig-paths": "4.1.0",
"typescript": "4.9.3",
"tsconfig-paths": "4.1.2",
"typescript": "4.9.4",
"version-bump-prompt": "6.1.0",
"vite": "3.2.4",
"vite-tsconfig-paths": "3.6.0",
"vitest": "0.25.3",
"vite": "4.0.3",
"vite-tsconfig-paths": "4.0.3",
"vitest": "0.26.3",
"yaml-eslint-parser": "1.1.0"
},
"peerDependencies": {
"@flex-development/tutils": ">=6.0.0-alpha.7"
},
"resolutions": {
"@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads",
"esbuild": "0.15.16",
"vitest@npm:0.25.3": "patch:vitest@npm%3A0.25.3#patches/vitest+0.25.3.dev.patch"
"@flex-development/tutils": "6.0.0-alpha.7",
"esbuild": "0.16.12",
"vitest@npm:0.26.3": "patch:vitest@npm%3A0.26.3#patches/vitest+0.26.3.dev.patch"
},
"engines": {
"node": ">=14.21.1",
Expand Down
13 changes: 0 additions & 13 deletions patches/vitest+0.25.3.dev.patch

This file was deleted.

13 changes: 13 additions & 0 deletions patches/vitest+0.26.3.dev.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/chunk-snapshot-manager.70695b70.js b/dist/chunk-snapshot-manager.70695b70.js
index v0.26.3..v0.26.3 100644
--- a/dist/chunk-snapshot-manager.70695b70.js
+++ b/dist/chunk-snapshot-manager.70695b70.js
@@ -8044,7 +8044,7 @@ class DefaultReporter extends BaseReporter {
super.onWatcherStart();
}
onCollected() {
- if (this.isTTY) {
+ if (this.isTTY || this.mode === "typecheck") {
this.rendererOptions.logger = this.ctx.logger;
this.rendererOptions.showHeap = this.ctx.config.logHeapUsage;
this.rendererOptions.mode = this.mode;
2 changes: 0 additions & 2 deletions vitest-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ interface ImportMetaEnv extends import('vitest/importMeta').ImportMetaEnv {
readonly DEV: '1' | import('@flex-development/tutils').EmptyString
readonly MODE: import('@flex-development/tutils').NodeEnv.TEST
readonly NODE_ENV: import('@flex-development/tutils').NodeEnv.TEST
readonly NODE_OPTIONS: string
readonly PROD: '1' | import('@flex-development/tutils').EmptyString
readonly PWD: string
readonly SSR: '1' | import('@flex-development/tutils').EmptyString
Expand All @@ -16,7 +15,6 @@ interface ImportMetaEnv extends import('vitest/importMeta').ImportMetaEnv {
readonly VITEST_CLI_WRAPPER: 'true'
readonly VITEST_MODE: 'DEV' | 'RUN'
readonly VITEST_POOL_ID: `${number}`
readonly VITEST_SEGFAULT_RETRY: import('@flex-development/tutils').Numeric
readonly VITEST_WORKER_ID: `${number}`
readonly VITE_ROOT: string
readonly VITE_USER_NODE_ENV: import('@flex-development/tutils').NodeEnv.TEST
Expand Down
Loading

0 comments on commit a7de0af

Please sign in to comment.