Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,11 @@ jobs:
name: TypeScript Check All
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install node v22
uses: actions/setup-node@v1
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 22
- uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: yarn install
run: yarn install --frozen-lockfile
- name: check-all
run: yarn check-all
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm check-all
15 changes: 7 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ jobs:
id: release
with:
release-type: node
- uses: actions/checkout@v4
# Ensure that a publication only occurs when a new release is created
- uses: actions/checkout@v6
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
- uses: pnpm/action-setup@v6
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v6
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install -g npm@11 # 11.5.1 needed for OIDC / Trusted publishing
if: ${{ steps.release.outputs.release_created }}
- run: yarn install --frozen-lockfile
- run: pnpm install --frozen-lockfile
if: ${{ steps.release.outputs.release_created }}
- run: yarn build
- run: pnpm build
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
- run: pnpm publish --access public
if: ${{ steps.release.outputs.release_created }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Shared typescript utility methods and types for AtB products.
## Install

```
yarn add @atb-as/utils
pnpm add @atb-as/utils
```

## Local development

In order to test local changes to the package locally, you can use [yalc](https://github.com/wclr/yalc). This is an alternative to `yarn link`, that works better with React Native / metro.

1. Run `npm i yalc -g` to install yalc on your machine.
2. Run `yarn build && yalc push` to set up a local link to this package.
2. Run `pnpm build && yalc push` to set up a local link to this package.
3. Run `yalc add @atb-as/utils` in the project that depends on it.

Your local changes to `@atb-as/utils` should now be available to use. When you make more changes locally, you can run `yarn build && yalc push` again to update the linked package.
Your local changes to `@atb-as/utils` should now be available to use. When you make more changes locally, you can run `pnpm build && yalc push` again to update the linked package.

When you're done, run `yalc remove --all` to reset the project's `package.json`.

Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
"module": "lib/index.js",
"types": "lib/index.d.ts",
"private": false,
"packageManager": "pnpm@11.1.1",
"engines": {
"node": ">=22"
},
"scripts": {
"build": "tsc",
"lint": "eslint",
"prettier": "prettier -c src",
"check-all": "yarn tsc && yarn lint && yarn prettier && yarn test",
"prepublishOnly": "yarn build",
"check-all": "pnpm build && pnpm lint && pnpm prettier && pnpm test",
"prepublishOnly": "pnpm build",
"test": "jest"
},
"license": "EUPL-1.2",
Expand Down
Loading
Loading