mirror of
https://github.com/openglobus/openglobus.git
synced 2025-12-08 19:25:27 +00:00
replace jest to vitest and cleanup dev deps
add styles import update dependencies
This commit is contained in:
parent
374d6237b1
commit
f989fccb60
7073
package-lock.json
generated
7073
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
134
package.json
134
package.json
@ -1,87 +1,73 @@
|
||||
{
|
||||
"name" : "@openglobus/og",
|
||||
"version" : "0.25.5",
|
||||
"description" : "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",
|
||||
"main" : "lib/og.es.js",
|
||||
"types" : "lib/index.d.ts",
|
||||
"exports" : {
|
||||
"." : {
|
||||
"import" : "./lib/og.es.js",
|
||||
"types" : "./lib/index.d.ts"
|
||||
"name": "@openglobus/og",
|
||||
"version": "0.25.5",
|
||||
"description": "[openglobus](https://www.openglobus.org/) is a javascript/typescript library designed to display interactive 3d maps and planets with map tiles, imagery and vector data, markers, and 3D objects. It uses the WebGL technology, open source, and completely free.",
|
||||
"main": "lib/og.es.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./lib/og.es.js",
|
||||
"types": "./lib/index.d.ts"
|
||||
},
|
||||
"./styles": {
|
||||
"import": "./lib/og.css"
|
||||
}
|
||||
},
|
||||
"publishConfig" : {
|
||||
"access" : "public"
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files" : [
|
||||
"files": [
|
||||
"lib/"
|
||||
],
|
||||
"scripts" : {
|
||||
"docs" : "jsdoc -r ./src/ -c ./jsdoc.conf.json -d ./docs",
|
||||
"serve_docs" : "cd docs; ws -p 8088",
|
||||
"serve" : "ws -p 3000",
|
||||
"build" : "vite build --mode production && npm run dts",
|
||||
"clean" : "rm -rf ./lib ./docs",
|
||||
"dev" : "vite build --watch --mode development",
|
||||
"test" : "jest --env=jsdom --runInBand --ci --coverage=false",
|
||||
"lint" : "eslint src/",
|
||||
"dts" : "tsc --build tsconfig.json",
|
||||
"dev_serve" : "npm-run-all --parallel --continue-on-error --race dev serve"
|
||||
"scripts": {
|
||||
"docs": "jsdoc -r ./src/ -c ./jsdoc.conf.json -d ./docs",
|
||||
"serve_docs": "cd docs; ws -p 8088",
|
||||
"serve": "ws -p 3000",
|
||||
"build": "vite build --mode production && npm run dts",
|
||||
"clean": "rm -rf ./lib ./docs",
|
||||
"dev": "vite build --watch --mode development",
|
||||
"test:watch": "vitest",
|
||||
"test": "vitest run --reporter=verbose",
|
||||
"lint": "eslint src/",
|
||||
"dts": "tsc --build tsconfig.json",
|
||||
"dev_serve": "npm-run-all --parallel --continue-on-error --race dev serve"
|
||||
},
|
||||
"repository" : {
|
||||
"type" : "git",
|
||||
"url" : "git+https://github.com/openglobus/openglobus.git"
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/openglobus/openglobus.git"
|
||||
},
|
||||
"author" : "Michael Gevlich(Zemledelec)",
|
||||
"license" : "MIT",
|
||||
"bugs" : {
|
||||
"url" : "https://github.com/openglobus/openglobus/issues",
|
||||
"email" : "mgevlich@gmail.com"
|
||||
"author": "Michael Gevlich(Zemledelec)",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/openglobus/openglobus/issues",
|
||||
"email": "mgevlich@gmail.com"
|
||||
},
|
||||
"homepage" : "https://www.openglobus.org",
|
||||
"devDependencies" : {
|
||||
"@babel/cli" : "^7.25.6",
|
||||
"@babel/core" : "^7.25.2",
|
||||
"@babel/plugin-proposal-class-properties" : "^7.18.6",
|
||||
"@babel/plugin-proposal-object-rest-spread" : "^7.20.7",
|
||||
"@babel/preset-env" : "^7.25.4",
|
||||
"@babel/preset-typescript" : "^7.24.7",
|
||||
"@rollup/plugin-json" : "^6.1.0",
|
||||
"@rollup/plugin-terser" : "^0.4.4",
|
||||
"@rollup/plugin-typescript" : "^11.1.6",
|
||||
"@types/jest" : "^29.5.12",
|
||||
"@types/node" : "^22.14.0",
|
||||
"@typescript-eslint/eslint-plugin" : "^8.4.0",
|
||||
"@typescript-eslint/parser" : "^8.4.0",
|
||||
"clean-jsdoc-theme" : "^4.3.0",
|
||||
"eslint" : "^9.9.1",
|
||||
"jest" : "^29.7.0",
|
||||
"jest-canvas-mock" : "^2.5.2",
|
||||
"jest-environment-jsdom" : "^29.7.0",
|
||||
"jsdoc" : "^4.0.3",
|
||||
"jsdoc-babel" : "^0.5.0",
|
||||
"lint-staged" : "^15.2.10",
|
||||
"local-web-server" : "^5.4.0",
|
||||
"npm-run-all" : "^4.1.5",
|
||||
"postcss" : "^8.4.45",
|
||||
"prettier" : "^3.3.3",
|
||||
"rollup" : "^4.22.4",
|
||||
"rollup-plugin-copy" : "^3.5.0",
|
||||
"rollup-plugin-postcss" : "^4.0.2",
|
||||
"rollup-plugin-web-worker-loader" : "^1.7.0",
|
||||
"terser" : "^5.39.0",
|
||||
"ts-jest" : "^29.2.5",
|
||||
"typescript" : "^5.5.4",
|
||||
"vite" : "^6.2.6",
|
||||
"vite-plugin-glsl" : "^1.4.0",
|
||||
"vite-plugin-static-copy" : "^2.3.1"
|
||||
"homepage": "https://www.openglobus.org",
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
||||
"@babel/preset-env": "^7.26.9",
|
||||
"@babel/preset-typescript": "^7.27.0",
|
||||
"@rollup/plugin-terser": "^0.4.4",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "^22.15.3",
|
||||
"@typescript-eslint/eslint-plugin": "^8.31.1",
|
||||
"clean-jsdoc-theme": "^4.3.0",
|
||||
"eslint": "^9.25.1",
|
||||
"jsdoc": "^4.0.4",
|
||||
"jsdoc-babel": "^0.5.0",
|
||||
"jsdom": "^26.1.0",
|
||||
"local-web-server": "^5.4.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"terser": "^5.39.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "^6.3.4",
|
||||
"vite-plugin-glsl": "^1.4.1",
|
||||
"vite-plugin-static-copy": "^2.3.1",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^3.1.2"
|
||||
},
|
||||
"lint-staged" : {
|
||||
"*.{js,ts}" : [
|
||||
"prettier --write"
|
||||
]
|
||||
},
|
||||
"keywords" : [
|
||||
"keywords": [
|
||||
"map",
|
||||
"3D",
|
||||
"webgl",
|
||||
|
||||
@ -3,7 +3,7 @@ import { Worker } from "./worker";
|
||||
window.Worker = Worker;
|
||||
|
||||
|
||||
global.URL.createObjectURL = jest.fn(() => "");
|
||||
global.URL.createObjectURL = vi.fn(() => "");
|
||||
/**
|
||||
* TODO
|
||||
* mock is not supported webgl2 context?
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
export default class MockWorker {
|
||||
constructor() {
|
||||
this.postMessage = jest.fn();
|
||||
this.terminate = jest.fn();
|
||||
this.addEventListener = jest.fn();
|
||||
this.removeEventListener = jest.fn();
|
||||
this.postMessage = vi.fn();
|
||||
this.terminate = vi.fn();
|
||||
this.addEventListener = vi.fn();
|
||||
this.removeEventListener = vi.fn();
|
||||
this.onmessage = null;
|
||||
this.onerror = null;
|
||||
}
|
||||
|
||||
@ -5,4 +5,4 @@ import { Worker } from "./worker";
|
||||
window.Worker = Worker;
|
||||
|
||||
|
||||
global.URL.createObjectURL = jest.fn(() => "");
|
||||
global.URL.createObjectURL = vi.fn(() => "");
|
||||
|
||||
13
vitest.config.ts
Normal file
13
vitest.config.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import {defineConfig} from 'vitest/config';
|
||||
import path from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: ['./tests/setupTests.js'],
|
||||
alias: [{
|
||||
find: /^(.*)\.glsl$/, replacement: path.resolve(path.resolve(__dirname), 'tests/__mocks__/glslMock.js')
|
||||
}]
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user