Skip to content

Commit

Permalink
Merge pull request #221 from SortableJS/infra
Browse files Browse the repository at this point in the history
  • Loading branch information
andresin87 authored Jan 14, 2022
2 parents 8a7cb54 + 3ba6fc4 commit f0bc39e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 12,202 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
# Maintenance versions of node
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x, 17.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -34,7 +34,7 @@ jobs:
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn

- name: Build
run: yarn build
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

.idea
.vscode
.parcel-cache
node_modules
temp
dist
# todo - get story book only when releasing.
storybook-static
.parcel-cache
yarn.lock
61 changes: 32 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,51 @@
"format": "npm-run-all format:*",
"format:eslint": "yarn lint --fix",
"format:prettier": "prettier --write \"src/**.{js,ts}\"",
"lint": "eslint \"src/**.{js,ts}\""
"lint": "eslint \"src/**.{js,ts}\"",
"phoenix": "rm -rf ./node_modules && rm -f yarn.lock && yarn install --prefer-online"
},
"peerDependencies": {
"@types/sortablejs": "^1.10.0",
"@types/sortablejs": "1",
"react": ">=16.9.0",
"react-dom": ">=16.9.0",
"sortablejs": "^1.10.0"
"sortablejs": "1"
},
"dependencies": {
"classnames": "^2.2.6",
"tiny-invariant": "^1.1.0"
"classnames": "2.3.1",
"tiny-invariant": "1.2.0"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@commitlint/cli": "11",
"@commitlint/config-conventional": "11",
"@parcel/packager-ts": "2.2.0",
"@parcel/transformer-typescript-types": "2.2.0",
"@semantic-release/changelog": "5",
"@semantic-release/git": "9",
"@types/classnames": "^2.2.10",
"@types/jest": "^26.0.14",
"@types/node": "14.11.2",
"@types/react": "16.9.49",
"@types/react-dom": "16.9.8",
"@types/sortablejs": "^1.10.0",
"@types/react": ">=16.9.0",
"@types/react-dom": ">=16.9.0",
"@types/sortablejs": "1",
"@typescript-eslint/eslint-plugin": "^4.2.0",
"@typescript-eslint/parser": "^4.2.0",
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.10.0",
"eslint-plugin-react": "^7.21.2",
"husky": "^4.3.0",
"jest": "^26.4.2",
"lint-staged": "^10.4.0",
"npm-run-all": "^4.1.5",
"parcel": "^2.0.0-beta.1",
"prettier": "^2.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"semantic-release": "^17.1.2",
"sortablejs": "^1.10.0",
"ts-jest": "^26.4.0",
"ts-node": "^9.0.0",
"typescript": "^4.0.3"
"commitizen": "4",
"cz-conventional-changelog": "3",
"eslint": "7",
"eslint-plugin-react": "7",
"husky": "4.3",
"jest": "26",
"lint-staged": "10",
"npm-run-all": "4",
"parcel": "2",
"prettier": "2.5",
"react": ">=16.9.0",
"react-dom": ">=16.9.0",
"semantic-release": "17",
"sortablejs": "1",
"ts-jest": "26",
"ts-node": "9",
"typescript": "4"
},
"commitlint": {
"extends": [
Expand Down
4 changes: 3 additions & 1 deletion src/react-sortable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,18 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
`
);
}

componentDidMount(): void {
if (this.ref.current === null) return;
const newOptions = this.makeOptions();
Sortable.create(this.ref.current, newOptions);
}

componentDidUpdate(prevProps: ReactSortableProps<T>): void {
if (prevProps.disabled !== this.props.disabled && this.sortable) {
this.sortable.option("disabled", this.props.disabled);
}
};
}

render(): JSX.Element {
const { tag, style, className, id } = this.props;
Expand Down
Loading

0 comments on commit f0bc39e

Please sign in to comment.