Skip to content

Commit

Permalink
feat(pkg)!: support more fields from yarn and vscode (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jul 5, 2022
1 parent 626d39f commit 675f54c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-crabs-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'prettier-plugin-pkg': minor
---

feat!: support more fields from yarn and vscode
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ open_collective: unts
custom:
- https://opencollective.com/1stG
- https://opencollective.com/rxts
- https://afdian.net/@JounQin
2 changes: 1 addition & 1 deletion .github/workflows/pkg-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 16
cache: yarn

- name: Package Size Report
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 16
cache: yarn

- name: Install Dependencies
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions packages/pkg/src/rules/sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const dependencyNames = [
'peerDependencies',
'peerDependenciesMeta',
'dependencies',
'dependenciesMeta',
'optionalDependencies',
'devDependencies',
'overrides',
Expand All @@ -31,6 +32,7 @@ const primary = [
// meta
'name',
'version',
'preview',
'type',
'flat',
'displayName',
Expand Down Expand Up @@ -95,13 +97,15 @@ const primary = [

// vscode spec
'icon',
'badges',
'galleryBanner',
'activationEvents',
'contributes',
'markdown',
'qna',
'extensionPack',
'extensionDependencies',
'extensionKind',
]

export const sort = (props: ObjectProperty[]) => {
Expand Down

1 comment on commit 675f54c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Deploy preview for prettier ready!

✅ Preview
https://prettier-64fjj028y-jounqin.vercel.app

Built with commit 675f54c.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.