Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
52cd421
Pontoon/Firefox Profiler: Update Russian (ru)
mozilla-pontoon Apr 28, 2026
5170778
Pontoon/Firefox Profiler: Update English (Great Britain) (en-GB)
mozilla-pontoon Apr 28, 2026
a3970c8
🔃 Daily sync: main -> l10n (April 29, 2026)
Apr 29, 2026
8077a30
Update all Yarn dependencies (2026-04-29) (#5983)
depfu[bot] Apr 29, 2026
7146889
Pontoon/Firefox Profiler: Update Frisian (fy-NL), Dutch (nl)
mozilla-pontoon Apr 29, 2026
703aeb9
Pontoon/Firefox Profiler: Update Interlingua (ia)
mozilla-pontoon Apr 29, 2026
b41ccf9
Replace SplitterLayout with a new ResizableWithSplitter component.
mstange May 4, 2023
c9a1cc3
Add a test for ResizableWithSplitter.
mstange Apr 29, 2026
b868d0e
Remove timeline height computation.
mstange Apr 10, 2026
6648c47
Use custom splitter component (#4606)
mstange Apr 29, 2026
af3153d
Pontoon/Firefox Profiler: Update Swedish (sv-SE)
mozilla-pontoon Apr 29, 2026
6dfb25f
Pontoon/Firefox Profiler: Update Spanish (Chile) (es-CL)
mozilla-pontoon Apr 30, 2026
2bde634
🔃 Daily sync: main -> l10n (April 30, 2026)
Apr 30, 2026
9cc0d28
Fix Download button text color when clicked (#5985)
fatadel Apr 30, 2026
a2a5329
🔃 Daily sync: main -> l10n (May 1, 2026)
May 1, 2026
4ba97bc
Pontoon/Firefox Profiler: Update English (Canada) (en-CA)
mozilla-pontoon May 1, 2026
bdacb9c
⬆️ Update copy-to-clipboard to version 4.0.2 (#5994)
depfu[bot] May 4, 2026
dfda383
Fix fullscreen icon size in bottom box (#5987)
rabbitglauser May 4, 2026
79ab826
🔃 Daily sync: main -> l10n (May 4, 2026)
May 4, 2026
e039a6d
Add utilities for summarizing CPU usage timelines in a textual form.
mstange Jul 26, 2025
04b8d93
Add commander as a dependency
canova Jul 26, 2025
6792031
Update filter-samples transform to include more filtering options
canova Apr 11, 2026
ef57c36
Extract POP_TRANSFORMS_FROM_STACK to an action creator
canova Apr 21, 2026
fb1039d
Fix extractGeckoLogs and extract log marker logic related functions t…
canova Jul 26, 2025
847db9a
Create a profile-query library and a profile-query-cli script
mstange Jul 26, 2025
1f391c7
Add tests for profile-query library and profiler-cli
mstange Jul 26, 2025
dfd364d
Improve the "function annotate" command
canova Apr 27, 2026
6b58ea6
Add `profiler-cli` for querying profiles (#5963)
canova May 4, 2026
a9be11d
Remove the publishing document from CONTRIBUTING.md
canova May 4, 2026
ffeadea
Bump the cli version to 0.1.0
canova May 4, 2026
c08634a
Bump profiler cli version to 0.1.0 (#5996)
canova May 4, 2026
61e5d10
Switch from max-height to maxHeight in JSX style={{...}}.
mstange Apr 29, 2026
d529e83
🔃 Daily sync: main -> l10n (May 5, 2026)
May 5, 2026
cab6f4a
Switch from max-height to maxHeight in JSX style={{...}}. (#5990)
mstange May 5, 2026
138207f
Fix comment about how time and duration are stored (#5997)
carverdamien May 5, 2026
f1241a8
🔃 Daily sync: main -> l10n (May 6, 2026)
May 6, 2026
efb21b9
Update all Yarn dependencies (2026-05-06) (#5999)
depfu[bot] May 6, 2026
8f49358
Do not show console error when libnames are failed to parse as a URL …
canova May 6, 2026
bad2864
🔃 Daily sync: main -> l10n (May 7, 2026)
May 7, 2026
ede6655
Avoid stringifying the whole typed array contents during parsing.
canova May 7, 2026
5783a76
Extract zip file entries as ArrayBuffer instead of Uint8Array
canova May 7, 2026
f2d5354
Fix the unnecessary stringify of Uint8Array contents during zip profi…
canova May 7, 2026
1a73a20
Merge branch 'main' into l10n
canova May 7, 2026
350412e
🔃 Sync: l10n -> main (May 7, 2026) (#6005)
canova May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ jobs:
with:
fail_ci_if_error: false

cli-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run CLI tests
run: yarn test-cli

build-prod:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ webpack.local-config.js
*.orig
*.rej
.idea/
.profiler-cli-dev/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/profile-logic/import/proto
src/types/libdef/npm
profiler-cli/dist
docs-user/js
docs-user/css
src/test/fixtures/upgrades
Expand Down
1 change: 1 addition & 0 deletions bin/output-fixing-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const fixingCommands = {
'lint-css': 'lint-fix-css',
'prettier-run': 'prettier-fix',
test: 'test -u',
'test-cli': 'test-cli -u',
};

const command = process.argv.slice(2);
Expand Down
58 changes: 58 additions & 0 deletions docs-developer/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,61 @@ To deploy on nginx (without support for direct upload from the Firefox UI), run
and point nginx at the `dist` directory, which needs to be at the root of the webserver. Additionally,
a `error_page 404 =200 /index.html;` directive needs to be added so that unknown URLs respond with index.html.
For a more production-ready configuration, have a look at the netlify [`_headers`](/res/_headers) file.

# Publishing profiler-cli to npm

The [`@firefox-devtools/profiler-cli`](https://www.npmjs.com/package/@firefox-devtools/profiler-cli)
package is published to npm from this repository. It provides a command-line
interface for querying Firefox Profiler profiles — see
[`profiler-cli/README.md`](../profiler-cli/README.md) for usage.

## Prerequisites

- Be logged in to npm (`npm login`) with publish access to the `@firefox-devtools` scope.
- Make sure the working tree is clean and you are on the commit you want to publish.
- Run `yarn test-all` (or at least `yarn test-cli`) to confirm the CLI still builds and passes tests.

## Bump the version

Edit the `version` field in [`profiler-cli/package.json`](../profiler-cli/package.json),
then land the version bump on `main` before publishing.

## Publish

From the repository root:

```
yarn publish-profiler-cli
```

[`scripts/publish-profiler-cli.mjs`](../scripts/publish-profiler-cli.mjs) will:

1. Run `yarn build-profiler-cli` to produce `profiler-cli/dist/profiler-cli.js` (a
single self-contained bundle with no runtime dependencies).
2. Run `npm publish profiler-cli/`, picking `--tag next` when the version
contains `-` (e.g. `0.1.0-next.1`) and `--tag latest` otherwise.
3. Trigger the `prepublishOnly` hook in `profiler-cli/package.json`, which runs
[`scripts/verify-profiler-cli-build.mjs`](../scripts/verify-profiler-cli-build.mjs)
to confirm the bundle exists and embeds the current `package.json` version —
this guards against publishing a stale build.

Extra arguments are forwarded to `npm publish`. For example:

```
# Build and verify, but do not actually publish.
yarn publish-profiler-cli --dry-run

# Override the automatic dist-tag.
yarn publish-profiler-cli --tag alpha
```

## Verify the release

After publishing, confirm the new version is listed on
[npm](https://www.npmjs.com/package/@firefox-devtools/profiler-cli) and installs
cleanly:

```
npm install -g @firefox-devtools/profiler-cli@latest
profiler-cli --version
```
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig(
ignores: [
'src/profile-logic/import/proto/**',
'src/types/libdef/npm/**',
'profiler-cli/dist/**',
'res/**',
'dist/**',
'node-tools-dist/**',
Expand Down Expand Up @@ -253,7 +254,7 @@ export default defineConfig(

// Test files override
{
files: ['src/test/**/*'],
files: ['src/test/**/*', 'profiler-cli/src/test/**/*'],
languageOptions: {
globals: {
...globals.jest,
Expand Down
77 changes: 63 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

module.exports = {
testMatch: ['<rootDir>/src/**/*.test.{js,jsx,ts,tsx}'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],

// Use custom resolver that respects the "browser" field in package.json
resolver: './jest-resolver.js',

// Shared config for projects that need a browser-like (jsdom) environment.
// CLI unit tests use the same environment because they import browser-side
// fixtures to construct profile data.
const browserEnvConfig = {
testEnvironment: './src/test/custom-environment',
setupFilesAfterEnv: ['jest-extended/all', './src/test/setup.ts'],

collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!src/types/libdef/**',
],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
resolver: './jest-resolver.js',

transform: {
'\\.([jt]sx?|mjs)$': 'babel-jest',
Expand All @@ -43,5 +36,61 @@ module.exports = {
escapeString: true,
printBasicPrototype: true,
},
verbose: false,
};

const allProjects = [
// ========================================================================
// Browser Tests (React/browser environment)
// ========================================================================
{
...browserEnvConfig,
displayName: 'browser',
testMatch: ['<rootDir>/src/**/*.test.{js,jsx,ts,tsx}'],

collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!src/types/libdef/**',
],
},

// ========================================================================
// CLI Unit Tests (browser/jsdom environment - imports browser-side fixtures)
// ========================================================================
{
...browserEnvConfig,
displayName: 'cli',
testMatch: ['<rootDir>/profiler-cli/src/test/unit/**/*.test.ts'],
},

// ========================================================================
// CLI Integration Tests (Node.js environment - spawns real processes)
// ========================================================================
{
displayName: 'cli-integration',
testMatch: ['<rootDir>/profiler-cli/src/test/integration/**/*.test.ts'],

testEnvironment: 'node',

setupFilesAfterEnv: ['./profiler-cli/src/test/integration/setup.ts'],

// Integration tests can be slow (loading profiles, spawning processes)
testTimeout: 30000,

moduleFileExtensions: ['ts', 'js'],

transform: {
'\\.([jt]sx?|mjs)$': 'babel-jest',
},
},
];

// Filter projects by JEST_PROJECTS env var (comma-separated displayNames).
// Preferred over --selectProjects because that CLI flag is variadic and
// swallows positional args like `yarn test process-profile.ts`.
const filter = process.env.JEST_PROJECTS;
module.exports = {
projects: filter
? allProjects.filter((p) => filter.split(',').includes(p.displayName))
: allProjects,
};
8 changes: 8 additions & 0 deletions locales/en-CA/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Deallocation Site
.title = Summarize using bytes of memory deallocated, by the site where the memory was deallocated
StackSettings--invert-call-stack = Invert call stack
.title = Sort by the time spent in a call node, ignoring its children.
StackSettings--include-idle-samples = Include idle samples
.title = Uncheck to hide samples whose leaf frame is in the Idle category.
StackSettings--show-user-timing = Show user timing
StackSettings--use-stack-chart-same-widths = Use the same width for each stack
StackSettings--panel-search =
Expand Down Expand Up @@ -1149,6 +1151,12 @@ BottomBox--assembly-code-not-available-title = Assembly code not available
# Elements:
# <a>link text</a> - A link to the github issue about supported scenarios.
BottomBox--assembly-code-not-available-text = See <a>issue #4520</a> for supported scenarios and planned improvements.
# The toggle button for making the bottom box fullscreen.
BottomBox--hide-fullscreen =
.title = Exit fullscreen
# The toggle button for making the bottom box fullscreen.
BottomBox--show-fullscreen =
.title = Fullscreen
SourceView--close-button =
.title = Close the source view

Expand Down
2 changes: 2 additions & 0 deletions locales/en-GB/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Deallocation Site
.title = Summarise using bytes of memory deallocated, by the site where the memory was deallocated
StackSettings--invert-call-stack = Invert call stack
.title = Sort by the time spent in a call node, ignoring its children.
StackSettings--include-idle-samples = Include idle samples
.title = Untick to hide samples whose leaf frame is in the Idle category.
StackSettings--show-user-timing = Show user timing
StackSettings--use-stack-chart-same-widths = Use the same width for each stack
StackSettings--panel-search =
Expand Down
2 changes: 2 additions & 0 deletions locales/es-CL/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Sitios de desasig
.title = Resume usando bytes de memoria desasignada, por el sitio donde la memoria fue desasignada
StackSettings--invert-call-stack = Invertir llamada de pila
.title = Ordenar por el tiempo ocupado en un nodo de llamada, ignorando sus hijos.
StackSettings--include-idle-samples = Incluir muestras inactivas
.title = Desmarca esta casilla para ocultar las muestras cuyo marco de hoja se encuentre en la categoría de inactiva.
StackSettings--show-user-timing = Mostrar usando tiempos
StackSettings--use-stack-chart-same-widths = Utilizar el mismo ancho para cada pila
StackSettings--panel-search =
Expand Down
8 changes: 8 additions & 0 deletions locales/fy-NL/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = De-allokaasje fan
.title = Gearfetting oan de hân fan de de-allokearre bytes ûnthâldromte, per website wêrfan de ûnthâldromte de-allokearre wie.
StackSettings--invert-call-stack = Oanropstack omkeare
.title = Sortearje op de tiid dy’t yn in oanropnode bestege wurdt, wêrby ûnderlizzende nodes negearre wurde
StackSettings--include-idle-samples = Ynaktive samples opnimme
.title = Helje it finkje fuort om samples te ferstopjen wêrfan it leaf-frame yn de kategory Ynaktyf stiet.
StackSettings--show-user-timing = Brûkerstiming toane
StackSettings--use-stack-chart-same-widths = Foar elke stack deselde breedte brûke
StackSettings--panel-search =
Expand Down Expand Up @@ -1149,6 +1151,12 @@ BottomBox--assembly-code-not-available-title = Gearstallingskoade net beskikber
# Elements:
# <a>link text</a> - A link to the github issue about supported scenarios.
BottomBox--assembly-code-not-available-text = Sjoch <a>issue #4520</a> foar stipjende senario's en plande ferbetteringen.
# The toggle button for making the bottom box fullscreen.
BottomBox--hide-fullscreen =
.title = Folslein skerm ferlitte
# The toggle button for making the bottom box fullscreen.
BottomBox--show-fullscreen =
.title = Folslein skerm
SourceView--close-button =
.title = Boarnewerjefte slute

Expand Down
2 changes: 2 additions & 0 deletions locales/ia/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Sitos de de-alloc
.title = Summarisa per le bytes de memoria de-allocate, per le sito ubi le memoria ha essite de-allocate
StackSettings--invert-call-stack = Inverter le pila de appello
.title = Ordina per le tempore passate in un nodo de appello, ignorante su filios.
StackSettings--include-idle-samples = Includer specimens inactive
.title = Dismarca iste option pro celar specimens cuje quadro de folio es in le categoria Inactive.
StackSettings--show-user-timing = Monstrar temporisation de usator
StackSettings--use-stack-chart-same-widths = Usar le mesme largessa pro cata pila
StackSettings--panel-search =
Expand Down
2 changes: 2 additions & 0 deletions locales/nl/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Deallocatie van w
.title = Samenvatting aan de hand van de gedealloceerde bytes geheugenruimte, per website waarvan de geheugenruimte was gedealloceerd.
StackSettings--invert-call-stack = Aanroepstack omkeren
.title = Sorteren op de tijd die in een aanroepnode wordt besteed, waarbij onderliggende nodes worden genegeerd
StackSettings--include-idle-samples = Inactieve samples opnemen
.title = Haal het vinkje weg om samples te verbergen waarvan het leaf-frame zich in de categorie Inactief bevindt.
StackSettings--show-user-timing = Gebruikerstiming tonen
StackSettings--use-stack-chart-same-widths = Voor elke stack dezelfde breedte gebruiken
StackSettings--panel-search =
Expand Down
2 changes: 2 additions & 0 deletions locales/ru/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Сайты осв
.title = Суммировать, используя байты освобожденной памяти, по сайту, где была освобождена память
StackSettings--invert-call-stack = Инвертировать стек вызовов
.title = Сортировать по времени, потраченному на вызов узла, игнорируя его дочерние элементы.
StackSettings--include-idle-samples = Включить замеры неактивности
.title = Снимите флажок, чтобы скрыть семплы, конечный фрейм которых находится в категории неактивных.
StackSettings--show-user-timing = Показать время пользователя
StackSettings--use-stack-chart-same-widths = Использовать одинаковую ширину для всех стеков
StackSettings--panel-search =
Expand Down
2 changes: 2 additions & 0 deletions locales/sv-SE/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,8 @@ StackSettings--call-tree-strategy-native-deallocations-sites = Tilldelningswebbp
.title = Sammanfatta med hjälp av byte av minne som delas ut efter webbplatsen där minnet tilldelades
StackSettings--invert-call-stack = Invertera anropsstack
.title = Sortera efter tiden i en anropsnod, utan att ignorera dess barn.
StackSettings--include-idle-samples = Inkludera inaktiva prover
.title = Avmarkera för att dölja exempel vars lövram är i kategorin inaktiv.
StackSettings--show-user-timing = Visa användartiming
StackSettings--use-stack-chart-same-widths = Använd samma bredd för varje stack
StackSettings--panel-search =
Expand Down
Loading
Loading