diff --git a/.circleci/config.yml b/.circleci/config.yml index 75f35cf..a271668 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,9 +1,14 @@ -version: 2 -jobs: - build: +version: 2.1 + +executors: + node-executor: working_directory: ~/phovea docker: - image: circleci/node:12.13-buster-browsers + +jobs: + build: + executor: node-executor steps: - checkout - run: @@ -22,8 +27,7 @@ jobs: (grep -l '._resolved.: .\(git[^:]*\|bitbucket\):' ./node_modules/*/package.json || true) | xargs -r dirname | xargs -r rm -rf - save_cache: key: deps1-{{ .Branch }}-{{ checksum "package.json" }} - paths: - - ./node_modules + paths: ./node_modules - run: name: Install npm dependencies from git repositories (always get latest commit) command: npm install @@ -35,8 +39,23 @@ jobs: command: npm run dist - store_artifacts: path: dist + - persist_to_workspace: + root: ~/phovea + paths: . + publish: + executor: node-executor + steps: + - attach_workspace: + at: ~/phovea + - run: + name: Authentication + command: | + echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc + - run: + name: Publish package + command: npm publish workflows: - version: 2 + version: 2.1 # build-nightly: # triggers: # - schedule: @@ -47,13 +66,13 @@ workflows: # - develop # jobs: # - build - build-branch: + build-branches-only: jobs: - build: filters: tags: - ignore: /^v.*/ - build-tag: + ignore: /.*/ + build-publish-tag: jobs: - build: filters: @@ -61,3 +80,13 @@ workflows: ignore: /.*/ tags: only: /^v.*/ + - publish: + context: + - org-public + requires: + - build + filters: + branches: + ignore: /.*/ + tags: + only: /^v.*/ diff --git a/.gitattributes b/.gitattributes index 544c336..711da28 100644 --- a/.gitattributes +++ b/.gitattributes @@ -125,3 +125,10 @@ AUTHORS text # with the python modules ``pickle``, ``dbm.*``, # ``shelve``, ``marshal``, ``anydbm``, & ``bsddb`` # (among others). + + +# Mark compiled files as generated to hide them in PRs +/dist/** linguist-generated=true + +# Hide compiled files from git diff and auto-replace them when merging different branches +/dist/** -diff -merge diff --git a/.gitignore b/.gitignore index 336523b..bd3ee02 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,28 @@ +# general things to ignore /.tscache /.idea +/build/ +/dist/tsBuildInfoFile /lib/ +*.egg-info/ +*.egg +*.py[cod] +__pycache__/ +*.so +*~ +*.log +*.pot +*.pyc +*.swp +*.lock +# due to using tox and pytest +.tox +.cache node_modules/ /src/**/*.js /tests/**/*.js /src/**/*.map -/tests/**/*.map +/tests/**/*.map *.css -*.log /.cache-loader package-lock.json diff --git a/dist/import/Importer.d.ts b/dist/import/Importer.d.ts index 66de0fd..eaf6444 100644 --- a/dist/import/Importer.d.ts +++ b/dist/import/Importer.d.ts @@ -1,7 +1,6 @@ /** * Created by Samuel Gratzl on 29.09.2016. */ -import '../scss/main.scss'; import { EventHandler } from 'phovea_core'; import * as d3 from 'd3'; import { IDataDescription } from 'phovea_core'; diff --git a/dist/import/Importer.js b/dist/import/Importer.js index 2ab8be0..e3bc05f 100644 --- a/dist/import/Importer.js +++ b/dist/import/Importer.js @@ -1,7 +1,6 @@ /** * Created by Samuel Gratzl on 29.09.2016. */ -import '../scss/main.scss'; import { BaseUtils } from 'phovea_core'; import { EventHandler } from 'phovea_core'; import { ParserUtils } from './parser'; diff --git a/dist/import/Importer.js.map b/dist/import/Importer.js.map index 0ac4d76..8a30672 100644 --- a/dist/import/Importer.js.map +++ b/dist/import/Importer.js.map @@ -1 +1 @@ -{"version":3,"file":"Importer.js","sourceRoot":"","sources":["../../src/import/Importer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAS1C,MAAM,OAAO,QAAS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C,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;YACrE,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;gBACpB,6BAA6B;gBAC7B,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;aAC1B;QACH,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC5B,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1E,CAAC;CACF"} \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index 12fff0f..42948de 100644 --- a/jest.config.js +++ b/jest.config.js @@ -38,7 +38,7 @@ module.exports = { "__APP_CONTEXT__": "TEST_CONTEXT", 'ts-jest': { // has to be set to true, otherwise i18n import fails - "tsConfig": { + "tsconfig": { "esModuleInterop": true, } } diff --git a/package.json b/package.json index 602dc70..ed5f4e5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "phovea_importer", "description": "Flexible smart and visual data importer for web based visualization", "homepage": "https://phovea.caleydo.org", - "version": "6.1.0", + "version": "7.0.0", "author": { "name": "The Caleydo Team", "email": "contact@caleydo.org", @@ -51,24 +51,24 @@ }, "devDependencies": { "@types/d3": "~3.5.36", - "@types/papaparse": "~5.0.3", - "@types/jest": "~26.0.5", + "@types/papaparse": "~5.2.4", + "@types/jest": "~26.0.20", "identity-obj-proxy": "~3.0.0", - "jest": "~26.1.0", + "jest": "~26.6.3", "jest-raw-loader": "~1.0.1", "rimraf": "~3.0.2", - "shx": "~0.3.2", - "ts-jest": "~26.1.3", - "tslib": "~2.0.0", + "shx": "~0.3.3", + "ts-jest": "~26.4.4", + "tslib": "~2.0.3", "tslint": "~5.20.1", - "typedoc": "~0.17.8", + "typedoc": "~0.19.2", "typescript": "~3.9.7" }, "dependencies": { "d3": "~3.5.17", - "papaparse": "~5.1.1", - "phovea_core": "^5.0.1", - "phovea_d3": "^5.0.0", - "phovea_ui": "^5.0.0" + "papaparse": "~5.3.0", + "phovea_core": "^6.0.0", + "phovea_d3": "^6.0.0", + "phovea_ui": "^6.0.0" } } diff --git a/src/import/Importer.ts b/src/import/Importer.ts index ee38e85..c58a5b1 100644 --- a/src/import/Importer.ts +++ b/src/import/Importer.ts @@ -2,7 +2,6 @@ * Created by Samuel Gratzl on 29.09.2016. */ -import '../scss/main.scss'; import {BaseUtils} from 'phovea_core'; import {EventHandler} from 'phovea_core'; import {ParserUtils} from './parser'; @@ -104,5 +103,3 @@ export class Importer extends EventHandler { $dropZone.on('dragover', over).on('dragleave', over).on('drop', select); } } - - diff --git a/tsconfig.json b/tsconfig.json index e7bc9b2..2e06f21 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,7 +16,9 @@ "esModuleInterop": false, "resolveJsonModule": true, "allowSyntheticDefaultImports": true, - "preserveWatchOutput": true + "preserveWatchOutput": true, + "incremental": true, + "tsBuildInfoFile": "dist/tsBuildInfoFile" }, "include": [ "src/**/*.ts",