Skip to content

Commit d813fd3

Browse files
committed
Tune CI/CD flow
1 parent be6cca0 commit d813fd3

File tree

6 files changed

+585
-872
lines changed

6 files changed

+585
-872
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ jobs:
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
- run: npx yarn install --frozen-lockfile
25-
- run: npx prettier src/*.js --list-different || (echo 'Please correct file formatting using `yarn format` and try again.' && exit 1)
26-
- run: npx yarn test
25+
- run: npx yarn test-ci
2726

2827

2928

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn test-format || (echo please format using 'yarn format' && exit 1)
4+
yarn test-format

.prettierrc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
printWidth: 100
2-
tabWidth: 4
3-
useTabs: true
4-
bracketSpacing: false
5-
trailingComma: es5
6-
singleQuote: true
1+

gulpfile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ var packageData = require('./package.json'); // JSON.parse(fs.readFileSync('pack
2222
var version = packageData.version;
2323
var branch = execSync(
2424
'git --work-tree="' + __dirname + '" --git-dir="' + __dirname + '/.git" branch',
25-
{encoding: 'utf8'}
25+
{
26+
encoding: 'utf8',
27+
}
2628
)
2729
.match(/^\*\s+(.*)/m)[1]
2830
.trim();

package.json

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "alasql",
33
"description": "Use SQL to select and filter javascript data - including relational joins and search in nested objects (JSON). Export to and import from Excel and CSV",
4-
"version": "2.1.3",
4+
"version": "2.1.2",
55
"author": "Andrey Gershun <agershun@gmail.com>",
66
"contributors": [
77
"Mathias Wulff <m@rawu.dk>"
88
],
9+
"license": "MIT",
910
"main": "dist/alasql.fs.js",
1011
"browser": "dist/alasql.min.js",
1112
"directories": {
@@ -14,20 +15,20 @@
1415
"typings": "dist/alasql.d.ts",
1516
"scripts": {
1617
"test": "gulp && yarn test-only",
17-
"test-ci": "(yarn test-format || 1) && yarn test && yarn install-g && alasql 'select 1 as Succes'",
18+
"test-ci": "yarn test-format && yarn test && yarn install-g && alasql 'select 1 as Succes'",
1819
"test-only": "mocha ./test --reporter dot",
1920
"test-browser": "node test/browserTestRunner.js 7387",
20-
"test-cover": "# istanbul cover -x 'lib/zt/zt.js' --dir test/coverage _mocha",
21+
"test-cover": "echo istanbul got depricated :-( # istanbul cover -x 'lib/zt/zt.js' --dir test/coverage _mocha",
2122
"build": "yarn format && gulp",
2223
"build-jison": "gulp --jison && gulp",
2324
"build-watch": "gulp watch",
24-
"install-g": "yarn build && npm uninstall alasql -g && npm install -g .",
25-
"release": "yarn version #f='/tmp/alasql.tmp' && curl https://raw.githubusercontent.com/wiki/agershun/alasql/How-to-release.md > $f && sh $f ; rm $f",
25+
"install-g": "npm uninstall alasql -g && npm install -g .",
26+
"release": "yarn version",
2627
"jison": "npx jison-gho ./src/alasqlparser.jison -o ./src/alasqlparser.js",
2728
"fmt": "yarn pretty-commit --write",
2829
"format": "yarn pretty-since-dev --write",
2930
"format-all": "yarn pretty-all --write",
30-
"test-format": "yarn pretty-since-dev --list-different || echo 'Please correct file formatting using `yarn format` and try again.'",
31+
"test-format": "yarn pretty-since-dev --list-different || (echo 'Please correct file formatting using `yarn format` and try again.' && exit 1)",
3132
"pretty-since-dev": "{ git diff --name-only --diff-filter=d origin/develop ; git diff --name-only --diff-filter=d --staged origin/develop ; } | sort | uniq | grep -vE '^dist/|^test/coverage|^lib/|.min.js$' | grep -E '\\.(scss|css|js|ts|vue|json)$' | xargs npx prettier",
3233
"pretty-commit": "{ git diff --name-only --diff-filter=d ; git diff --name-only --diff-filter=d --staged ; } | sort | uniq | grep -vE '^dist/|^test/coverage|^lib/|.min.js$' | grep -E '\\.(scss|css|js|ts|vue|json)$' | xargs npx prettier",
3334
"pretty-all": "git ls-tree --full-tree --name-only -r HEAD | grep -vE '^dist/|^test/coverage|^lib/|.min.js$' | grep -E '\\.(scss|css|js|ts|vue|json)$' | xargs npx prettier",
@@ -51,7 +52,7 @@
5152
},
5253
"dependencies": {
5354
"dom-storage": "2.1.0",
54-
"es6-promise": "4.2.8",
55+
"es6-promise": "4.2.6",
5556
"lodash": "4.17.21",
5657
"request": "2.88.2",
5758
"xlsx": "0.18",
@@ -81,9 +82,11 @@
8182
"uglify-js": "3.17.3"
8283
},
8384
"resolutions": {
85+
"yargs": "16",
8486
"got": "^12.0.0",
8587
"axios": "^1.0.0",
8688
"marked": "^4.0.10",
89+
"prettier": "2.7.0",
8790
"underscore": "^1.12.1",
8891
"glob-parent": "^6.0.0",
8992
"lodash.template": "^4.5.0"
@@ -93,15 +96,15 @@
9396
},
9497
"repository": {
9598
"type": "git",
96-
"url": "http://github.com/agershun/alasql.git"
99+
"url": "http://github.com/AlaSQL/alasql.git"
97100
},
98101
"bugs": {
99-
"url": "https://github.com/agershun/alasql/issues"
102+
"url": "https://github.com/AlaSQL/alasql/issues"
100103
},
101104
"bin": {
102105
"alasql": "./bin/alasql-cli.js"
103106
},
104-
"homepage": "https://github.com/agershun/alasql",
107+
"homepage": "https://github.com/AlaSQL/alasql",
105108
"keywords": [
106109
"SQL",
107110
"javascript",
@@ -111,18 +114,10 @@
111114
"XLS",
112115
"CSV"
113116
],
114-
"license": "MIT",
115117
"prettier": {
116-
"useTabs": true,
117118
"printWidth": 100,
119+
"useTabs": true,
118120
"singleQuote": true,
119-
"arrowParens": "always",
120-
"bracketSpacing": false,
121-
"trailingComma": "es5"
122-
},
123-
"husky": {
124-
"hooks": {
125-
"pre-push": "yarn test-format || (echo please format using 'yarn format' && exit 1)"
126-
}
121+
"bracketSpacing": false
127122
}
128123
}

0 commit comments

Comments
 (0)