Skip to content

Commit

Permalink
Replace js-sha256 dependency with @noble/hashes in Keycloak JS (keycl…
Browse files Browse the repository at this point in the history
  • Loading branch information
sts authored and jonkoops committed Jun 24, 2024
1 parent 07081e1 commit b853ea1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion js/libs/keycloak-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"shx": "^0.3.4"
},
"dependencies": {
"js-sha256": "^0.11.0",
"@noble/hashes": "^1.4.0",
"jwt-decode": "^4.0.0"
}
}
2 changes: 1 addition & 1 deletion js/libs/keycloak-js/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function defineOptions({
file: path.join(targetDir, `${file}.mjs`),
},
],
external: ["js-sha256", "jwt-decode"],
external: ["@noble/hashes", "jwt-decode"],
},
// Legacy Universal Module Definition, or “UMD”, with inlined dependencies.
{
Expand Down
2 changes: 1 addition & 1 deletion js/libs/keycloak-js/src/keycloak.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import sha256 from 'js-sha256';
import { sha256 } from '@noble/hashes/sha256';
import { jwtDecode } from 'jwt-decode';

if (typeof Promise === 'undefined') {
Expand Down
17 changes: 9 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b853ea1

Please sign in to comment.