mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-07-13 21:35:19 +02:00
b4a27a7c0d
* Migrate frontend to TypeScript with Deno-based tooling (#206) Compiles assets/*.ts via sensiolabs/typescript-bundle (standalone SWC binary) and adds Deno for formatting, linting, type-checking, and tests, keeping the project's no-Node/npm approach intact. Wires all four into CI, the Justfile, and the pre-commit hook. * fix: build TypeScript assets before running PHPUnit in CI The tests job ran bin/console sass:build but never typescript:build, so var/typescript/ didn't exist and any page rendering the importmap (e.g. backoffice/base.html.twig) errored during tests. * test: add regression test for backoffice navbar-toggler dead target Guards against the navbar-toggler button pointing at a collapse target (#navbarSupportedContent) that isn't rendered for the current user — the bug hit on the login page before #210 restructured the nav to always render at least one item (the Releases link) regardless of auth state. * fix: stop hand-enumerating TS files for deno check deno check assets/*.ts assets/controllers/*.ts assets/controllers/bo/*.ts was duplicated in CI and the Justfile, and silently misses any new controller subdirectory (fmt/lint/test already recurse assets/ via deno.json). Add a top-level exclude for assets/vendor/ (respected by all deno subcommands, unlike the per-task include/exclude blocks) so deno check assets/ can recurse safely instead. * fix: GitHubReleasesService date parsing and falsy release name - Move the release-mapping array_map inside the try block so a malformed published_at (or any other parse failure) degrades to the same empty-list fallback as an HTTP failure, instead of throwing uncaught out of the cache callback. - Stop treating a release literally named "0" as unnamed — the old `?:` fallback is falsy for that string and silently substituted the tag name instead. - Render release dates in UTC explicitly; Twig's date filter otherwise silently converts to the app's default timezone (Europe/Amsterdam), which could show the wrong calendar day for releases near midnight. * docs: add scope-creep-as-a-service rule to CLAUDE.md Per user instruction: when a review turns up a real bug outside the current task's scope, fix it in the same MR (with a regression test) rather than just reporting it, unless it needs a human design call.
45 lines
2.0 KiB
PHP
45 lines
2.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* Returns the importmap for this application.
|
|
*
|
|
* - "path" is a path inside the asset mapper system. Use the
|
|
* "debug:asset-map" command to see the full list of paths.
|
|
*
|
|
* - "entrypoint" (JavaScript only) set to true for any module that will
|
|
* be used as an "entrypoint" (and passed to the importmap() Twig function).
|
|
*
|
|
* The "importmap:require" command can be used to add new entries to this file.
|
|
*
|
|
* @return array<string, array{ // Import name as key, description of the imported file as value
|
|
* path: string, // Logical, relative or absolute path to the file
|
|
* type?: 'js'|'css'|'json', // Type of the file, defaults to 'js'
|
|
* entrypoint?: bool, // Whether the file is an entrypoint, for 'js' only
|
|
* }|array{
|
|
* version: string, // Version of the remote package
|
|
* package_specifier?: string, // Remote "package-name/path" specifier, defaults to the import name
|
|
* type?: 'js'|'css'|'json',
|
|
* entrypoint?: bool,
|
|
* }>
|
|
*/
|
|
return [
|
|
'quiz' => ['path' => './assets/quiz.ts', 'entrypoint' => true],
|
|
'backoffice' => ['path' => './assets/backoffice.ts', 'entrypoint' => true],
|
|
'@symfony/stimulus-bundle' => ['path' => './vendor/symfony/stimulus-bundle/assets/dist/loader.js'],
|
|
'bootstrap' => ['version' => '5.3.8'],
|
|
'@popperjs/core' => ['version' => '2.11.8'],
|
|
'bootstrap/dist/css/bootstrap.min.css' => ['version' => '5.3.8', 'type' => 'css'],
|
|
'@hotwired/stimulus' => ['version' => '3.2.2'],
|
|
'@hotwired/turbo' => ['version' => '8.0.23'],
|
|
'bootstrap-icons/font/bootstrap-icons.min.css' => ['version' => '1.13.1', 'type' => 'css'],
|
|
'@sentry/browser' => ['version' => '10.63.0'],
|
|
'@sentry/feedback' => ['version' => '10.63.0'],
|
|
'@sentry/core/browser' => ['version' => '10.63.0'],
|
|
'@sentry/browser-utils' => ['version' => '10.63.0'],
|
|
'@sentry/replay' => ['version' => '10.63.0'],
|
|
'@sentry/replay-canvas' => ['version' => '10.63.0'],
|
|
'@sentry/core' => ['version' => '10.63.0'],
|
|
];
|