Skip to content
Open
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
64 changes: 28 additions & 36 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,18 @@ jobs:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
cache: true

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: '.nvmrc'

- name: Cache node_modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}

- name: Install
run: corepack enable && yarn install
run: pnpm install --frozen-lockfile

lint:
needs: prep
Expand All @@ -44,23 +42,21 @@ jobs:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
cache: true

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: '.nvmrc'

- name: Cache node_modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}

- name: Install
run: corepack enable && yarn install
run: pnpm install --frozen-lockfile

- name: Lint
run: yarn lint
run: pnpm lint

test:
needs: prep
Expand All @@ -70,23 +66,21 @@ jobs:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
cache: true

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: '.nvmrc'

- name: Cache node_modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}

- name: Install
run: corepack enable && yarn install
run: pnpm install --frozen-lockfile

- name: Test
run: yarn test
run: pnpm test

build:
needs: prep
Expand All @@ -96,20 +90,18 @@ jobs:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
with:
cache: true

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: '.nvmrc'

- name: Cache node_modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ hashFiles('**/package.json') }}

- name: Install
run: corepack enable && yarn install
run: pnpm install --frozen-lockfile

- name: Test
run: yarn test
- name: Build
run: pnpm build
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0

- name: Use Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
Expand All @@ -48,7 +51,7 @@ jobs:
run: npm install -g npm@latest

- name: Install
run: corepack enable && yarn install
run: pnpm install --frozen-lockfile

- name: Publish to npm
run: npm publish --access public --provenance
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ With Yarn:
yarn add @developmentseed/stac-react
```

With pnpm:

```sh
pnpm add @developmentseed/stac-react
```

### Peer Dependency: @tanstack/react-query

stac-react relies on [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) for data fetching and caching. To avoid duplicate React Query clients and potential version conflicts, stac-react lists `@tanstack/react-query` as a **peer dependency**. This means you must install it in your project:
Expand All @@ -27,6 +33,8 @@ stac-react relies on [TanStack Query](https://tanstack.com/query/latest/docs/fra
npm install @tanstack/react-query
# or
yarn add @tanstack/react-query
# or
pnpm add @tanstack/react-query
```

If you do not install it, your package manager will warn you, and stac-react will not work correctly.
Expand Down Expand Up @@ -522,20 +530,28 @@ function StacComponent() {

## Development

This project uses [pnpm](https://pnpm.io/installation). The version is pinned in the `packageManager` field of `package.json`.

Install dependencies

```sh
pnpm install
```

Run tests

```sh
yarn test
pnpm test
```

Lint

```sh
yarn lint
pnpm lint
```

Build

```
yarn build
```sh
pnpm build
```
10 changes: 5 additions & 5 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo

In the project directory, you can run:

### `yarn start`
### `pnpm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.

The page will reload when you make changes.\
You may also see any lint errors in the console.

### `yarn test`
### `pnpm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`
### `pnpm build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
Expand All @@ -29,7 +29,7 @@ Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `yarn eject`
### `pnpm eject`

**Note: this is a one-way operation. Once you `eject`, you can't go back!**

Expand Down Expand Up @@ -65,6 +65,6 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/a

This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)

### `yarn build` fails to minify
### `pnpm build` fails to minify

This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
Loading
Loading