Skip to content

chore: yarn to pnpm #477

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

Merged
merged 18 commits into from
May 14, 2023
Merged

chore: yarn to pnpm #477

merged 18 commits into from
May 14, 2023

Conversation

baseballyama
Copy link
Member

@baseballyama baseballyama commented May 13, 2023

close: #474

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2023

⚠️ No Changeset found

Latest commit: 0ce2552

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't use codesandbox now, so I removed this file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed commitlint because I got some conflict between ESLint check and commitlint check.
(I can pass pnpm lint but commitlint angers)

I thought I would solve this conflict, but I decided to remove commitlint.
Because...
Commit message doesn't matter to us because we are merging PRs as squash merge.
And personally linting is unnecessary because anyway, CI will do more comprehensive checks.
I don't want to wait a few seconds for every commit for that too.

Comment on lines +77 to +79
rules: {
"no-use-before-define": "off",
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find right fix but after installing pnpm, I got few no-use-before-define errors in Svelte files.
Please tell me some advice if you have a solution🙏

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems it was an old eslint v8.0 issue. Just upgrading to 8.10 solves it.
I will make a PR to change the version of eslint.

@@ -21,7 +21,7 @@ This rule enforces all svelte components to use the same set of languages for th
```svelte
<!-- ✓ GOOD -->
<script lang="ts">
/* eslint svelte/block-lang: {"error", { "script": "ts" }} */
/* eslint svelte/block-lang: {"error", { "script": "ts" }} */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use prettier for formatting instead of remark, few formatting occurs but I think these are right formatting.

| [svelte/require-store-reactive-access](./rules/require-store-reactive-access.md) | disallow to use of the store itself as an operand. Need to use $ prefix or get function. | :wrench: |
| [svelte/valid-compile](./rules/valid-compile.md) | disallow warnings when compiling. | :star: |
| [svelte/valid-prop-names-in-kit-pages](./rules/valid-prop-names-in-kit-pages.md) | disallow props other than data or errors in Svelte Kit page components. | |
| Rule ID | Description | |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is auto-generated table, but I added pnpm run lint-fix:md command for pnpm run update command. So after merge this PR, this table and other auto-generated markdowns will be formatted automatically.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed lint-staged because anyway CI will check everything and I don't want to wait a few seconds in every commit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this because now we don't have git hooks.

"@sveltejs/adapter-static": "^2.0.0",
"@sveltejs/kit": "^1.0.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/kit": "^1.16.3",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated kit-related deps because some reason I couldn't success build locally.

"@1stg/stylelint-config": "^5.0.0",
"@babel/core": "^7.16.0",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-proposal-function-bind": "^7.16.7",
"@babel/types": "^7.16.0",
"@changesets/changelog-github": "^0.4.6",
"@changesets/cli": "^2.24.2",
"@changesets/get-release-plan": "^3.0.16",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to use some dependency in our code, pnpm requests us to add these deps explicitly. That's why I added a few deps.

@@ -111,18 +110,18 @@
"@types/postcss-safe-parser": "^5.0.1",
"@types/prismjs": "^1.26.0",
"@types/stylus": "^0.48.38",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"@typescript-eslint/parser-v4": "npm:@typescript-eslint/parser@4",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this deps for now? I got a type error due to this deps, so I removed this.

@baseballyama baseballyama marked this pull request as ready for review May 14, 2023 04:24
@baseballyama baseballyama requested a review from ota-meshi May 14, 2023 04:25
@baseballyama
Copy link
Member Author

I checked lib folder is exactly the same between main branch and this branch.
And I checked that we can run pnpm run docs:watch properly, but pnpm run docs:build && pnpm run docs:preview is not working properly because of the base path.
I think after deploying to GitHub pages, this will be a not problem but is this correct?

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your great work!

@ota-meshi ota-meshi merged commit 84ef9d8 into sveltejs:main May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use pnpm or update package.json
2 participants