Skip to content

Commit

Permalink
release(version): ready for major version 1 release (#28)
Browse files Browse the repository at this point in the history
Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net>
  • Loading branch information
kirangadhave and semantic-release-bot authored Feb 2, 2023
1 parent 8d323bd commit 5b302ae
Show file tree
Hide file tree
Showing 51 changed files with 5,751 additions and 1,165 deletions.
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "@commitlint/cz-commitlint"
}
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"globals": {
"vi": true
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Release

on:
push:
branches: [main, alpha, beta]

env:
HUSKY: 0

jobs:
release:
name: Release
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Track main
run: git branch --track main origin/main || echo "Already done"

- name: Setup LTS Node
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
cache: 'yarn'

- name: Install yarn
run: npm install -g yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Cache yarn dependencies
uses: actions/cache@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**\node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install

- name: Build
run: |
RUN=CI yarn run build-affected-libs
- name: Release
if: ${{ success() && (github.event_name != 'pull_request' || github.event.action == 'closed' && github.event.pull_request.merged == true) }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
RUN=CI yarn run release
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ testem.log
Thumbs.db

# Next.js
.next
.next

# Nx
migrations.json
6 changes: 3 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
npx --no -- commitlint --edit "$1" || (echo "Commit using 'yarn commit' command"; exit 1;)
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged --relative
5 changes: 5 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"


exec < /dev/tty && npx cz --hook || true < /dev/null
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"conventionalCommits.scopes": ["core"]
}
1 change: 0 additions & 1 deletion apps/docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"projectType": "application",
"targets": {
"build": {
// "executor": "@nrwl/next:build",
"executor": "nx:run-commands",
"outputs": ["{options.outputPath}"],
"defaultConfiguration": "production",
Expand Down
4 changes: 2 additions & 2 deletions apps/dummy-testing-library/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "dummy-testing-library",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/dummy-testing-library/src",
"projectType": "application",
Expand Down Expand Up @@ -71,6 +72,5 @@
}
}
},
"tags": [],
"name": "dummy-testing-library"
"tags": []
}
4 changes: 2 additions & 2 deletions apps/react-trrack-example/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "react-trrack-example",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/react-trrack-example/src",
"projectType": "application",
Expand Down Expand Up @@ -80,6 +81,5 @@
}
}
},
"tags": [],
"name": "react-trrack-example"
"tags": []
}
4 changes: 2 additions & 2 deletions apps/rtk-trrack-example/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "rtk-trrack-example",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/rtk-trrack-example/src",
"projectType": "application",
Expand Down Expand Up @@ -80,6 +81,5 @@
}
}
},
"tags": [],
"name": "rtk-trrack-example"
"tags": []
}
4 changes: 3 additions & 1 deletion apps/trrack-lineup-example/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"presets": ["@nrwl/web/babel"]
"presets": [
"@nrwl/js/babel"
]
}
4 changes: 2 additions & 2 deletions apps/trrack-lineup-example/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "trrack-lineup-example",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/trrack-lineup-example/src",
Expand Down Expand Up @@ -66,6 +67,5 @@
"passWithNoTests": true
}
}
},
"name": "trrack-lineup-example"
}
}
8 changes: 6 additions & 2 deletions apps/trrack-lineup-example/src/app/lineup-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ function trrackColumnEvents(
ranking: Ranking,
trrack: Trrack,
registry: Registry<any>
) {}
) {
// TODO: Add column events
}

function trrackRanking(
lineupId: string,
Expand Down Expand Up @@ -238,7 +240,9 @@ function setupBuffer(instance: LineUp) {

return {
clearBuffer,
addToBuffer() {},
addToBuffer() {
// TODO: Add to buffer
},
isDialogOpen: () => dialog.isOpen,
};
}
3 changes: 3 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional', '@commitlint/config-nx-scopes'],
};
73 changes: 73 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script
src="https://unpkg.com/@reduxjs/toolkit@1.9.2/dist/redux-toolkit.umd.js"
type="text/javascript"
></script>
<script
src="/dist/packages/core/index.umd.js"
type="text/javascript"
></script>
<script>
const reg = Trrack.Registry.create();

const addTask = reg.register('add-task', (state, task) => {
state.tasks.push(task);
});

const actions = {
addTask,
};

const t = Trrack.initializeTrrack({
registry: reg,
initialState: {
tasks: [],
},
});

t.apply(
'Add task',
actions.addTask({
id: Math.floor(Math.random() * 10000).toString(),
complete: false,
})
);

t.apply(
'Add task',
actions.addTask({
id: Math.floor(Math.random() * 10000).toString(),
complete: false,
})
);

t.apply(
'Add task',
actions.addTask({
id: Math.floor(Math.random() * 10000).toString(),
complete: false,
})
);

t.undo();

t.apply(
'Add task',
actions.addTask({
id: Math.floor(Math.random() * 10000).toString(),
complete: false,
})
);

window.t = t;
</script>
</body>
</html>
7 changes: 7 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
'packages/**/*.{js,jsx,ts,tsx,json,html,css,scss}': [
'nx affected:lint --uncommitted --fix=true',
// 'nx affected:test --uncommitted',
'nx format:write --uncommitted',
],
};
34 changes: 17 additions & 17 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
{
"extends": "nx/presets/core.json",
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "MTVhOGI4MDItZWYwYi00ODJiLTkxY2UtYzFkZTY2NjA2NWIyfHJlYWQtd3JpdGU="
}
}
},
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": true
}
},
"extends": "nx/presets/npm.json",
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"npmScope": "trrack",
"affected": {
Expand All @@ -10,18 +24,8 @@
"libsDir": "packages"
},
"cli": {
"defaultCollection": "@nrwl/react",
"packageManager": "yarn"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "MTVhOGI4MDItZWYwYi00ODJiLTkxY2UtYzFkZTY2NjA2NWIyfHJlYWQtd3JpdGU="
}
}
},
"generators": {
"@nrwl/react": {
"application": {
Expand Down Expand Up @@ -56,11 +60,6 @@
}
},
"defaultProject": "core",
"pluginsConfig": {
"@nrwl/js": {
"analyzeSourceFiles": true
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/babel.config.json"],
Expand All @@ -74,7 +73,8 @@
},
"targetDefaults": {
"build": {
"inputs": ["production", "^production"]
"inputs": ["production", "^production"],
"dependsOn": ["^build"]
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
Expand Down
Loading

1 comment on commit 5b302ae

@vercel
Copy link

@vercel vercel bot commented on 5b302ae Feb 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

trrackjs – ./

trrackjs.vercel.app
trrackjs-trrack.vercel.app
trrackjs-git-main-trrack.vercel.app

Please sign in to comment.