Skip to content

πŸ› Internal error/panic in 2.4.11Β #9918

@jakeleventhal

Description

@jakeleventhal

Environment information

Details
β–Ά bun biome rage                                                                                                                                                                  
CLI:
  Version:                      2.4.11
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v24.12.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.3.12

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true
  HTML full support enabled:    unset

Workspace:
  Open Documents:               0

What happened?

biome check . --write --unsafe --error-on-warnings
import { globSync, readFileSync } from "node:fs";
import path from "node:path";
import { describe, expect, test } from "vitest";

describe("Docker", () => {
	describe("dockerfilesMatchNodeVersion", () => {
		const packageDir = process.env["PWD"];
		expect(packageDir).not.toBeUndefined();

		const workspaceDir = path.dirname(path.dirname(packageDir as string));
		const nvmRc = path.join(workspaceDir, ".nvmrc");
		const nodeVersion = readFileSync(nvmRc).toString().trim();

		const versionRegex = /\d+.\d+.\d+/;
		expect(nodeVersion).toMatch(versionRegex);

		const dockerfiles = globSync("src/dockerfiles/*.dockerfile", {
			cwd: packageDir,
			exclude: ["node_modules"],
		}).sort();

		expect(dockerfiles.length).toBeGreaterThan(0);
		test.for(
			dockerfiles,
		)(`'%s' is using Node version ${nodeVersion}`, (dockerfile) => {
			const content = readFileSync(dockerfile).toString();
			const match = /FROM node:([\d\w.]+)/.exec(content);
			if (!match?.[1]) {
				throw new Error("Node version match not found");
			}

			expect(match[1]).toMatch(nodeVersion);
		});
	});
});

Expected result

tools/docker/src/index.test.ts internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  βœ– processing panicked: expected a token in the slot 0 but found node JS_REFERENCE_IDENTIFIER@737..742
  
  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-Needs reproStatus: needs a reproduction

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions