From 4f20654cac7abccf842ee055e860a7ae4a5784a3 Mon Sep 17 00:00:00 2001 From: Kevin Rodrigues Date: Fri, 17 Jun 2022 12:37:30 +0100 Subject: [PATCH 1/5] v8.3.0 - Add sass:map. (#372) * v8.3.0 - Add sass:map. * v8.3.0 - PR comment. --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- src/scss/tools/functions/_units.scss | 5 +++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b9ca0d..a9c653da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ Future Todo List - Make typography and utility classes silent extenders (so that they can be extended by components without importing all utility classes). - Deprecate modal and orderCard component styles in next major version as unused. +v8.3.0 +------------------------------ +*June 17, 2022* + +### Added +- `sass:map` to resolve `map-get` error when using `sass` in consuming apps. + + v8.2.0 ------------------------------ *May 23, 2022* diff --git a/package.json b/package.json index 1bd733a7..cb2a7eb5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@justeat/fozzie", "title": "Fozzie – Just Eat UI Web Framework", "description": "UI Web Framework for the Just Eat Global Platform", - "version": "8.2.0", + "version": "8.3.0", "main": "dist/js/index.js", "files": [ "dist/js", diff --git a/src/scss/tools/functions/_units.scss b/src/scss/tools/functions/_units.scss index fb295fb6..580eb8e7 100644 --- a/src/scss/tools/functions/_units.scss +++ b/src/scss/tools/functions/_units.scss @@ -10,13 +10,14 @@ // Returns a unitless line-height value // @use 'sass:math'; +@use 'sass:map'; @function line-height($font-size: 'body-s', $line-height: '20', $scale: 'default') { @if type-of($font-size) == 'number' { @return decimal-round(math.div($line-height, $font-size), 2); } @else if map-has-key($type, $font-size) { // else try and find the value in our type map - $key-map: map-get($type, $font-size); - $font-list: map-get($key-map, $scale); + $key-map: map.get($type, $font-size); + $font-list: map.get($key-map, $scale); @if type-of($font-list) == 'list' { @return line-height(nth($font-list, 1), nth($font-list, 2)); From 0a27f7b8784416c32d75c757bf26f19543471577 Mon Sep 17 00:00:00 2001 From: jamieomaguire Date: Wed, 6 Jul 2022 10:18:59 +0100 Subject: [PATCH 2/5] test scss before publishing --- CHANGELOG.md | 8 ++++++++ package.json | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d4078a2..038541f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,14 @@ Future Todo List - Deprecate modal and orderCard component styles in next major version as unused. +v9.0.0-beta.7 +------------------------------ +*July 06, 2022* + +### Changed +- `yarn test` command now tests js and scss together with `test:js` and `test:scss` individually being called + + v9.0.0-beta.6 ------------------------------ *July 01, 2022* diff --git a/package.json b/package.json index da8c7359..8dbc4fb2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@justeat/fozzie", "title": "Fozzie – Just Eat UI Web Framework", "description": "UI Web Framework for the Just Eat Global Platform", - "version": "9.0.0-beta.6", + "version": "9.0.0-beta.7", "main": "dist/js/index.js", "files": [ "dist/js", @@ -72,7 +72,8 @@ "lint:css": "stylelint src/scss/**/*.scss", "lint:js": "eslint --ext .js .", "prepare": "concurrently -n \"lint,compile,test\" -c \"blue,yellow,green\" \"yarn lint\" \"yarn compile\" \"yarn test\" --kill-others-on-fail", - "test": "jest --config=jest.config.js", + "test": "yarn run test:js && yarn run test:scss", + "test:js": "jest --config=jest.config.js", "test:scss": "jest --config=src/test/scss/jest.config.js", "test:build": "sass --no-source-map --load-path=node_modules --style=compressed src/scss:dist/css", "test:cover": "jest --collect-coverage", From 707296ba02c9689a38f798338e17d7de4deddb88 Mon Sep 17 00:00:00 2001 From: jamieomaguire Date: Wed, 6 Jul 2022 10:49:11 +0100 Subject: [PATCH 3/5] update test script to run concurrently --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8dbc4fb2..b5df10f6 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "lint:css": "stylelint src/scss/**/*.scss", "lint:js": "eslint --ext .js .", "prepare": "concurrently -n \"lint,compile,test\" -c \"blue,yellow,green\" \"yarn lint\" \"yarn compile\" \"yarn test\" --kill-others-on-fail", - "test": "yarn run test:js && yarn run test:scss", + "test": "concurrently -n \"test:js,test:scss\" -c \"cyan,magenta\" \"yarn test:js\" \"yarn test:scss\"", "test:js": "jest --config=jest.config.js", "test:scss": "jest --config=src/test/scss/jest.config.js", "test:build": "sass --no-source-map --load-path=node_modules --style=compressed src/scss:dist/css", From b314fa54664fda5d8ef74aed60bbc2307f8a901e Mon Sep 17 00:00:00 2001 From: jamieomaguire Date: Wed, 6 Jul 2022 11:06:41 +0100 Subject: [PATCH 4/5] add circleci config --- .circleci/config.yml | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..86b901ad --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,45 @@ +# version: 2.1 # use CircleCI 2.1 +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2.1 + +workflows: + build-and-test: + jobs: + - build: + context: web-core + +jobs: + build: + docker: + # specify the version you desire here + - image: cimg/node:16.15 # For latest available images check – https://circleci.com/docs/2.0/docker-image-tags.json + + working_directory: ~/repo + + steps: # a collection of executable commands + - checkout # special step to check out source code to working directory + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ checksum "yarn.lock" }} + - run: + name: Install Dependencies + command: yarn install --frozen-lockfile + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ~/.cache/yarn + - run: # Lint JS files + name: Run Lint Task on files + command: yarn lint + - run: # run tests + name: Unit Tests + command: yarn test + - store_artifacts: + path: dist + - run: # run PR checks + name: PR Checks (Dangerfile) + command: yarn danger ci From 84b53fbc349595e1a784d7e136c6cee2ba4d0a7a Mon Sep 17 00:00:00 2001 From: Jamie Maguire Date: Wed, 6 Jul 2022 11:32:43 +0100 Subject: [PATCH 5/5] v8.4.0 - Circleci setup (#378) * Add .circleci/config.yml * Add .circleci/config.yml * setup circle * remove travis config --- .circleci/config.yml | 45 ++++++++++++++++++++++++++++++++++++++++++++ .travis.yml | 19 ------------------- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 4 files changed, 57 insertions(+), 20 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..86b901ad --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,45 @@ +# version: 2.1 # use CircleCI 2.1 +# +# Check https://circleci.com/docs/2.0/language-javascript/ for more details +# +version: 2.1 + +workflows: + build-and-test: + jobs: + - build: + context: web-core + +jobs: + build: + docker: + # specify the version you desire here + - image: cimg/node:16.15 # For latest available images check – https://circleci.com/docs/2.0/docker-image-tags.json + + working_directory: ~/repo + + steps: # a collection of executable commands + - checkout # special step to check out source code to working directory + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ checksum "yarn.lock" }} + - run: + name: Install Dependencies + command: yarn install --frozen-lockfile + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ~/.cache/yarn + - run: # Lint JS files + name: Run Lint Task on files + command: yarn lint + - run: # run tests + name: Unit Tests + command: yarn test + - store_artifacts: + path: dist + - run: # run PR checks + name: PR Checks (Dangerfile) + command: yarn danger ci diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 514782f1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js - -node_js: - - "12" - - "10" - -cache: yarn - -sudo: false - -notifications: - email: false - -script: - - yarn test:cover - - yarn danger ci - -after_success: - - yarn run test:cover:CI diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c653da..803d61e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,17 @@ Future Todo List - Make typography and utility classes silent extenders (so that they can be extended by components without importing all utility classes). - Deprecate modal and orderCard component styles in next major version as unused. + +v8.4.0 +------------------------------ +*July 06, 2022* + +### Added +- circleci config file + +### Removed +- unused travis config + v8.3.0 ------------------------------ *June 17, 2022* diff --git a/package.json b/package.json index cb2a7eb5..cf977ff4 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@justeat/fozzie", "title": "Fozzie – Just Eat UI Web Framework", "description": "UI Web Framework for the Just Eat Global Platform", - "version": "8.3.0", + "version": "8.4.0", "main": "dist/js/index.js", "files": [ "dist/js",