inrupt / inrupt/solid-client-authn-js

Support for Angular 9

Open
#33 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
TypeScript
Stars
77
Forks
49
Avg merge
18h 20m
Merged PRs (30d)
32

Description

Note, this is based on the popup branch. (commit 91bc153b88).

In an Angular 9 set up the following steps are needed for the library to work:

  1. Add this snippet to the root package.json (reference):
"browser": {
    "fs": false,
    "path": false,
    "os": false,
    "crypto": false,
    "stream": false,
    "http": false,
    "tls": false,
    "zlib": false,
    "https": false,
    "net": false
 }
  1. Update the builder code to use node's crypto (reference). In file node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js replace node: false with node: {crypto: true, stream: true, fs: 'empty', net: 'empty'}. This can be hooked to postinstall script.

  2. Set allowSyntheticDefaultImports in the project tsconfig.
    ERROR in node_modules/solid-auth-fetcher/dist/login/ILoginOptions.d.ts:1:8 - error TS1259: Module '"node_modules/solid-auth-fetcher/node_modules/@types/url-parse/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by checking the popup branch at commit 91bc153b88, then inspect the root package.json, Angular's browser.js builder configuration, and the project tsconfig. Reproduce the Angular 9 setup and verify whether the browser fallbacks, crypto and stream handling, and allowSyntheticDefaultImports requirement can be supported by the library rather than manual node_modules edits.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, node.js, typescript
Domain
build-system, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.