Skip to content

Commit

Permalink
Merge pull request #68 from EveripediaNetwork/fix-improved-build-and-ci
Browse files Browse the repository at this point in the history
improved build and ci
  • Loading branch information
Royal-lobster authored Oct 1, 2024
2 parents 2494af3 + 47697e4 commit bfeab5a
Show file tree
Hide file tree
Showing 12 changed files with 1,324 additions and 1,848 deletions.
18 changes: 9 additions & 9 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +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": []
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
32 changes: 0 additions & 32 deletions .eslintrc.json

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Push checks

on: [push]

jobs:
Checkout:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: pnpm/action-setup@v4
with:
version: 9.*
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Biome Lint Check
run: pnpm biome ci
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js 14.x # Update Node.js version to 14 or higher
uses: actions/setup-node@v2
- name: Setup Node.js and pnpm
uses: wyvox/action-setup-pnpm@v3
with:
node-version: 14.x # Ensure compatibility with optional chaining and nullish coalescing

- name: Install Dependencies
run: yarn
node-version: '18'

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true

2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

30 changes: 30 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
52 changes: 25 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,51 @@
"name": "@everipedia/iq-utils",
"version": "2.0.0",
"description": "Common utility library for IQ projects",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
"module": "build/module/index.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"repository": "https://github.com/EveripediaNetwork/iq-utils",
"license": "MIT",
"keywords": [],
"scripts": {
"build": "run-p build:*",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" --write",
"fix:lint": "eslint src --ext .ts --fix",
"watch:build": "tsc -p tsconfig.json -w",
"reset-hard": "git clean -dfx && git reset --hard && yarn",
"release": "yarn build && changeset publish"
"build": "tsup src/index.ts --format cjs,esm --dts",
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
"release": "pnpm run build && changeset publish",
"lint": "lint-staged",
"format": "biome format . --write",
"lint:fix": "pnpm lint --apply",
"watch:build": "tsc -p tsconfig.json -w"
},
"engines": {
"node": ">=10"
"dependencies": {
"zod": "^3.23.8"
},
"devDependencies": {
"@biomejs/biome": "1.9.2",
"@changesets/cli": "^2.24.0",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@types/node": "^22.7.4",
"changeset": "^0.2.6",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"tsup": "^8.3.0",
"typescript": "^4.7.4",
"zod": "^3.23.8"
"lint-staged": "^15.2.10"
},
"files": [
"build/main",
"build/module",
"dist",
"!**/*.spec.*",
"!**/*.json",
"CHANGELOG.md",
"LICENSE",
"README.md"
],
"prettier": {
"singleQuote": true
"engines": {
"node": ">=10",
"pnpm": ">=6"
},
"publishConfig": {
"access": "public"
},
"lint-staged": {
"*.{js,mjs,jsx,ts,tsx,json}": [
"biome check --write --no-errors-on-unmatched"
]
}
}
Loading

0 comments on commit bfeab5a

Please sign in to comment.