Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 0 additions & 13 deletions .eslintrc.cjs

This file was deleted.

13 changes: 6 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ name: Main CI

on: [push]

permissions: {}

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/checkout@v6
- name: Use Node.js 22.x
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
node-version: 22.x
- name: Install
run: npm install
- name: Lint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ coverage
dist
node_modules
npm-debug.log
package-lock.json
reports
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# credential-handler-polyfill ChangeLog

## 4.0.3 - 2026-06-dd

### Changed
- Update dev dependencies:
- Use `@digitalbazaar/eslint-config@8` with eslint 9 flat config,
replacing `eslint-config-digitalbazaar`.
- Use `webpack-cli@7`.
- Update GitHub Actions to use Node.js 22.x and current action versions.

## 4.0.2 - 2026-06-12

### Fixed
Expand Down
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*!
* Copyright (c) 2026 Digital Bazaar, Inc.
*/
import config from '@digitalbazaar/eslint-config/browser-recommended';
import globals from 'globals';

export default [
...config,
{
files: ['webpack.config.js'],
languageOptions: {
globals: {
...globals.node
}
}
}
];
3 changes: 1 addition & 2 deletions lib/CredentialHandler.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*!
* The core CredentialHandler class.
*
* Copyright (c) 2017-2024 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2017-2026 Digital Bazaar, Inc.
*/
/* global DOMException */
import {EventEmitter, WebApp} from 'web-request-rpc';

import {CredentialHandlerService} from './CredentialHandlerService.js';
Expand Down
3 changes: 1 addition & 2 deletions lib/CredentialHints.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*!
* Copyright (c) 2017-2024 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2017-2026 Digital Bazaar, Inc.
*/
/* global Image */
export class CredentialHints {
constructor(url, injector) {
const remote = injector.get('credentialHints', {
Expand Down
3 changes: 1 addition & 2 deletions lib/CredentialManager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*!
* Copyright (c) 2017-2024 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2017-2026 Digital Bazaar, Inc.
*/
/* global navigator */
import {CredentialHints} from './CredentialHints.js';

/* A CredentialManager for a Web Credential Mediator. */
Expand Down
5 changes: 2 additions & 3 deletions lib/CredentialsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* Wrapper for native CredentialsContainer that uses remote Credential Mediator
* for WebCredential-related operations.
*
* Copyright (c) 2017-2024 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2017-2026 Digital Bazaar, Inc.
*/
/* global navigator, DOMException */
import {WebCredential} from './WebCredential.js';

// RPC timeouts, 0 = indefinite
Expand All @@ -17,7 +16,7 @@ export class CredentialsContainer {
get: navigator.credentials && navigator.credentials.get &&
navigator.credentials.get.bind(navigator.credentials),
store: navigator.credentials && navigator.credentials.store &&
navigator.credentials.store.bind(navigator.credentials),
navigator.credentials.store.bind(navigator.credentials)
};

this._init = (async () => {
Expand Down
7 changes: 4 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*!
* Copyright (c) 2017-2026 Digital Bazaar, Inc.
*/
/* global navigator, window */
import {WebAppContext} from 'web-request-rpc';

import {CredentialHandler} from './CredentialHandler.js';
Expand Down Expand Up @@ -109,7 +108,7 @@ export async function load(options = {
value: navCredentialsProxy,
writable: true
});
} catch(e) {
} catch {
// on WebKit, `navigator.credentials` is a non-configurable property
// that cannot be redefined as a data property; fall back to plain
// assignment and, if that also fails, continue without the proxy --
Expand All @@ -118,7 +117,9 @@ export async function load(options = {
// subsequent overwrites of `navigator.credentials` itself is lost
try {
navigator.credentials = navCredentialsProxy;
} catch(e2) {}
} catch {
// ignore; continue without overwrite protection
}
}

window.CredentialManager = CredentialManager;
Expand Down
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"prepublish": "npm run build",
"build": "webpack",
"lint": "eslint --ext .cjs,.js ."
"lint": "eslint --no-warn-ignored ."
},
"repository": {
"type": "git",
Expand All @@ -33,12 +33,10 @@
"web-request-rpc": "^3.0.1"
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-digitalbazaar": "^5.2.0",
"eslint-plugin-jsdoc": "^48.4.0",
"eslint-plugin-unicorn": "^54.0.0",
"webpack": "^5.92.1",
"webpack-cli": "^5.1.4"
"@digitalbazaar/eslint-config": "^8.0.1",
"eslint": "^9.39.4",
"webpack": "^5.107.2",
"webpack-cli": "^7.0.3"
},
"bedrock": {
"browserDependencies": [
Expand Down