Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pnpm #2643

Merged
merged 34 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
19e87f1
add pnpm-lock
preschian Mar 22, 2022
a3bb162
add node-linker=hoisted
preschian Mar 22, 2022
5d97113
adjust node engines
preschian Mar 22, 2022
eed2c03
update reviewdog actions
preschian Mar 22, 2022
c422b91
try use npmrc in github actions
preschian Mar 22, 2022
c1e2c2d
cat npmrc
preschian Mar 22, 2022
f433150
pnpm run_install: true
preschian Mar 22, 2022
b6d10d4
set postcss null
preschian Mar 22, 2022
d1cfd69
test without use-npmrc
preschian Mar 22, 2022
f941e68
unused github actions
preschian Mar 23, 2022
96ef2ee
adjust netlify.toml
preschian Mar 23, 2022
6c360fb
run pnpm with npx
preschian Mar 23, 2022
6a33236
add prebuild command
preschian Mar 23, 2022
745f67d
remove -r on prebuild
preschian Mar 23, 2022
2ef4aa3
test without context
preschian Mar 23, 2022
28b81e0
test prebuild command
preschian Mar 23, 2022
17cad2f
adjust github actions
preschian Mar 23, 2022
e720bdb
reordering nodejs in github actions
preschian Mar 23, 2022
85b212c
move prebuild command to netlify.toml
preschian Mar 23, 2022
816471b
Merge branch 'main' of github.com:preschian/nft-gallery into switch-pnpm
preschian Mar 23, 2022
e53063d
test ignore deepsource invalid rules
preschian Mar 23, 2022
8ef56a5
not works
preschian Mar 23, 2022
f4090de
update commands
preschian Mar 25, 2022
d5c77c6
Merge branch 'main' of github.com:preschian/nft-gallery into switch-pnpm
preschian Mar 25, 2022
5cc5f1d
add install deps step
preschian Mar 25, 2022
d7e7c4c
update lock files
preschian Mar 25, 2022
5518764
add pnpm cache in github actions
preschian Mar 25, 2022
4319add
update docs from yarn to pnpm
preschian Mar 25, 2022
7fbf812
add engine strict
preschian Mar 25, 2022
0d1fde7
Update netlify.toml
yangwao Mar 25, 2022
aa2c9bb
removing only-allow for netlify and cf
yangwao Mar 25, 2022
3dbfaa2
fixing package.json its like "99
yangwao Mar 25, 2022
91e5855
Merge branch 'main' of github.com:preschian/nft-gallery into switch-pnpm
preschian Mar 25, 2022
bd6d6f6
update lockfile
preschian Mar 25, 2022
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
4 changes: 0 additions & 4 deletions .github/workflows/action_dogs.yml

This file was deleted.

27 changes: 20 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,35 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

- name: Install pnpm
uses: pnpm/action-setup@v2.2.1
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.2'
node-version: 16
cache: 'pnpm'

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Run Code Lint
run: yarn lint:quiet
run: pnpm lint:quiet

- name: Run Build
run: yarn build
run: pnpm build

- name: Run Test
run: yarn test
run: pnpm test
2 changes: 0 additions & 2 deletions .github/workflows/game_of_life.yml

This file was deleted.

18 changes: 16 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,27 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.2'
node-version: 16
cache: 'pnpm'

- name: Install Dependencies
run: yarn
run: pnpm install

- name: Run eslint with reviewdog
uses: reviewdog/action-eslint@v1.16.0
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node-linker=hoisted
engine-strict = true
59 changes: 32 additions & 27 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Contributing to KodaDot: NFT gallery


