Skip to content

Commit f0bc39e

Browse files
authored
Merge pull request #221 from SortableJS/infra
2 parents 8a7cb54 + 3ba6fc4 commit f0bc39e

File tree

5 files changed

+41
-12202
lines changed

5 files changed

+41
-12202
lines changed

.github/workflows/build.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
# Maintenance versions of node
12-
node-version: [10.x, 12.x, 14.x]
12+
node-version: [12.x, 14.x, 16.x, 17.x]
1313

1414
steps:
1515
- uses: actions/checkout@v2
@@ -34,7 +34,7 @@ jobs:
3434
${{ runner.os }}-yarn-
3535
3636
- name: Install dependencies
37-
run: yarn --frozen-lockfile
37+
run: yarn
3838

3939
- name: Build
4040
run: yarn build

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
2+
.idea
3+
.vscode
4+
.parcel-cache
35
node_modules
46
temp
57
dist
68
# todo - get story book only when releasing.
79
storybook-static
8-
.parcel-cache
10+
yarn.lock

package.json

+32-29
Original file line numberDiff line numberDiff line change
@@ -26,48 +26,51 @@
2626
"format": "npm-run-all format:*",
2727
"format:eslint": "yarn lint --fix",
2828
"format:prettier": "prettier --write \"src/**.{js,ts}\"",
29-
"lint": "eslint \"src/**.{js,ts}\""
29+
"lint": "eslint \"src/**.{js,ts}\"",
30+
"phoenix": "rm -rf ./node_modules && rm -f yarn.lock && yarn install --prefer-online"
3031
},
3132
"peerDependencies": {
32-
"@types/sortablejs": "^1.10.0",
33+
"@types/sortablejs": "1",
3334
"react": ">=16.9.0",
3435
"react-dom": ">=16.9.0",
35-
"sortablejs": "^1.10.0"
36+
"sortablejs": "1"
3637
},
3738
"dependencies": {
38-
"classnames": "^2.2.6",
39-
"tiny-invariant": "^1.1.0"
39+
"classnames": "2.3.1",
40+
"tiny-invariant": "1.2.0"
4041
},
4142
"devDependencies": {
42-
"@commitlint/cli": "^11.0.0",
43-
"@commitlint/config-conventional": "^11.0.0",
44-
"@semantic-release/changelog": "^5.0.1",
45-
"@semantic-release/git": "^9.0.0",
43+
"@commitlint/cli": "11",
44+
"@commitlint/config-conventional": "11",
45+
"@parcel/packager-ts": "2.2.0",
46+
"@parcel/transformer-typescript-types": "2.2.0",
47+
"@semantic-release/changelog": "5",
48+
"@semantic-release/git": "9",
4649
"@types/classnames": "^2.2.10",
4750
"@types/jest": "^26.0.14",
4851
"@types/node": "14.11.2",
49-
"@types/react": "16.9.49",
50-
"@types/react-dom": "16.9.8",
51-
"@types/sortablejs": "^1.10.0",
52+
"@types/react": ">=16.9.0",
53+
"@types/react-dom": ">=16.9.0",
54+
"@types/sortablejs": "1",
5255
"@typescript-eslint/eslint-plugin": "^4.2.0",
5356
"@typescript-eslint/parser": "^4.2.0",
54-
"commitizen": "^4.2.1",
55-
"cz-conventional-changelog": "^3.3.0",
56-
"eslint": "^7.10.0",
57-
"eslint-plugin-react": "^7.21.2",
58-
"husky": "^4.3.0",
59-
"jest": "^26.4.2",
60-
"lint-staged": "^10.4.0",
61-
"npm-run-all": "^4.1.5",
62-
"parcel": "^2.0.0-beta.1",
63-
"prettier": "^2.1.2",
64-
"react": "^16.13.1",
65-
"react-dom": "^16.13.1",
66-
"semantic-release": "^17.1.2",
67-
"sortablejs": "^1.10.0",
68-
"ts-jest": "^26.4.0",
69-
"ts-node": "^9.0.0",
70-
"typescript": "^4.0.3"
57+
"commitizen": "4",
58+
"cz-conventional-changelog": "3",
59+
"eslint": "7",
60+
"eslint-plugin-react": "7",
61+
"husky": "4.3",
62+
"jest": "26",
63+
"lint-staged": "10",
64+
"npm-run-all": "4",
65+
"parcel": "2",
66+
"prettier": "2.5",
67+
"react": ">=16.9.0",
68+
"react-dom": ">=16.9.0",
69+
"semantic-release": "17",
70+
"sortablejs": "1",
71+
"ts-jest": "26",
72+
"ts-node": "9",
73+
"typescript": "4"
7174
},
7275
"commitlint": {
7376
"extends": [

src/react-sortable.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,18 @@ Please read the updated README.md at https://github.com/SortableJS/react-sortabl
6666
`
6767
);
6868
}
69+
6970
componentDidMount(): void {
7071
if (this.ref.current === null) return;
7172
const newOptions = this.makeOptions();
7273
Sortable.create(this.ref.current, newOptions);
7374
}
75+
7476
componentDidUpdate(prevProps: ReactSortableProps<T>): void {
7577
if (prevProps.disabled !== this.props.disabled && this.sortable) {
7678
this.sortable.option("disabled", this.props.disabled);
7779
}
78-
};
80+
}
7981

8082
render(): JSX.Element {
8183
const { tag, style, className, id } = this.props;

0 commit comments

Comments
 (0)