Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
platypii committed May 31, 2024
1 parent cf0de55 commit 3d1fd6c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@
"build": "rollup -c",
"coverage": "vitest run --coverage --coverage.include=src",
"demo": "http-server -o",
"lint": "eslint src/**/*.{ts,tsx}",
"lint": "eslint src/**/*.{ts,tsx} test/**/*.{ts,tsx}",
"test": "vitest run"
},
"devDependencies": {
"@babel/core": "7.24.6",
"@babel/preset-env": "7.24.6",
"@babel/preset-react": "7.24.6",
"@babel/preset-typescript": "7.24.6",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-commonjs": "25.0.8",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-replace": "5.0.5",
Expand Down
10 changes: 4 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import resolve from '@rollup/plugin-node-resolve'
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import resolve from '@rollup/plugin-node-resolve'
import replace from '@rollup/plugin-replace'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
Expand All @@ -14,6 +13,7 @@ export default {
react: 'React',
'react-dom': 'ReactDOM',
},
sourcemap: true,
},
plugins: [
replace({
Expand All @@ -22,10 +22,8 @@ export default {
}),
resolve(),
commonjs(),
typescript(),
babel({
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
babelHelpers: 'bundled',
typescript({
exclude: ['test/**'],
}),
terser(),
],
Expand Down
8 changes: 4 additions & 4 deletions test/hightable.test.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { fireEvent, render, waitFor } from '@testing-library/react'
import React, { act } from 'react'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { render, fireEvent, waitFor } from '@testing-library/react'
import HighTable from '../src/hightable.tsx'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import HighTable from '../src/hightable.js'

describe('HighTable', () => {
const mockData = {
header: ['ID', 'Name', 'Age'],
numRows: 100,
rows: vi.fn((start, end) => Promise.resolve(
Array.from({ length: end - start }, (_, index) => [index + start, 'Name ' + (index + start), 20 + (index % 50)])
Array.from({ length: end - start }, (_, index) => [index + start, 'Name ' + (index + start), 20 + index % 50])
)),
}

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"compilerOptions": {
"allowImportingTsExtensions": true,
"allowJs": true,
"checkJs": true,
"declaration": true,
Expand Down

0 comments on commit 3d1fd6c

Please sign in to comment.