Skip to content

Commit

Permalink
Tune CI/CD flow
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasrw committed Oct 8, 2022
1 parent be6cca0 commit d813fd3
Show file tree
Hide file tree
Showing 6 changed files with 585 additions and 872 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npx yarn install --frozen-lockfile
- run: npx prettier src/*.js --list-different || (echo 'Please correct file formatting using `yarn format` and try again.' && exit 1)
- run: npx yarn test
- run: npx yarn test-ci



2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn test-format || (echo please format using 'yarn format' && exit 1)
yarn test-format
7 changes: 1 addition & 6 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
printWidth: 100
tabWidth: 4
useTabs: true
bracketSpacing: false
trailingComma: es5
singleQuote: true

4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ var packageData = require('./package.json'); // JSON.parse(fs.readFileSync('pack
var version = packageData.version;
var branch = execSync(
'git --work-tree="' + __dirname + '" --git-dir="' + __dirname + '/.git" branch',
{encoding: 'utf8'}
{
encoding: 'utf8',
}
)
.match(/^\*\s+(.*)/m)[1]
.trim();
Expand Down
35 changes: 15 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "alasql",
"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",
"version": "2.1.3",
"version": "2.1.2",
"author": "Andrey Gershun <[email protected]>",
"contributors": [
"Mathias Wulff <[email protected]>"
],
"license": "MIT",
"main": "dist/alasql.fs.js",
"browser": "dist/alasql.min.js",
"directories": {
Expand All @@ -14,20 +15,20 @@
"typings": "dist/alasql.d.ts",
"scripts": {
"test": "gulp && yarn test-only",
"test-ci": "(yarn test-format || 1) && yarn test && yarn install-g && alasql 'select 1 as Succes'",
"test-ci": "yarn test-format && yarn test && yarn install-g && alasql 'select 1 as Succes'",
"test-only": "mocha ./test --reporter dot",
"test-browser": "node test/browserTestRunner.js 7387",
"test-cover": "# istanbul cover -x 'lib/zt/zt.js' --dir test/coverage _mocha",
"test-cover": "echo istanbul got depricated :-( # istanbul cover -x 'lib/zt/zt.js' --dir test/coverage _mocha",
"build": "yarn format && gulp",
"build-jison": "gulp --jison && gulp",
"build-watch": "gulp watch",
"install-g": "yarn build && npm uninstall alasql -g && npm install -g .",
"release": "yarn version #f='/tmp/alasql.tmp' && curl https://raw.githubusercontent.com/wiki/agershun/alasql/How-to-release.md > $f && sh $f ; rm $f",
"install-g": "npm uninstall alasql -g && npm install -g .",
"release": "yarn version",
"jison": "npx jison-gho ./src/alasqlparser.jison -o ./src/alasqlparser.js",
"fmt": "yarn pretty-commit --write",
"format": "yarn pretty-since-dev --write",
"format-all": "yarn pretty-all --write",
"test-format": "yarn pretty-since-dev --list-different || echo 'Please correct file formatting using `yarn format` and try again.'",
"test-format": "yarn pretty-since-dev --list-different || (echo 'Please correct file formatting using `yarn format` and try again.' && exit 1)",
"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",
"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",
"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",
Expand All @@ -51,7 +52,7 @@
},
"dependencies": {
"dom-storage": "2.1.0",
"es6-promise": "4.2.8",
"es6-promise": "4.2.6",
"lodash": "4.17.21",
"request": "2.88.2",
"xlsx": "0.18",
Expand Down Expand Up @@ -81,9 +82,11 @@
"uglify-js": "3.17.3"
},
"resolutions": {
"yargs": "16",
"got": "^12.0.0",
"axios": "^1.0.0",
"marked": "^4.0.10",
"prettier": "2.7.0",
"underscore": "^1.12.1",
"glob-parent": "^6.0.0",
"lodash.template": "^4.5.0"
Expand All @@ -93,15 +96,15 @@
},
"repository": {
"type": "git",
"url": "http://github.com/agershun/alasql.git"
"url": "http://github.com/AlaSQL/alasql.git"
},
"bugs": {
"url": "https://github.com/agershun/alasql/issues"
"url": "https://github.com/AlaSQL/alasql/issues"
},
"bin": {
"alasql": "./bin/alasql-cli.js"
},
"homepage": "https://github.com/agershun/alasql",
"homepage": "https://github.com/AlaSQL/alasql",
"keywords": [
"SQL",
"javascript",
Expand All @@ -111,18 +114,10 @@
"XLS",
"CSV"
],
"license": "MIT",
"prettier": {
"useTabs": true,
"printWidth": 100,
"useTabs": true,
"singleQuote": true,
"arrowParens": "always",
"bracketSpacing": false,
"trailingComma": "es5"
},
"husky": {
"hooks": {
"pre-push": "yarn test-format || (echo please format using 'yarn format' && exit 1)"
}
"bracketSpacing": false
}
}
Loading

0 comments on commit d813fd3

Please sign in to comment.