@amedia/user 0.14.124 → 0.14.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +23 -19
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -463,7 +463,7 @@ We have two strategies:
463
463
 
464
464
  If you're curious about calls, response times etc, there is a debug flag you can set on the URL `debug=something`. If you'd like it to survive page loads, you can add a key to localStorage or sessionStorage: `localStorage.setItem('amedia-user:debug', 'something')`
465
465
 
466
- ## Contributing to @amedia/user
466
+ # Contributing to @amedia/user
467
467
 
468
468
  Hey, thanks! :)
469
469
 
@@ -471,31 +471,35 @@ It's often nice to do development while testing on a real app. You may do so usi
471
471
 
472
472
  PS: Remember to comment-out the module in import maps ;-)
473
473
 
474
- ### Testing live!
474
+ ## Testing live
475
475
 
476
476
  You can test your version live by utilizing a browser extension like Requestly or similar. Run `npm run dev` (which will build and watch for changes locally _and_ starts a webserver listening on localhost:9999). Then add a rule in the extension that replaces requests for @amedia/user/v0/user.js with http://localhost:9999/user.js. Now reload and watch your wonderful change do its thing.
477
477
 
478
- # Publishing new versions
478
+ ## Publishing new versions
479
479
 
480
- NB: Please be advised, as with all packages in Eik, that once you update the alias, _every_ place that uses this module will get your version. It's therefore extra important that you don't break the API without creating a new major version! This can cause the front page not to load, users not being able to log in or get access to content they paid good money for etc.
480
+ ### Creating a new version
481
481
 
482
- Since not all IDEs, linters etc support import maps and certainly don't support loading types that way, yet; we must publish typings to npm and the implementation to Eik.
483
- This has been built into the prepublishOnly and postpublish hooks in package.json
482
+ We use [Changesets](https://github.com/changesets/changesets/tree/main#readme).
484
483
 
485
- 1. Before merging
486
- 1. `npx changeset`
487
- 2. Follow the instructions
488
- 3. Add the changeset `git add .changeset`
489
- 4. Commit and push
490
- 2. After merging
491
- 1. A release PR will we autogenerated (given that tests pass)
492
- 2. Merge that PR to push out a new version
484
+ 1. `npx changeset`
485
+ 2. Follow the instructions
486
+ 3. Add the changeset `git add .changeset`
487
+ 4. Commit and push
493
488
 
494
- Now the new version can be installed in a project by running `npm install -u @amedia/user@v<new version>`
489
+ After merging a release PR will be created/updated (given that tests pass).
490
+ Merging this will push a new version to assets.acdn.no.
495
491
 
496
- When you are as sure as you can be that you didn't break anything to can update the Eik alias:
492
+ ## Deploying
497
493
 
498
- 1. https://github.com/amedia/amedia-user-js/actions/workflows/deploy.yml
499
- 2. Run that workflow. If what you want is to update the latest alias with the latest version, you can leave the fields empty.
494
+ **First snap then prod**:
495
+ If amedia/user breaks in prod it may take down 100+ newspapers entirely,
496
+ so please test on snap first :)
500
497
 
501
- Note that the timeout for alias-caching is 20mins, so if you're unlucky you might have to wait awhile for now.
498
+ We use [importmaps](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script/type/importmap) as a means for deployment: https://github.com/amedia/importmap.
499
+ Follow the readme there for the current deployment practice.
500
+
501
+ Until we shut down eikserver, it's nice to have a valid alias should the
502
+ newly created importmap and ESI-trickery fail:
503
+
504
+ 1. https://github.com/amedia/amedia-user-js/actions/workflows/deploy.yml
505
+ 2. Run that workflow. If what you want is to update the latest alias with the latest version, you can leave the fields empty.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amedia/user",
3
- "version": "0.14.124",
3
+ "version": "0.14.126",
4
4
  "description": "Client lib for working with aID user and associated data",
5
5
  "repository": "https://github.com/amedia/amedia-user-js",
6
6
  "author": "Amedia Utvikling (ID og data)",
@@ -46,19 +46,19 @@
46
46
  "@amedia/browserid": "1.0.17",
47
47
  "@amedia/frontend-rpc": "0.0.12",
48
48
  "runtypes": "6.7.0",
49
- "ts-deepmerge": "7.0.0"
49
+ "ts-deepmerge": "7.0.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@amedia/kragl": "3.0.0",
53
53
  "@amedia/prettier-config": "1.0.6",
54
54
  "@changesets/changelog-github": "0.5.0",
55
- "@changesets/cli": "2.27.5",
55
+ "@changesets/cli": "2.27.7",
56
56
  "@eik/esbuild-plugin": "1.1.47",
57
57
  "@types/jest": "29.5.12",
58
- "@types/node": "20.14.5",
58
+ "@types/node": "22.1.0",
59
59
  "concurrently": "8.2.2",
60
60
  "cors": "2.8.5",
61
- "esbuild": "0.21.5",
61
+ "esbuild": "0.23.0",
62
62
  "express": "4.19.2",
63
63
  "jest": "29.7.0",
64
64
  "jest-environment-jsdom": "29.7.0",
@@ -66,10 +66,10 @@
66
66
  "jest-fetch-mock": "3.0.3",
67
67
  "mockdate": "3.0.5",
68
68
  "npm-run-all": "4.1.5",
69
- "rollup": "4.18.0",
69
+ "rollup": "4.20.0",
70
70
  "rollup-plugin-dts": "6.1.1",
71
- "ts-jest": "29.1.5",
71
+ "ts-jest": "29.2.4",
72
72
  "tslib": "2.6.3",
73
- "typescript": "5.4.5"
73
+ "typescript": "5.5.4"
74
74
  }
75
75
  }