Skip to content

Remove Q.js lib - #1267

Merged
juliandescottes merged 3 commits into
masterfrom
migrate-qjs-lib
Sep 20, 2026
Merged

juliandescottes merged 3 commits into
masterfrom
migrate-qjs-lib

Conversation

@grosbouddha

Copy link
Copy Markdown
Collaborator

Drop the q.js promise library in favor of native Promise:

  • Q.defer() → new Promise((resolve, reject) => ...)
  • Q.resolve / Q.reject → Promise.resolve / Promise.reject
  • Q.all([...]) → Promise.all([...])
  • Q([]) → Promise.resolve([])

No Q-specific features were used anywhere in app code, so the migration is pure 1:1 with no behavior changes.

The trickiest part was ensuring proper this binding where needed - constructing a Promise requires an anonymous function that shadows the enclosing this.

TESTED=Unit tests and E2E passing

@juliandescottes juliandescottes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Now that looks like JS from 2017 or something :)

Comment thread src/js/service/storage/GalleryStorageService.js
Comment thread .husky/pre-commit
@@ -1 +1 @@
npx biome check --staged --write --no-errors-on-unmatched
npm run lint

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking if this is intentional.

Follow up: Noticed we are only linting on src/
We should extend to tests/ no reason not to lint and format test code.

@juliandescottes
juliandescottes merged commit bef52be into master Sep 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants