Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
80 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
export default { | ||
preset: "ts-jest", | ||
preset: "ts-jest/presets/default-esm", | ||
roots: ["<rootDir>/"], | ||
testEnvironment: "jsdom", | ||
moduleDirectories: ["node_modules", "../node_modules"], | ||
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"], | ||
testPathIgnorePatterns: ["/node_modules/", "/dist/"], | ||
extensionsToTreatAsEsm: [".ts", ".tsx"], | ||
transform: { | ||
"^.+\\.[t|j]sx?$": ["babel-jest", { configFile: "../../babel.config.json" }], | ||
"^.+\\.(ts|tsx)?$": "ts-jest", | ||
"^.+\\.(js|jsx)$": "babel-jest", | ||
}, | ||
extensionsToTreatAsEsm: [".ts", ".tsx"], | ||
globals: { | ||
"ts-jest": { | ||
useESM: true, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
{ | ||
"name": "@glideapps/glide-data-grid-source", | ||
"version": "4.0.0-alpha1", | ||
"description": "Useful data source hooks for Glide Data Grid", | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "dist/js/index.js", | ||
"types": "dist/ts/index.d.ts", | ||
"exports": { | ||
"import": "./dist/js/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "npm run build-js && npm run build-cjs && npm run build-types", | ||
"build-js": "babel --config-file ../../babel.config.json ./src -d dist/js --ignore '**/*.stories.tsx','src/stories/*.tsx' --extensions .ts,.tsx && tsc-esm-fix --target='dist/js'", | ||
"build-cjs": "babel --config-file ../../babel.cjs.json ./src -d dist/cjs --ignore '**/*.stories.tsx','src/stories/*.tsx' --extensions .ts,.tsx", | ||
"build-types": "tsc -p tsconfig.types.json", | ||
"lint": "eslint src --ext .ts,.tsx", | ||
"test": "NODE_OPTIONS='--experimental-vm-modules --experimental-modules' jest" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/glideapps/glide-data-grid.git", | ||
"directory": "packages/source" | ||
}, | ||
"homepage": "https://github.com/glideapps/glide-data-grid/tree/main/cells", | ||
"author": "Glide", | ||
"license": "MIT", | ||
"keywords": [ | ||
"react", | ||
"datagrid", | ||
"data-grid", | ||
"editor", | ||
"reactjs", | ||
"scrolling", | ||
"data", | ||
"table", | ||
"cell", | ||
"canvas" | ||
], | ||
"dependencies": { | ||
"@glideapps/glide-data-grid": "4.0.0-alpha1" | ||
}, | ||
"peerDependencies": { | ||
"lodash": "^4.17.19" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.16.0", | ||
"styled-components": "^5.2.0", | ||
"eslint": "^7.12.1", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"jest": "^27.4.2" | ||
} | ||
"name": "@glideapps/glide-data-grid-source", | ||
"version": "4.0.0-alpha1", | ||
"description": "Useful data source hooks for Glide Data Grid", | ||
"sideEffects": false, | ||
"type": "module", | ||
"main": "dist/js/index.js", | ||
"types": "dist/ts/index.d.ts", | ||
"exports": { | ||
"import": "./dist/js/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "npm run build-js && npm run build-cjs && npm run build-types", | ||
"build-js": "babel --config-file ../../babel.config.json ./src -d dist/js --ignore '**/*.stories.tsx','src/stories/*.tsx' --extensions .ts,.tsx && tsc-esm-fix --target='dist/js'", | ||
"build-cjs": "babel --config-file ../../babel.cjs.json ./src -d dist/cjs --ignore '**/*.stories.tsx','src/stories/*.tsx' --extensions .ts,.tsx", | ||
"build-types": "tsc -p tsconfig.types.json", | ||
"lint": "eslint src --ext .ts,.tsx", | ||
"test": "NODE_OPTIONS='--experimental-vm-modules --experimental-modules' jest" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/glideapps/glide-data-grid.git", | ||
"directory": "packages/source" | ||
}, | ||
"homepage": "https://github.com/glideapps/glide-data-grid/tree/main/cells", | ||
"author": "Glide", | ||
"license": "MIT", | ||
"keywords": [ | ||
"react", | ||
"datagrid", | ||
"data-grid", | ||
"editor", | ||
"reactjs", | ||
"scrolling", | ||
"data", | ||
"table", | ||
"cell", | ||
"canvas" | ||
], | ||
"dependencies": { | ||
"@glideapps/glide-data-grid": "4.0.0-alpha1" | ||
}, | ||
"peerDependencies": { | ||
"lodash": "^4.17.19" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.16.0", | ||
"styled-components": "^5.2.0", | ||
"eslint": "^7.12.1", | ||
"eslint-plugin-import": "^2.22.0", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"jest": "^27.4.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import "@testing-library/jest-dom"; | ||
import "jest-canvas-mock"; | ||
import { jest } from "jest-without-globals"; | ||
|
||
Image.prototype.decode = () => new Promise(resolve => window.setTimeout(resolve, 10)); | ||
jest.mock("styled-components", () => { | ||
const actual = jest.requireActual("styled-components") as typeof import("styled-components"); | ||
const styled = actual.default; | ||
|
||
return Object.assign(styled, actual); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters