diff --git a/.eslintrc.js b/.eslintrc.js index 3853d47..d5d36c3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,12 +2,9 @@ module.exports = { root: true, env: { node: true, - es2022: true, + es2022: true }, - extends: [ - 'plugin:vue/essential', - '@vue/standard' - ], + extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', 'prettier'], rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', @@ -20,10 +17,7 @@ module.exports = { }, overrides: [ { - files: [ - '**/__tests__/*.{j,t}s?(x)', - '**/tests/**/*.spec.{j,t}s?(x)' - ], + files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/**/*.spec.{j,t}s?(x)'], env: { mocha: true } diff --git a/.github/workflows/config.grenrc.js b/.github/workflows/config.grenrc.js index e9b0b1b..6ffbed8 100644 --- a/.github/workflows/config.grenrc.js +++ b/.github/workflows/config.grenrc.js @@ -1,17 +1,14 @@ module.exports = { dataSource: 'milestones', - ignoreIssuesWith: [ - 'wontfix', - 'duplicate' - ], + ignoreIssuesWith: ['wontfix', 'duplicate'], milestoneMatch: 'v{{tag_name}}', template: { issue: '- {{name}} [{{text}}]({{url}})', - changelogTitle: "", - release: "{{body}}", + changelogTitle: '', + release: '{{body}}' }, groupBy: { - 'Enhancements': ["enhancement", "internal"], - 'Bug fixes': ["bug"] + Enhancements: ['enhancement', 'internal'], + 'Bug fixes': ['bug'] } } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 99765c6..3a20e2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,43 +3,43 @@ on: workflow_dispatch: push: tags: - - '*' + - '*' jobs: deploy: name: Create release - runs-on: ubuntu-latest + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 16.x + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 16.x - - name: Update npm - run: npm install -g npm@8 + - name: Update npm + run: npm install -g npm@8 - - name: npm install and build - run: | - npm install - npm run build + - name: npm install and build + run: | + npm install + npm run build - - name: Create archives - run: | - cd dist - zip -9 -r ../dist.zip . -x "js/*.map" -x "/*.map" - zip -9 -r ../dist_map.zip . + - name: Create archives + run: | + cd dist + zip -9 -r ../dist.zip . -x "js/*.map" -x "/*.map" + zip -9 -r ../dist_map.zip . - - name: Create Release Notes - run: | - npm install github-release-notes@0.16.0 -g - gren changelog --generate --config="/.github/workflows/config.grenrc.js" - env: - GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create Release Notes + run: | + npm install github-release-notes@0.16.0 -g + gren changelog --generate --config="/.github/workflows/config.grenrc.js" + env: + GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Create release - uses: ncipollo/release-action@v1 - with: - artifacts: "dist.zip,dist_map.zip" - token: ${{ secrets.GITHUB_TOKEN }} - bodyFile: "CHANGELOG.md" + - name: Create release + uses: ncipollo/release-action@v1 + with: + artifacts: 'dist.zip,dist_map.zip' + token: ${{ secrets.GITHUB_TOKEN }} + bodyFile: 'CHANGELOG.md' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index db70d6d..fff4da9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,35 +3,35 @@ on: workflow_dispatch: push: branches: - - 'master' + - 'master' pull_request: branches: - - 'master' + - 'master' jobs: test: name: Run tests runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: 16.x - - name: Install browsers - run: | - export DEBIAN_FRONTEND=noninteractive - sudo apt-get update - sudo apt-get install -y chromium-browser firefox + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 16.x + - name: Install browsers + run: | + export DEBIAN_FRONTEND=noninteractive + sudo apt-get update + sudo apt-get install -y chromium-browser firefox - - name: Update npm - run: npm install -g npm@8 + - name: Update npm + run: npm install -g npm@8 - - name: Install the project - run: npm install + - name: Install the project + run: npm install - - name: Run lint - run: npm run lint -- --no-fix + - name: Run lint + run: npm run lint -- --no-fix - - name: Run karma tests - run: npm run test + - name: Run karma tests + run: npm run test diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..a998616 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "trailingComma": "none", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "arrowParens": "avoid" +} diff --git a/README.md b/README.md index 59a80a9..8945074 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ # sqliteviz Sqliteviz is a single-page offline-first PWA for fully client-side visualisation - of SQLite databases, CSV, JSON or NDJSON files. +of SQLite databases, CSV, JSON or NDJSON files. With sqliteviz you can: + - run SQL queries against a SQLite database and create [Plotly][11] charts and pivot tables based on the result sets - import a CSV/JSON/NDJSON file into a SQLite database and visualize imported data - export result set to CSV file @@ -19,15 +20,19 @@ With sqliteviz you can: https://user-images.githubusercontent.com/24638357/128249848-f8fab0f5-9add-46e0-a9c1-dd5085a8623e.mp4 ## Quickstart + The latest release of sqliteviz is deployed on [sqliteviz.com/app][6]. ## Wiki + For user documentation, check out sqliteviz [documentation][7]. ## Motivation + It's a kind of middleground between [Plotly Falcon][1] and [Redash][2]. ## Components + It is built on top of [react-chart-editor][3], [PivotTable.js][12], [sql.js][4] and [Vue-Codemirror][8] in [Vue.js][5]. CSV parsing is performed with [Papa Parse][9]. [1]: https://github.com/plotly/falcon diff --git a/babel.config.js b/babel.config.js index e955840..716b023 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,3 @@ module.exports = { - presets: [ - '@vue/cli-plugin-babel/preset' - ] + presets: ['@vue/cli-plugin-babel/preset'] } diff --git a/index.html b/index.html index e47af9d..4d2772a 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,11 @@ - + - - - - - + + + + + sqliteviz diff --git a/src/components/CsvJsonImport/DelimiterSelector/index.vue b/src/components/CsvJsonImport/DelimiterSelector/index.vue index 41ea611..84db0f6 100644 --- a/src/components/CsvJsonImport/DelimiterSelector/index.vue +++ b/src/components/CsvJsonImport/DelimiterSelector/index.vue @@ -1,5 +1,5 @@