KodaDot NFT gallery has a plan to be community-owned.
We are welcoming community contributions from you.
Take a sneak peek on [good first issues](https://github.com/kodadot/nft-gallery/contribute), comment, and make PR.
Expand All @@ -13,7 +12,7 @@ If everything goes well, chances that you will be **rewarded are high**. We migh
Before you being:

- We utilize [**Node.js**](https://nodejs.org) as a development tool. To avoid potential compatibility issues, check if you're on the version of **Node.js we support.**
- Make sure that you use [**yarn**](https://yarnpkg.com) as the package manager.
- Make sure that you use [**pnpm**](https://pnpm.io/installation) as the package manager.
- Please have a read the [code of conduct](CODE_OF_CONDUCT.md)
- [Learn how to set up your environment for the first time](FIRST_TIME.md)

Expand Down Expand Up @@ -50,25 +49,25 @@ To create your KSM address in safely and long-term manner, we recommend you to g

### Sharing your address to receive the reward

After creating an account, you can visit [KodaDot Transfer](https://kodadot.xyz/transfer) to make a payment link. Entering an amount like 100 USD and clicking the button _Copy Payout address_ will copy the link to your clipboard, and you can share it with us, like whenever you are filling up a bug report or submitting pull-request
After creating an account, you can visit [KodaDot Transfer](https://kodadot.xyz/transfer) to make a payment link. Entering an amount like 100 USD and clicking the button _Copy Payout address_ will copy the link to your clipboard, and you can share it with us, like whenever you are filling up a bug report or submitting pull-request

### Switching account/network

While you are on your _[accounts](https://polkadot.js.org/apps/#/accounts)_ dashboard, check the top-left corner to confirm and ensure your current network. Click the avatar to see options to select from and switch as desired.

> To switch to Kusuma Network, search and select __KUSAMA__ under _KUSAMA & PARACHAINS_ and `switch` by selecting the __switch__ option at the top-most area of the opened side nav.
> To switch to Kusuma Network, search and select **KUSAMA** under _KUSAMA & PARACHAINS_ and `switch` by selecting the **switch** option at the top-most area of the opened side nav.

### Checking your KSM balance

Check `balances` under your _[accounts](https://polkadot.js.org/apps/#/accounts)_ dashboard to see that. Because we use KSM, you need to ensure you are on the _Kusuma network_. Check the top-left corner to confirm and ensure your `balance` is in __KSM__. If not, kindly _switch network_ by clicking the avatar on your top-left corner, and switch to __*Kusuma*__. Your __balances__ will now be in __KSM__.
Check `balances` under your _[accounts](https://polkadot.js.org/apps/#/accounts)_ dashboard to see that. Because we use KSM, you need to ensure you are on the _Kusuma network_. Check the top-left corner to confirm and ensure your `balance` is in **KSM**. If not, kindly _switch network_ by clicking the avatar on your top-left corner, and switch to **_Kusuma_**. Your **balances** will now be in **KSM**.

### Bounty levels

Our typical payout structure for bounties is per label on the issue. Here is the table for an overview

| $ | $$ | $$$ | $$$$ | $$$$$ |
| :----------------------------------------------------------: | :---------------------------------------------------: | :---------------------------------------------------------------: | :-------------------------------------------------------------: | :-----------------------------------------------------------------------------------: |
| 50-100 | 150-300 | 450-600 | 700 - 1000 | 1000+ |
| $ | $$ | $$$ | $$$$ | $$$$$ |
| :----------------------------------------------------------: | :---------------------------------------------------: | :---------------------------------------------------------------: | :-------------------------------------------------------------: | :------------------------------------------------------------------------------------: |
| 50-100 | 150-300 | 450-600 | 700 - 1000 | 1000+ |
| Beginner, few lines, <br /> lot of comments/assistance on PR | Required brain use, <br /> smart solution, autonomous | Complex, delivered new shiny stuff, <br /> did not break anything | Dedicated, new feature, rework older stuff, quick delivery time | You seems reliable, responsible, we can trust you, and you have alignment with project |

You can [check recent labels](https://github.com/kodadot/nft-gallery/labels)
Expand Down Expand Up @@ -105,19 +104,19 @@ Whenever you open PR against our repository, our best recommendation is to finis

When the issue is **converted to a draft, and you don't reply within 48h**, we will close it and unassign you from the task to leave room for someone else to finish the PR who has more availability and codebase understanding.

### Issues 🐞
### Issues 🐞

Issues are used to track tasks that contributors can help with. If an issue has a triage label, we haven't reviewed it yet, and you shouldn't begin work on it.

If you've found something in the content or the website that should be updated, search open issues to see if someone else has reported the same thing. If it's something new, open an issue using a template. We'll use the issue to talk about the problem you want to fix.

### Pull requests 🛠️
### Pull requests 🛠️

A pull request is a way to suggest changes in our repository.

When we merge those changes, they should be deployed to the live site within 24 hours. 🌍 To learn more about opening a pull request in this repo, see Opening a pull request below.

### Support ❓
### Support ❓

We are a small team working hard to keep up with the documentation demands of a continuously changing product. Unfortunately, we can't help with support questions in this repository. If you are experiencing a problem with GitHub unrelated to our documentation, please get in touch with GitHub Support directly. Any issues, discussions, or pull requests opened here requesting support will be given information about contacting GitHub Support, then closed and locked.

Expand Down Expand Up @@ -162,12 +161,13 @@ Doesn't tell me anything about why you're doing that

### Is it of good quality

* There are no spelling mistakes
* It reads well
* For English language contributions: Has a good score on [Grammarly](https://grammarly.com) or [Hemingway App](http://www.hemingwayapp.com/)
* Haven't used force-push. If that is the case, PR will be closed.
- There are no spelling mistakes
- It reads well
- For English language contributions: Has a good score on [Grammarly](https://grammarly.com) or [Hemingway App](http://www.hemingwayapp.com/)
- Haven't used force-push. If that is the case, PR will be closed.

### Reviewing

We (usually the core team, sometimes KodaDot engineers or support too!) review every PR. The purpose of reviews is to create the best content for people who use KodaDot.

💛 Reviews are always respectful, acknowledging that everyone did the best possible job with the knowledge they had at the time.
Expand All @@ -177,47 +177,52 @@ We (usually the core team, sometimes KodaDot engineers or support too!) review e
💛 Reviews are constructive and start a conversation around feedback.

### Self-review

You should always review your PR first.

For content changes, make sure that you:

* Confirm that the changes address every part of the content design plan from your issue (if there are differences, explain them).
* Review the content for technical accuracy.
* Review the entire pull request using the localization checklist.
* Copy-edit the changes for grammar, spelling, and adherence to the style guide.
* Check new or updated Liquid statements to confirm that versioning is correct.
* Check that all of your changes render correctly in staging. Remember that lists and tables can be tricky.
* If there are any failing checks in your PR, troubleshoot them until they're all passing.
- Confirm that the changes address every part of the content design plan from your issue (if there are differences, explain them).
- Review the content for technical accuracy.
- Review the entire pull request using the localization checklist.
- Copy-edit the changes for grammar, spelling, and adherence to the style guide.
- Check new or updated Liquid statements to confirm that versioning is correct.
- Check that all of your changes render correctly in staging. Remember that lists and tables can be tricky.
- If there are any failing checks in your PR, troubleshoot them until they're all passing.

### Update strategy: always use `merge`

Try to submit your PR as soon as possible. That's always an excellent way to avoid conflict with other commits.

However, if the conflict happens, we want you always use `merge` to resolve it. The reason is
we don't want to mix the merging strategies, and we want to see only your commits in your PR.

### Pull request template

When you open a pull request, you must fill out the "Ready for review" template before we can review your PR. This template helps reviewers understand your changes and the purpose of your pull request.

# Troubleshooting

### Code quality

We follow what we have in `.eslintrc.js`, and you can see warnings and errors by running `yarn lint`. With `yarn lint --fix`, you will get auto fixed code.
We follow what we have in `.eslintrc.js`, and you can see warnings and errors by running `pnpm lint`. With `pnpm lint --fix`, you will get auto fixed code.

### Don't have access to push to the repository
You need to fork the repository, commit a change to your repository, and [create pull request](https://opensource.com/article/19/7/create-pull-request-github).

You need to fork the repository, commit a change to your repository, and [create pull request](https://opensource.com/article/19/7/create-pull-request-github).

### Does it move this repository closer to my vision for the repository

The aim of this repository is:

* To provide a [README](README.md) and assorted documents anyone can copy and paste into their project
* The content is usable by someone who hasn't written something like this before
* Foster a culture of respect and gratitude in the open-source community.
- To provide a [README](README.md) and assorted documents anyone can copy and paste into their project
- The content is usable by someone who hasn't written something like this before
- Foster a culture of respect and gratitude in the open-source community.

### Better comfort

For crafting much better culture and DEVUX, we reccomend some extension to browse issue faster

- [Refined Github](https://chrome.google.com/webstore/detail/refined-github/hlepfoohegkhhmjieoechaddaejaokhf)
- [Github HoverCard](https://chrome.google.com/webstore/detail/github-hovercard/mmoahbbnojgkclgceahhakhnccimnplk)
- [Gifs for Github](https://chrome.google.com/webstore/detail/gifs-for-github/dkgjnpbipbdaoaadbdhpiokaemhlphep)
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ FROM node:16.14.2
WORKDIR /app

COPY package.json .
COPY yarn.lock .
COPY pnpm-lock.yaml .

RUN yarn install
RUN pnpm install

COPY . .

ENV HOST 0.0.0.0
EXPOSE 9090

CMD [ "yarn", "dev" ]
CMD [ "pnpm", "dev" ]
Loading