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

Fix formatting and run formatting check in CI #6264

Merged
merged 9 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]
indent_style = space
indent_size = 4
end_of_line = crlf
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
* text=auto
* text=auto eol=lf
*.json linguist-language=JSON-with-Comments
*.gyp -linguist-detectable
4 changes: 4 additions & 0 deletions .github/workflows/ci-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
working-directory: ${{ inputs.path }}/${{ inputs.lib-name }}
run: npm run lint

- name: Check Formatting
working-directory: ${{ inputs.path }}/${{ inputs.lib-name }}
run: npm run format:check

- name: Install Keyring on Linux
if: inputs.os == 'ubuntu-latest' && inputs.path == 'extensions'
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-angular",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-browser",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-common",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-node",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-node-extensions",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Fix formatting #6264",
"packageName": "@azure/msal-react",
"email": "[email protected]",
"dependentChangeType": "none"
}
2 changes: 2 additions & 0 deletions extensions/msal-node-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"test:coverage": "jest --coverage",
"lint": "cd ../../ && npm run lint:node:extensions",
"lint:fix": "npm run lint -- -- --fix",
"format:check": "npx prettier --ignore-path .gitignore --check src test",
"format:fix": "npx prettier --ignore-path .gitignore --write src test",
"prepack": "npm run build:all && node ./scripts/checkBinaries.cjs"
},
"author": {
Expand Down
16 changes: 12 additions & 4 deletions extensions/msal-node-extensions/src/Dpapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
* Licensed under the MIT License.
*/

export interface DpapiBindings{
protectData(dataToEncrypt: Uint8Array, optionalEntropy: Uint8Array|null, scope: string): Uint8Array
unprotectData(encryptData: Uint8Array, optionalEntropy: Uint8Array|null, scope: string): Uint8Array
export interface DpapiBindings {
protectData(
dataToEncrypt: Uint8Array,
optionalEntropy: Uint8Array | null,
scope: string
): Uint8Array;
unprotectData(
encryptData: Uint8Array,
optionalEntropy: Uint8Array | null,
scope: string
): Uint8Array;
}

class defaultDpapi implements DpapiBindings{
class defaultDpapi implements DpapiBindings {
protectData(): Uint8Array {
throw new Error("Dpapi is not supported on this platform");
}
Expand All @@ -21,7 +29,7 @@
if (process.platform !== "win32") {
Dpapi = new defaultDpapi();
} else {
Dpapi = require(`../bin/${process.arch}/dpapi`);

Check warning on line 32 in extensions/msal-node-extensions/src/Dpapi.ts

View workflow job for this annotation

GitHub Actions / msal-node-extensions (ubuntu-latest) / build-test

Found non-literal argument in require

Check warning on line 32 in extensions/msal-node-extensions/src/Dpapi.ts

View workflow job for this annotation

GitHub Actions / msal-node-extensions (macos-latest) / build-test

Found non-literal argument in require

Check warning on line 32 in extensions/msal-node-extensions/src/Dpapi.ts

View workflow job for this annotation

GitHub Actions / msal-node-extensions (windows-latest) / build-test

Found non-literal argument in require
}

export { Dpapi };
Loading
Loading