-
Notifications
You must be signed in to change notification settings - Fork 2
Format with Prettier #115
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
Open
mwojick-keeper
wants to merge
3
commits into
main
Choose a base branch
from
prettier
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Format with Prettier #115
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 1738772fec746bca5575c5e7d8b0fbd3acad505a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,32 @@ | ||
| name: Publish to NPM | ||
| on: | ||
| workflow_dispatch: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| contents: read | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| publish-npm: | ||
| environment: prod | ||
| runs-on: ubuntu-latest | ||
| publish-npm: | ||
| environment: prod | ||
| runs-on: ubuntu-latest | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: ./keeperapi | ||
| defaults: | ||
| run: | ||
| working-directory: ./keeperapi | ||
|
|
||
| steps: | ||
| - name: Get the source code | ||
| uses: actions/checkout@v4 | ||
| steps: | ||
| - name: Get the source code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
| registry-url: 'https://registry.npmjs.org' | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24' | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Publish package | ||
| run: npm publish | ||
| - name: Publish package | ||
| run: npm publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "tabWidth": 4, | ||
| "printWidth": 120, | ||
| "trailingComma": "es5" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| # print-vault-browser | ||
|
|
||
| ### INSTRUCTIONS | ||
|
|
||
| - `npm install` | ||
| - `npm start` | ||
|
|
||
| ### NOTES | ||
| - By default, the `preinstall` script links the installed version of `keeperapi` to the local version in this repo | ||
|
|
||
| - By default, the `preinstall` script links the installed version of `keeperapi` to the local version in this repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,39 @@ | ||
| { | ||
| "name": "print-vault-browser", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "start": "react-scripts start", | ||
| "link-local": "npm link ../../keeperapi", | ||
| "types": "tsc --watch", | ||
| "types:ci": "tsc" | ||
| }, | ||
| "dependencies": { | ||
| "keeperapi": "0.2.0", | ||
| "react": "^16.8.6", | ||
| "react-dom": "^16.8.6" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/jest": "24.0.15", | ||
| "@types/node": "12.0.8", | ||
| "@types/react": "16.8.21", | ||
| "@types/react-dom": "16.8.4", | ||
| "react-scripts": "3.0.1", | ||
| "typescript": "^4.0.1" | ||
| }, | ||
| "eslintConfig": { | ||
| "extends": "react-app" | ||
| }, | ||
| "browserslist": { | ||
| "production": [ | ||
| ">0.2%", | ||
| "not dead", | ||
| "not op_mini all" | ||
| ], | ||
| "development": [ | ||
| "last 1 chrome version", | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| } | ||
| "name": "print-vault-browser", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "scripts": { | ||
| "start": "react-scripts start", | ||
| "link-local": "npm link ../../keeperapi", | ||
| "types": "tsc --watch", | ||
| "types:ci": "tsc" | ||
| }, | ||
| "dependencies": { | ||
| "keeperapi": "0.2.0", | ||
| "react": "^16.8.6", | ||
| "react-dom": "^16.8.6" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/jest": "24.0.15", | ||
| "@types/node": "12.0.8", | ||
| "@types/react": "16.8.21", | ||
| "@types/react-dom": "16.8.4", | ||
| "react-scripts": "3.0.1", | ||
| "typescript": "^4.0.1" | ||
| }, | ||
| "eslintConfig": { | ||
| "extends": "react-app" | ||
| }, | ||
| "browserslist": { | ||
| "production": [ | ||
| ">0.2%", | ||
| "not dead", | ||
| "not op_mini all" | ||
| ], | ||
| "development": [ | ||
| "last 1 chrome version", | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| { | ||
| "short_name": "React App", | ||
| "name": "Create React App Sample", | ||
| "icons": [ | ||
| { | ||
| "src": "favicon.ico", | ||
| "sizes": "64x64 32x32 24x24 16x16", | ||
| "type": "image/x-icon" | ||
| } | ||
| ], | ||
| "start_url": ".", | ||
| "display": "standalone", | ||
| "theme_color": "#000000", | ||
| "background_color": "#ffffff" | ||
| "short_name": "React App", | ||
| "name": "Create React App Sample", | ||
| "icons": [ | ||
| { | ||
| "src": "favicon.ico", | ||
| "sizes": "64x64 32x32 24x24 16x16", | ||
| "type": "image/x-icon" | ||
| } | ||
| ], | ||
| "start_url": ".", | ||
| "display": "standalone", | ||
| "theme_color": "#000000", | ||
| "background_color": "#ffffff" | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 5 days ago
To fix the problem, explicitly declare restricted
GITHUB_TOKENpermissions in the workflow. The safest and simplest approach here is to add apermissions:block at the workflow (top) level, which will apply to theauditjob and any future jobs that don’t override it. Since the workflow only needs to read repository contents, we can setcontents: read, which matches the minimal permissions CodeQL suggested.Concretely, in
.github/workflows/main.yml, add apermissions:block after theon:definition and beforejobs:. No existing steps or functionality need to change; the workflow will still be triggered onpush, run onubuntu-latest, and execute the samenpmcommands, but with aGITHUB_TOKENlimited to reading repository contents. No imports, extra methods, or additional configuration files are required.