Skip to content

Commit 1fd2438

Browse files
committed
updating build to test for a valid grid version, if not a valid version, it will throw exception and alert the user for the error
1 parent 6b27a6b commit 1fd2438

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: dash_ag_grid/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
package_name = package['name'].replace(' ', '_').replace('-', '_')
2525
__version__ = package['version']
26-
grid_version = package['dependencies']['ag-grid-community'].lstrip('^')
26+
grid_version = package['dependencies']['ag-grid-community']
2727

2828
_current_path = _os.path.dirname(_os.path.abspath(__file__))
2929

Diff for: package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
"homepage": "https://github.com/plotly/dash-ag-grid",
1313
"main": "dash_ag_grid/dash_ag_grid.min.js",
1414
"scripts": {
15+
"pre-flight-version": "python test_version.py",
1516
"prepublishOnly": "rimraf -rf lib && babel src --out-dir lib --copy-files --config-file ./.babelrc && rimraf --glob -rf lib/jl/ lib/*.jl",
1617
"build:js": "webpack --mode production",
1718
"build:backends": "dash-generate-components ./src/lib/components dash_ag_grid -p package-info.json --r-prefix '' --jl-prefix ''",
18-
"build": "run-s prepublishOnly build:js build:backends",
19+
"build": "run-s pre-flight-version && run-s prepublishOnly build:js build:backends",
1920
"postbuild": "es-check es2017 dash_ag_grid/*.js",
2021
"private::format.eslint": "eslint --quiet --fix src",
2122
"private::format.prettier": "prettier --write src --ignore-path=.prettierignore",
@@ -29,9 +30,9 @@
2930
"dependencies": {
3031
"@emotion/react": "^11.11.1",
3132
"@emotion/styled": "^11.11.0",
32-
"ag-grid-community": "^31.0.3",
33-
"ag-grid-enterprise": "^31.0.3",
34-
"ag-grid-react": "^31.0.3",
33+
"ag-grid-community": "31.0.3",
34+
"ag-grid-enterprise": "31.0.3",
35+
"ag-grid-react": "31.0.3",
3536
"@mui/icons-material": "^5.14.14",
3637
"@mui/material": "^5.14.14",
3738
"d3-format": "^3.1.0",

0 commit comments

Comments
 (0)