Skip to content

Commit

Permalink
Feature/esm (Dash-Industry-Forum#4261)
Browse files Browse the repository at this point in the history
* Move to pure ES6 modules expect for Webpack files

* Commit from shell to check if hooks are executed

* Fix git hook and run linting recursively in src folder

* Adjust CircleCI job for v5.0.0 branch

* Update package-lock.json

* Adjust functional tests to be ESM compliant

* Fix browserunit tests
  • Loading branch information
dsilhavy authored Aug 14, 2023
1 parent 0eb8fa8 commit 7b8f9fb
Show file tree
Hide file tree
Showing 332 changed files with 4,185 additions and 3,027 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ commands:
- run:
name: Run functional tests (<<parameters.browser>> / <<parameters.protocol>>) <<parameters.groupname>>
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --groupname="<<parameters.groupname>>"
node test/functional/runTests.cjs --selenium=remote --reporters=junit --app=remote --browsers=<<parameters.browser>> --protocol=<<parameters.protocol>> --groupname="<<parameters.groupname>>"
jobs:
build-and-unit-test:
executor: dashjs-executor
Expand All @@ -110,11 +110,11 @@ jobs:
steps:
- checkout
- run:
name: Merge into development virtually
name: Merge into v5.0.0 virtually
command: |
git config --global user.email "[email protected]"
git config --global user.name "CircleCI"
git checkout development
git checkout v5.0.0
git merge --no-edit --no-ff $CIRCLE_BRANCH
- dependencies_setup
- build_unit_test_steps
Expand All @@ -125,14 +125,14 @@ jobs:
- functional_precondition
- checkout
- run:
name: Virtual merge into development branch
name: Virtual merge into v5.0.0 branch
command: |
if [ "${CIRCLE_BRANCH}" = "development" ]; then
echo "On development branch already, no merge needed"
if [ "${CIRCLE_BRANCH}" = "v5.0.0" ]; then
echo "On v5.0.0 branch already, no merge needed"
else
git config --global user.email "[email protected]"
git config --global user.name "CircleCI"
git checkout development
git checkout v5.0.0
git merge --no-edit --no-ff $CIRCLE_BRANCH
fi
- dependencies_setup
Expand All @@ -141,11 +141,11 @@ jobs:
- run:
name: Run functional tests for one vector (chrome / https)
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/singleVector.json
node test/functional/runTests.cjs --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/singleVector.json
- run:
name: Run functional tests for smoke vectors (chrome / https)
command:
node test/functional/runTests.js --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/smokeVectors.json
node test/functional/runTests.cjs --selenium=remote --reporters=junit --debug=true --app=remote --browsers=chrome --protocol=https --source=./test/functional/config/smokeVectors.json
- process_test_results

functional-tests-VOD_LIVE:
Expand Down Expand Up @@ -201,7 +201,7 @@ workflows:
filters:
branches:
ignore:
- development # skiping redundant job if already on development
- v5.0.0 # skiping redundant job if already on development
- functional-tests-smoke:
filters:
branches:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion build/karma.conf.js → build/karma.conf.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const llSegmentMiddleware = require('./helpers/LLsegment.js');
const llSegmentMiddleware = require('./helpers/LLsegment.cjs');

function CustomMiddlewareFactory(/*config*/) {
return function (request, response, next ) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion build/webpack.dev.js → build/webpack.dev.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { merge } = require('webpack-merge');
const common = require('./webpack.base.js').config;
const common = require('./webpack.base.cjs').config;
const path = require('path');

const config = merge(common, {
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.prod.js → build/webpack.prod.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { merge } = require('webpack-merge');
const ESLintPlugin = require('eslint-webpack-plugin');
const common = require('./webpack.base.js').config;
const common = require('./webpack.base.cjs').config;

const entries = {
'dash.all': './index.js',
Expand Down
66 changes: 0 additions & 66 deletions deploy.js

This file was deleted.

1,293 changes: 1,292 additions & 1 deletion externals/BigInteger.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions externals/base64.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ if (typeof exports !== 'undefined') {
exports.encode = BASE64.encode;
exports.encodeASCII = BASE64.encodeASCII;
}

export default BASE64
Loading

0 comments on commit 7b8f9fb

Please sign in to comment.