Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into add-watchEffect-function-in-Stock
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr committed Apr 4, 2024
2 parents 5bcc225 + c35fbf1 commit 9d61854
Show file tree
Hide file tree
Showing 14 changed files with 1,089 additions and 1,045 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/eleven-lamps-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stocked': patch
---

Fixed error in notifyPaths - observer could be undefined
5 changes: 5 additions & 0 deletions .changeset/odd-kids-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'stocked': patch
---

Fix pnpm publish script
10 changes: 10 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"stocked": "1.0.0-beta.30"
},
"changesets": [
"odd-kids-applaud"
]
}
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
*.config.js
*.config.js
dangerfile.js
35 changes: 35 additions & 0 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Changeset existence
on:
pull_request:
branches: [main]
types: [labeled, opened, synchronize, reopened]
workflow_dispatch:
jobs:
changeset:
name: Check for changeset existence
runs-on: ubuntu-latest
if: ${{ !contains(github.event.pull_request.labels.*.name, 'chore') }}

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

- name: Use Node 20
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install pnpm 8.x.x
uses: pnpm/[email protected]
with:
version: 8.x.x

- name: Install pnpm dependencies (with cache)
uses: covbot/pnpm-install-with-cache@v1

- name: Danger
run: pnpm danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node 20
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install pnpm 8.x.x
uses: pnpm/[email protected]
with:
version: 8.x.x

- name: Install pnpm dependencies (with cache)
uses: covbot/pnpm-install-with-cache@v1

- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}

- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: pnpm bump
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# stocked

## 1.0.0-beta.32

### Patch Changes

- fd5e996: Fix pnpm publish script

## 1.0.0-beta.31

### Patch Changes

- fef14d2: Configured @changesets/cli
7 changes: 7 additions & 0 deletions dangerfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const { danger, fail } = require('danger');

const changesets = danger.git.fileMatch('.changeset/*.md');

if (!changesets.created) {
fail('No changesets has been added in you pull request!');
}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stocked",
"description": "Tiny state management library for react.",
"version": "1.0.0-beta.30",
"version": "1.0.0-beta.32",
"main": "dist/index.js",
"module": "dist/stocked.esm.js",
"repository": "ArtiomTr/stocked",
Expand All @@ -16,14 +16,15 @@
"lint": "eslint .",
"lint:config": "pnpm lint --write-file",
"prepublishOnly": "aqu build",
"release": "np",
"serve:docs": "vitepress serve new-docs",
"size": "size-limit",
"start": "aqu watch",
"test": "jest --passWithNoTests",
"test:coverage": "pnpm run test --silent --ci --coverage --json --outputFile=report.json",
"test:lcov": "pnpm run test --silent --ci --coverage",
"test:watch": "pnpm run test --watch"
"test:watch": "pnpm run test --watch",
"bump": "changeset version && pnpm i --lockfile-only",
"release": "pnpm build && changeset tag && pnpm publish"
},
"dependencies": {
"lodash": "^4.17.20",
Expand All @@ -32,6 +33,7 @@
"tiny-invariant": "^1.1.0"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@size-limit/preset-small-lib": "^4.6.2",
"@testing-library/react": "^14.0.0",
"@types/jest": "^27.0.1",
Expand All @@ -42,12 +44,12 @@
"@typescript-eslint/parser": "^4.9.0",
"aqu": "^0.3.2",
"configs": "github:fracht/configs",
"danger": "^11.3.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^27.0.6",
"jest-watch-typeahead": "^1.0.0",
"np": "^6.5.0",
"prettier": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Loading

0 comments on commit 9d61854

Please sign in to comment.