8000 bump storybook, react, three, yarn, etc by jtbandes · Pull Request #427 · foxglove/three-text · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ jobs:

- run: yarn install --immutable

- run: yarn run build
- run: yarn run typecheck
- run: yarn run lint:ci
- run: yarn run build
- run: yarn run test

- run: yarn pack
Expand Down
6 changes: 4 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import foxglove from "@foxglove/eslint-plugin";
import { defineConfig } from "eslint/config";
import storybook from "eslint-plugin-storybook";
import globals from "globals";
import tseslint from "typescript-eslint";

export default defineConfig(
// avoid a type error when using eslint's builtin defineConfig()
// eslint-disable-next-line @typescript-eslint/no-deprecated
export default tseslint.config(
{
ignores: ["**/dist", "!.storybook"],
},
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@
],
"scripts": {
"clean": "rimraf dist *.tsbuildinfo",
"prepack": "tsc -b tsconfig.json tsconfig.cjs.json",
"build": "tsc -b tsconfig.json tsconfig.cjs.json",
"prepack": "tsc -b tsconfig.build.json tsconfig.cjs.json",
"build": "tsc -b tsconfig.build.json tsconfig.cjs.json",
"lint": "eslint --fix .",
"lint:ci": "eslint .",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"typecheck": "tsc -b --noEmit tsconfig.json",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
Expand All @@ -38,26 +39,26 @@
"@foxglove/eslint-plugin": "2.1.0",
"@foxglove/tsconfig": "2.0.0",
"@storybook/addon-webpack5-compiler-swc": "4.0.1",
"@storybook/react-webpack5": "9.1.10",
"@storybook/react-webpack5": "10.0.4",
"@types/jest": "30.0.0",
"@types/node": "22.7.5",
"@types/react": "18.3.3",
"@types/three": "0.174.0",
"chromatic": "11.27.0",
"eslint": "9.36.0",
"eslint-plugin-storybook": "9.1.10",
"@types/react": "19.2.2",
"@types/three": "0.181.0",
"chromatic": "13.3.3",
"eslint": "9.39.1",
"eslint-plugin-storybook": "10.0.4",
"globals": "16.4.0",
"jest": "30.2.0",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "30.2.0",
"prettier": "3.3.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.2.0",
"react-dom": "19.2.0",
"rimraf": "6.0.1",
"storybook": "9.1.10",
"three": "0.174.0",
"storybook": "10.0.4",
"three": "0.181.0",
"ts-jest": "29.4.5",
"typescript": "5.9.3"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.10.3"
}
2 changes: 1 addition & 1 deletion src/LabelPool.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Meta, StoryObj } from "@storybook/react-webpack5";
import { useEffect, useRef, useState, type ReactElement } from "react";
import * as THREE from "three";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";

import { Label, LabelPool } from "./LabelPool";

Expand Down
5 changes: 4 additions & 1 deletion src/LabelPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const tempVec2 = new THREE.Vector2();
export class LabelMaterial extends THREE.ShaderMaterial {
picking: boolean;

constructor(params: { atlasTexture?: THREE.Texture; picking?: boolean }) {
constructor(params: {
atlasTexture?: THREE.Texture<THREE.DataTextureImageData>;
picking?: boolean;
}) {
super({
glslVersion: THREE.GLSL3,
vertexShader: /* glsl */ `\
Expand Down
10 changes: 10 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// -*- jsonc -*-
// tsconfig for building for distribution, excluding stories and tests
{
"extends": "./tsconfig.json",
"exclude": ["**/*.stories.tsx", "**/*.test.ts"],
"compilerOptions": {
"noEmit": false,
"outDir": "./dist/esm"
}
}
5 changes: 3 additions & 2 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./tsconfig.json",
"extends": "./tsconfig.build.json",
"compilerOptions": {
"outDir": "./dist/cjs",
"module": "commonjs"
"module": "commonjs",
"moduleResolution": "node10"
Copy link

Choose a reason for hiding this comment

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

microsoft/TypeScript#62200 (comment)

changing to esnext and bundler is an option? It seems that it will be deprecated soon, maybe we can already update it

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a separate tsconfig for building as cjs (we build and distribute both cjs + esm for most of our published packages), so we cannot switch to module: esnext. Maybe we could use bundler, not sure if the moduleResolution matters as much, I just kept this to avoid changing too much. I guess we can revisit when TS 6.0 is out?

}
}
1 change: 1 addition & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"allowJs": true,
"checkJs": true,
"noEmit": true,
"moduleResolution": "bundler",
"lib": ["DOM", "es2020"],
"jsx": "react-jsx"
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"include": ["./src/**/*"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist/esm",
"noEmit": true,
"moduleResolution": "bundler",

// DOM and JSX settings should only apply to *.stories.*, but VS Code doesn't allow using a
// different tsconfig for different files in the project.
Expand Down
Loading
38E0
0