Skip to content

Update package-lock.json to pull in latest dependency fixes #735

@swashbuck

Description

@swashbuck

Subject of the issue

The package-lock.json has several dependencies pinned to older patch versions that contain known bugs. For example, adapt-authoring-authored is locked to 1.3.6 despite package.json specifying ^1.1.0 - meaning 1.4.0 (the latest) should resolve, but doesn't because of the lockfile.

adapt-authoring-authored@1.3.6 has a bug where updateAuthor loses its this binding when tapped onto the request hook, causing a TypeError: Cannot read properties of undefined (reading 'app') on every content query. This was fixed in v1.3.7 and further improved in v1.3.9.

Additionally, @adapt-security/at-utils is locked to 0.19.2 while the latest is 0.21.1. This was the source of a separate issue encountered the same day.

These were two of at least two issues encountered in one session caused by stale locked versions, so a broader npm update across all dependencies would be worthwhile.

Steps to reproduce

  1. Fresh install with current package-lock.json
  2. Create a course
  3. Navigate to the dashboard
  4. Courses are not displayed - server logs show error.undefined with a TypeError stack trace originating from AuthoredModule.updateAuthor

Expected behaviour

Dashboard displays created courses.

Actual behaviour

Dashboard is empty. Server logs:

warn lang missing key 'en.error.undefined'
error server error.undefined TypeError: Cannot read properties of undefined (reading 'app')
    at updateAuthor (adapt-authoring-authored/lib/AuthoredModule.js:77:30)
    at Hook.invoke (adapt-authoring-core/lib/Hook.js:81:59)
    at ContentModule.queryHandler (adapt-authoring-api/lib/AbstractApiModule.js:476:30)

Suggested Fix

Run npm update to refresh the lockfile, pulling in the latest compatible versions of all dependencies. At minimum:

  • adapt-authoring-authored needs >=1.3.7
  • @adapt-security/at-utils needs >=0.20.0 (currently 0.19.2, latest 0.21.1)

Posted via collaboration with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error has occurred

    Type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions