chore: Clean up package.json (#1943)

This commit is contained in:
Ib Green 2024-02-17 20:30:49 -05:00 committed by GitHub
parent 9089c41bed
commit 4ac458bdeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 15755 additions and 10982 deletions

View File

@ -16,21 +16,24 @@ jobs:
steps:
- uses: actions/checkout@v4.1.1
- uses: volta-cli/action@v4
- name: Use Node.js
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mesa-utils xvfb libgl1-mesa-dri libglapi-mesa libosmesa6
yarn bootstrap
yarn install
- name: Build code
run: |
yarn bootstrap
- name: Run tests
run: |
xvfb-run -s "-ac -screen 0 1280x1024x16" yarn test ci
yarn test ci
- name: Coveralls
uses: coverallsapp/github-action@master

12
.yarnrc.yml Normal file
View File

@ -0,0 +1,12 @@
nodeLinker: node-modules
supportedArchitectures:
cpu:
- arm64
- x64
- darwin-x64
os:
- current
- darwin
- linux
- win32

View File

@ -24,6 +24,6 @@
"require": "./dist/index.cjs"
},
"dependencies": {
"@luma.gl/constants": "9.0.0-alpha.47"
"@luma.gl/constants": "9.0.0-beta.4"
}
}

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",

View File

@ -11,6 +11,7 @@
"@luma.gl/constants": "9.0.0-beta.4",
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@math.gl/core": "^4.0.0"
},

View File

@ -8,7 +8,9 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@math.gl/core": "^4.0.0"
},

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",

View File

@ -8,7 +8,9 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",
"@math.gl/core": "^4.0.0"
},

View File

@ -10,6 +10,7 @@
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@math.gl/core": "^4.0.0"
},

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",

View File

@ -9,7 +9,9 @@
},
"dependencies": {
"@loaders.gl/gltf": "^4.0.4",
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4"
},

View File

@ -8,7 +8,9 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4"
},
"devDependencies": {

View File

@ -8,7 +8,9 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4"
},

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",

View File

@ -10,6 +10,7 @@
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4"
},
"devDependencies": {

View File

@ -8,7 +8,9 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4"
},
"devDependencies": {

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",

View File

@ -8,6 +8,7 @@
"serve": "vite preview"
},
"dependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",

View File

@ -37,9 +37,12 @@
},
"devDependencies": {
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/test-utils": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4"
"@luma.gl/webgpu": "9.0.0-beta.4",
"@probe.gl/test-utils": "^4.0.0"
},
"gitHead": "c636c34b8f1581eed163e94543a8eb1f4382ba8e"
}

View File

@ -42,6 +42,7 @@
"peerDependencies": {
"@luma.gl/core": "^9.0.0-beta.4",
"@luma.gl/engine": "^9.0.0-beta.4",
"@luma.gl/shadertools": "^9.0.0-beta.4",
"@luma.gl/webgl": "^9.0.0-beta.4"
},
"dependencies": {
@ -50,7 +51,8 @@
"devDependencies": {
"@loaders.gl/gltf": "^4.0.4",
"@loaders.gl/math": "^4.0.4",
"@luma.gl/test-utils": "9.0.0-beta.4"
"@luma.gl/test-utils": "9.0.0-beta.4",
"@probe.gl/test-utils": "^4.0.0"
},
"gitHead": "c636c34b8f1581eed163e94543a8eb1f4382ba8e"
}

View File

@ -35,7 +35,7 @@ export function fp64ifyMatrix4(matrix: NumberArray): Float32Array {
for (let i = 0; i < 4; ++i) {
for (let j = 0; j < 4; ++j) {
const index = i * 4 + j;
fp64ify(matrix[j * 4 + i]!, matrixFP64, index * 2);
fp64ify(matrix[j * 4 + i], matrixFP64, index * 2);
}
}
return matrixFP64;

View File

@ -602,7 +602,8 @@ test.skip('assembleShaders#transpilation', (t) => {
function compileAndLinkShaders(t, device: WebGLDevice, assembleResult) {
const gl = device.gl;
const vShader = gl.createShader(gl.VERTEX_SHADER)!;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const vShader: WebGLShader = gl.createShader(gl.VERTEX_SHADER) as WebGLShader;
gl.shaderSource(vShader, assembleResult.vs);
gl.compileShader(vShader);
let compileStatus = gl.getShaderParameter(vShader, gl.COMPILE_STATUS);

View File

@ -2,12 +2,15 @@
// Copyright (c) vis.gl contributors
import test from 'tape-promise/tape';
import type {UniformValue} from '@luma.gl/core';
import {gouraudMaterial} from '@luma.gl/shadertools';
test('shadertools#gouraudMaterial', (t) => {
let uniforms = gouraudMaterial.getUniforms?.({});
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
let uniforms: Record<string, UniformValue> = gouraudMaterial.getUniforms?.({})!;
t.deepEqual(uniforms, gouraudMaterial.defaultUniforms, 'Default phong lighting uniforms ok');
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
uniforms = gouraudMaterial.getUniforms?.({ambient: 0.0, diffuse: 0.0, shininess: 0.0, specularColor: [255, 0, 0]})!;
// t.equal(
// uniforms.enabled,
@ -25,6 +28,7 @@ test('shadertools#gouraudMaterial', (t) => {
// t.equal(uniforms.enabled, false, 'Disable lighting without material');
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
uniforms = gouraudMaterial.getUniforms?.({})!;
t.equal(uniforms.ambient, 0.35, 'ambient');
t.equal(uniforms.diffuse, 0.6, 'diffuse');

View File

@ -7,7 +7,7 @@ const shaderModules = {};
// HACK - sniff out modules from * imports
for (const [name, value] of Object.entries(imports)) {
// @ts-expect-error
// @ts-ignore
if (value?.fs || value?.vs) {
shaderModules[name] = value;
}

View File

@ -36,6 +36,13 @@
"pre-build": "echo test utils has no bundle"
},
"peerDependencies": {
"@luma.gl/core": "^9.0.0-beta.4",
"@luma.gl/engine": "^9.0.0-beta.4",
"@luma.gl/shadertools": "^9.0.0-beta.4",
"@luma.gl/webgl": "^9.0.0-beta.4",
"@luma.gl/webgpu": "^9.0.0-beta.4"
},
"devDependencies": {
"@luma.gl/core": "^9.0.0-beta.4",
"@luma.gl/engine": "^9.0.0-beta.4",
"@luma.gl/webgl": "^9.0.0-beta.4",

View File

@ -47,5 +47,8 @@
"@luma.gl/core": "9.0.0-beta.4",
"@probe.gl/env": "^4.0.2"
},
"devDependencies": {
"@probe.gl/test-utils": "^4.0.0"
},
"gitHead": "c636c34b8f1581eed163e94543a8eb1f4382ba8e"
}

View File

@ -4,6 +4,8 @@
import test from 'tape-promise/tape';
import {createTestDevice} from '@luma.gl/test-utils';
import type {WebGLDevice} from '@luma.gl/webgl';
import {
trackContextState,
pushContextState,
@ -24,7 +26,8 @@ import {stringifyTypedArray} from './context-state.spec';
import {ENUM_STYLE_SETTINGS_SET1, ENUM_STYLE_SETTINGS_SET2} from './data/sample-enum-settings';
// Settings test, don't reuse a context
const device = createTestDevice({debug: true})!;
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
const device = createTestDevice({debug: true}) as WebGLDevice;
test('WebGLState#imports', (t) => {
t.ok(typeof trackContextState === 'function', 'trackContextState imported OK');

View File

@ -15,6 +15,7 @@ export class WebGPUCanvasContext extends CanvasContext {
readonly device: WebGPUDevice;
readonly gpuCanvasContext: GPUCanvasContext;
/** Format of returned textures: "bgra8unorm", "rgba8unorm", "rgba16float". */
// @ts-ignore - TODO - fix this
readonly format: TextureFormat = navigator.gpu.getPreferredCanvasFormat();
/** Default stencil format for depth textures */
depthStencilFormat: TextureFormat = 'depth24plus';

View File

@ -23,7 +23,8 @@
},
"scripts": {
"bootstrap": "yarn && ocular-bootstrap",
"start": "echo 'Please see luma.gl website for how to run examples' && open https://luma.gl/docs/getting-started",
"postinstall": "echo postinstall",
"start": "open https://luma.gl/docs/getting-started",
"clean": "ocular-clean",
"build": "ocular-build",
"cover": "ocular-test cover",
@ -36,23 +37,28 @@
"perf": "ocular-test perf-browser",
"bench": "ocular-test bench",
"bench-browser": "ocular-test bench-browser",
"metrics": "./scripts/metrics.sh && ocular-metrics",
"postinstall": "./scripts/postinstall.sh"
"metrics": "./scripts/metrics.sh && ocular-metrics"
},
"devDependencies": {
"@loaders.gl/core": "4.0.0-beta.7",
"@loaders.gl/gltf": "4.0.0-beta.7",
"@loaders.gl/polyfills": "4.0.0-beta.7",
"@probe.gl/bench": "^4.0.2",
"@probe.gl/stats": "^4.0.2",
"@probe.gl/stats-widget": "^4.0.2",
"@probe.gl/test-utils": "^4.0.2",
"@types/tape-promise": "^4.0.1",
"@types/tape-promise": "^4.0.1 ",
"eslint-plugin-tree-shaking": "^1.9.2",
"math.gl": "^3.0.0",
"nyc": "^15.1.0",
"ocular-dev-tools": "2.0.0-alpha.23",
"pre-commit": "^1.2.2",
"pre-push": "^0.1.1"
"pre-push": "^0.1.1",
"puppeteer": "^22.0.0"
},
"resolutions": {
"typescript": "^5.3.0"
"typescript": "^5.3.0",
"tsconfig-paths": "^3.9.0"
},
"pre-commit": [
"test-fast"
@ -61,7 +67,7 @@
"@types/offscreencanvas": "^2019.6.4"
},
"volta": {
"node": "18.18.2",
"yarn": "1.22.19"
"node": "18.19.1",
"yarn": "4.1.0"
}
}

View File

@ -1 +1,5 @@
#/bin/sh
# TODO
exit 0;

View File

@ -4,6 +4,21 @@
"compilerOptions": {
// Uncomment to debug
// "listEmittedFiles": true
"plugins": [
{
"transform": "ocular-dev-tools/ts-transform-version-inline"
},
{
"transform": "ocular-dev-tools/ts-transform-append-extension",
"extensions": [".js"],
"after": true
},
{
"transform": "ocular-dev-tools/ts-transform-append-extension",
"extensions": [".js"],
"afterDeclarations": true
}
]
},
"references": [
{"path": "modules/constants"},

View File

@ -9,7 +9,7 @@
"noEmit": false,
// "emitDeclarationOnly": true,
// Uncomment to debug
// "listEmittedFiles": true
// "listEmittedFiles": true,
},
"include": [
"modules/*/src"

View File

@ -20,12 +20,12 @@
"@algolia/autocomplete-js": "^1.8.3",
"@docusaurus/core": "^3.1.0",
"@docusaurus/preset-classic": "^3.1.0",
"@luma.gl/constants": "9.0.0-alpha.42",
"@luma.gl/core": "9.0.0-alpha.42",
"@luma.gl/engine": "9.0.0-alpha.42",
"@luma.gl/shadertools": "9.0.0-alpha.42",
"@luma.gl/webgl": "9.0.0-alpha.42",
"@luma.gl/webgpu": "9.0.0-alpha.42",
"@luma.gl/constants": "9.0.0-beta.4",
"@luma.gl/core": "9.0.0-beta.4",
"@luma.gl/engine": "9.0.0-beta.4",
"@luma.gl/shadertools": "9.0.0-beta.4",
"@luma.gl/webgl": "9.0.0-beta.4",
"@luma.gl/webgpu": "9.0.0-beta.4",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.1.1",
"docusaurus-mdx-checker": "^3.0.0",

26595
yarn.lock

File diff suppressed because it is too large Load Diff