From 6f0eeec93b1112cb9bf71863f5961c1aa8b3ae44 Mon Sep 17 00:00:00 2001 From: Wendy Hsu Date: Tue, 24 May 2022 09:28:23 -0700 Subject: [PATCH] Local build works with hard coded branch name(#5994) --- .github/workflows/ci-benchmarks.yml | 88 ++--- package.json | 333 ++++++++-------- packages/utilities/fast-benchmarks/.gitignore | 1 - .../fast-element/localTest/index.ts | 47 +++ .../benchmarks/fast-element/test/index2.ts | 55 --- .../utilities/fast-benchmarks/package.json | 18 +- .../fast-element_localTest-create10k.json | 372 ++++++++++++++++++ .../results/fast-element_test-update10th.json | 372 ++++++++++++++++++ .../fast-benchmarks/results/result.json | 148 ------- .../fast-benchmarks/scripts/index.js | 6 +- .../fast-benchmarks/scripts/template.js | 22 +- .../fast-benchmarks/utils/index.d.ts | 27 -- .../utilities/fast-benchmarks/utils/index.js | 94 ----- .../web-components/fast-element/package.json | 176 ++++----- yarn.lock | 9 +- 15 files changed, 1097 insertions(+), 671 deletions(-) create mode 100644 packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts delete mode 100644 packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts create mode 100644 packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json delete mode 100644 packages/utilities/fast-benchmarks/results/result.json delete mode 100644 packages/utilities/fast-benchmarks/utils/index.d.ts delete mode 100644 packages/utilities/fast-benchmarks/utils/index.js diff --git a/.github/workflows/ci-benchmarks.yml b/.github/workflows/ci-benchmarks.yml index 1d9477ee9f0..c19a2b5865b 100644 --- a/.github/workflows/ci-benchmarks.yml +++ b/.github/workflows/ci-benchmarks.yml @@ -1,15 +1,6 @@ name: Fast Element benchmark jobs -on: - pull_request: - branches: - - master - - releases/* - - features/* - - users/* - push: - paths: - - 'packages/web-components/fast-element/**' +on: [pull_request] jobs: setup: @@ -21,30 +12,9 @@ jobs: with: initialize: true - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo '::set-output name=dir::$(yarn cache dir)' - - - name: Set up node_modules cache - uses: actions/cache@v2 - id: yarn-cache - with: - path: | - ${{ steps.yarn-cache-dir-path.outputs.dir }} - node_modules - */*/node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Install package dependencies - run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - - name: Prepare workspaces - run: yarn prepare - test: - name: Run all operations for test benchmark + update10th: + name: Run update 10th element benchmark needs: [setup] runs-on: ubuntu-latest steps: @@ -52,49 +22,49 @@ jobs: - uses: actions/setup-node@v1 with: node-version: "16.x" - - run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline - - name: Run tachometer + - name: Run tachometer and generate results file run: | cd packages/utilities/fast-benchmarks yarn install yarn run benchmark:fast-element:test - + # Upload this benchmarks results - name: Upload results uses: actions/upload-artifact@v2 with: name: results - path: packages/utilities/fast-benchmarks/results/fast-element_test.json - - # update10th: - # name: Run update 10th element benchmark - # needs: [setup] - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v1 - # with: - # node-version: "16.x" - # - name: Run tachometer and generate results file - # run: | - # cd packages/utilities/fast-benchmarks - # yarn install - # yarn run benchmark:fast-element:update10th - - # - name: Upload results - # uses: actions/upload-artifact@v2 - # with: - # name: results - # path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + path: packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json + create10k: + name: Run create 10k element benchmark + needs: [setup] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: "16.x" + - name: Run tachometer and generate results file + run: | + cd packages/utilities/fast-benchmarks + yarn install + yarn run benchmark:fast-element:test:local + # Upload this benchmarks results + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: results + path: packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json report_results: name: Report Results - needs: [test, update10th] + needs: [update10th, create10k] runs-on: ubuntu-latest steps: + # Download the results artifact - uses: actions/download-artifact@v2 with: name: results path: packages/utilities/fast-benchmarks/results + # Read all the results and post comment - name: Report Tachometer Result uses: andrewiggins/tachometer-reporter-action@v2 diff --git a/package.json b/package.json index 4fa881d9cd3..4ce15d3e370 100644 --- a/package.json +++ b/package.json @@ -1,171 +1,172 @@ { - "name": "@microsoft/fast", - "description": "An unopinionated system of components, development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.", - "version": "1.8.0", - "author": { - "name": "Microsoft", - "url": "https://discord.gg/FcSNfg4" - }, - "license": "MIT", - "private": true, - "workspaces": { - "packages": [ - "packages/**/*", - "sites/fast-color-explorer", - "sites/fast-component-explorer", - "sites/site-utilities", - "sites/fast-website", - "sites/website", - "examples/design-system-tutorial" - ], - "nohoist": [ - "**/@types/chai", - "**/@types/jest", - "**/@types/karma", - "**/@types/mocha", - "**/@types/node", - "**/chai", - "**/html-minifier-terser", - "**/react-syntax-highlighter" - ] - }, - "engines": { - "yarn": ">=1.13 <2" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/fast.git" - }, - "bugs": { - "url": "https://github.com/Microsoft/fast/issues/new/choose" - }, - "scripts": { - "bump": "beachball bump", - "change": "beachball change", - "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", - "check": "beachball check ", - "publish": "beachball publish", - "publish-ci": "beachball publish -y --access public", - "integration-tests:alpha": "node build/testing/sauce-labs/test-browsers.js alpha", - "integration-tests:beta": "node build/testing/sauce-labs/test-browsers.js beta", - "integration-tests:release": "node build/testing/sauce-labs/test-browsers.js release", - "prepare": "lerna run prepare", - "test:diff:error": "echo \"Untracked files exist, try running yarn prepare to identify the culprit.\" && exit 1", - "test:diff": "git update-index --refresh && git diff-index --quiet HEAD -- || yarn test:diff:error", - "test:validation": "yarn test:diff", - "test": "yarn eslint \"/**/*.{ts}\" ", - "unit-tests": "jest --maxWorkers=4", - "coverage": "yarn jest --coverage", - "unit-tests:watch": "jest --watch", - "watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput", - "format:check": "lerna run prettier:diff", - "format": "lerna run prettier" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "jest": { - "collectCoverage": true, - "collectCoverageFrom": [ - "build/helpers/*.ts" - ], - "coverageReporters": [ - "json", - [ - "lcov", - { - "projectRoot": "." + "name": "@microsoft/fast", + "description": "An unopinionated system of components, development tools, and utilities used à la carte or as a suite to build enterprise-grade websites and applications.", + "version": "1.8.0", + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", + "private": true, + "workspaces": { + "packages": [ + "packages/**/*", + "sites/fast-color-explorer", + "sites/fast-component-explorer", + "sites/site-utilities", + "sites/fast-website", + "sites/website", + "examples/design-system-tutorial" + ], + "nohoist": [ + "**/@types/chai", + "**/@types/jest", + "**/@types/karma", + "**/@types/mocha", + "**/@types/node", + "**/chai", + "**/html-minifier-terser", + "**/react-syntax-highlighter" + ] + }, + "engines": { + "yarn": ">=1.13 <2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/fast.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/fast/issues/new/choose" + }, + "scripts": { + "bump": "beachball bump", + "benchmark": "cd packages/utilities/fast-benchmarks && yarn run benchmark:fast-element:test:local", + "change": "beachball change", + "checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"", + "check": "beachball check ", + "publish": "beachball publish", + "publish-ci": "beachball publish -y --access public", + "integration-tests:alpha": "node build/testing/sauce-labs/test-browsers.js alpha", + "integration-tests:beta": "node build/testing/sauce-labs/test-browsers.js beta", + "integration-tests:release": "node build/testing/sauce-labs/test-browsers.js release", + "prepare": "lerna run prepare", + "test:diff:error": "echo \"Untracked files exist, try running yarn prepare to identify the culprit.\" && exit 1", + "test:diff": "git update-index --refresh && git diff-index --quiet HEAD -- || yarn test:diff:error", + "test:validation": "yarn test:diff", + "test": "yarn eslint \"/**/*.{ts}\" ", + "unit-tests": "jest --maxWorkers=4", + "coverage": "yarn jest --coverage", + "unit-tests:watch": "jest --watch", + "watch": "tsc -p ./tsconfig.json -w --preserveWatchOutput", + "format:check": "lerna run prettier:diff", + "format": "lerna run prettier" + }, + "husky": { + "hooks": { + "pre-commit": "npm run benchmark" } - ] - ], - "coverageThreshold": { - "global": { - "statements": 100, - "branches": 100, - "functions": 100, - "lines": 100 - } }, - "testURL": "http://localhost", - "transform": { - "^.+\\.ts?$": "ts-jest", - "^.+\\.js?$": "babel-jest" + "jest": { + "collectCoverage": true, + "collectCoverageFrom": [ + "build/helpers/*.ts" + ], + "coverageReporters": [ + "json", + [ + "lcov", + { + "projectRoot": "." + } + ] + ], + "coverageThreshold": { + "global": { + "statements": 100, + "branches": 100, + "functions": 100, + "lines": 100 + } + }, + "testURL": "http://localhost", + "transform": { + "^.+\\.ts?$": "ts-jest", + "^.+\\.js?$": "babel-jest" + }, + "transformIgnorePatterns": [ + "!/node_modules/lodash-es", + "node_modules/jss-*", + "node_modules/css-vendor" + ], + "testPathIgnorePatterns": [ + "packages/", + "build/helpers/__tests__/*", + "build/helpers/" + ], + "testRegex": "/__tests__/.*\\.(test|spec)\\.(js|ts|tsx)$", + "moduleFileExtensions": [ + "ts", + "js" + ] + }, + "lint-staged": { + "*.{ts,tsx,js,html}": [ + "prettier --write" + ] + }, + "resolutions": { + "@types/react": "*", + "browserslist": "^4.16.5", + "clean-css": "^4.2.3", + "css-select": "^4.2.1", + "dns-packet": "^1.3.4", + "favicons/colors": "1.4.0", + "glob-parent": "^5.1.2", + "immer": "^9.0.6", + "is-svg": "^4.2.2", + "jimp": "^0.16.1", + "jpeg-js": "^0.4.3", + "js-yaml": "^3.13.1", + "karma/colors": "1.4.0", + "lodash": "^4.17.21", + "nanoid": "^3.1.31", + "node-notifier": "^9.0.0", + "trim-newlines": "^4.0.2", + "trim": "^0.0.3", + "typescript": "^3.9.0", + "ua-parser-js": "^0.7.28", + "ws": "^7.4.6", + "xmlhttprequest-ssl": "^1.6.2" }, - "transformIgnorePatterns": [ - "!/node_modules/lodash-es", - "node_modules/jss-*", - "node_modules/css-vendor" - ], - "testPathIgnorePatterns": [ - "packages/", - "build/helpers/__tests__/*", - "build/helpers/" - ], - "testRegex": "/__tests__/.*\\.(test|spec)\\.(js|ts|tsx)$", - "moduleFileExtensions": [ - "ts", - "js" - ] - }, - "lint-staged": { - "*.{ts,tsx,js,html}": [ - "prettier --write" - ] - }, - "resolutions": { - "@types/react": "*", - "browserslist": "^4.16.5", - "clean-css": "^4.2.3", - "css-select": "^4.2.1", - "dns-packet": "^1.3.4", - "favicons/colors": "1.4.0", - "glob-parent": "^5.1.2", - "immer": "^9.0.6", - "is-svg": "^4.2.2", - "jimp": "^0.16.1", - "jpeg-js": "^0.4.3", - "js-yaml": "^3.13.1", - "karma/colors": "1.4.0", - "lodash": "^4.17.21", - "nanoid": "^3.1.31", - "node-notifier": "^9.0.0", - "trim-newlines": "^4.0.2", - "trim": "^0.0.3", - "typescript": "^3.9.0", - "ua-parser-js": "^0.7.28", - "ws": "^7.4.6", - "xmlhttprequest-ssl": "^1.6.2" - }, - "devDependencies": { - "@babel/core": "^7.12.13", - "@babel/preset-env": "^7.12.13", - "@octokit/rest": "^18.0.6", - "@types/jest": "^25.2.1", - "@types/lodash-es": "^4.17.4", - "@types/node": "^15.0.1", - "beachball": "^1.53.1", - "chalk": "^2.4.2", - "copyfiles": "^2.4.1", - "docusaurus-init": "^1.11.0", - "dotenv": "^6.0.0", - "eyes.selenium": "3.6.2", - "glob": "^7.1.2", - "husky": "^4.2.5", - "jest": "^25.4.0", - "lerna": "^3.20.2", - "lint-staged": "^10.1.2", - "markdown-it": "^12.3.2", - "prettier": "2.0.2", - "rimraf": "^3.0.2", - "ts-jest": "^25.4.0", - "ts-node": "^8.8.2", - "typescript": "^3.9.0", - "yargs": "^16.2.0" - }, - "dependencies": { - "saucelabs": "^1.5.0", - "selenium-webdriver": "^3.6.0" - } + "devDependencies": { + "@babel/core": "^7.12.13", + "@babel/preset-env": "^7.12.13", + "@octokit/rest": "^18.0.6", + "@types/jest": "^25.2.1", + "@types/lodash-es": "^4.17.4", + "@types/node": "^15.0.1", + "beachball": "^1.53.1", + "chalk": "^2.4.2", + "copyfiles": "^2.4.1", + "docusaurus-init": "^1.11.0", + "dotenv": "^6.0.0", + "eyes.selenium": "3.6.2", + "glob": "^7.1.2", + "husky": "^4.2.5", + "jest": "^25.4.0", + "lerna": "^3.20.2", + "lint-staged": "^10.1.2", + "markdown-it": "^12.3.2", + "prettier": "2.0.2", + "rimraf": "^3.0.2", + "ts-jest": "^25.4.0", + "ts-node": "^8.8.2", + "typescript": "^3.9.0", + "yargs": "^16.2.0" + }, + "dependencies": { + "saucelabs": "^1.5.0", + "selenium-webdriver": "^3.6.0" + } } diff --git a/packages/utilities/fast-benchmarks/.gitignore b/packages/utilities/fast-benchmarks/.gitignore index 91fccea4af1..00f18cfa9eb 100644 --- a/packages/utilities/fast-benchmarks/.gitignore +++ b/packages/utilities/fast-benchmarks/.gitignore @@ -1,4 +1,3 @@ tsconfig.tsbuildinfo node_modules dist -yarn.lock diff --git a/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts b/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts new file mode 100644 index 00000000000..fe252cb59f1 --- /dev/null +++ b/packages/utilities/fast-benchmarks/benchmarks/fast-element/localTest/index.ts @@ -0,0 +1,47 @@ +import { + attr, + css, + customElement, + FASTElement, + html, + observable, + repeat, +} from "@microsoft/fast-element"; +import { data, RandomItem } from "../../../utils/index.js"; + +@customElement({ + name: "x-item", + template: html` +
+ ${(x: XItem) => x.value} +
+ `, + styles: css` + .item { + display: flex; + } + `, +}) +class XItem extends FASTElement { + @attr value: string | undefined; + onClick(e: MouseEvent) { + console.log(e.type); + } +} + +@customElement({ + name: "x-app", + template: html` +
+ ${repeat( + x => x.items, + html` + + ` + )} +
+ `, +}) +class XApp extends FASTElement { + @observable items: RandomItem[] = data; +} diff --git a/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts b/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts deleted file mode 100644 index ed715e3eec1..00000000000 --- a/packages/utilities/fast-benchmarks/benchmarks/fast-element/test/index2.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - attr, - bind, - css, - customElement, - FASTElement, - html, - oneTime, - repeat, -} from "@microsoft/fast-element"; -import { data, RandomItem } from "../../../utils/index.js"; - -const xItemTemplate = html` -
- ${x => x.value} -
-`; - -const styles = css` - .item { - display: flex; - } -`; -@customElement({ - name: "x-item", - template: xItemTemplate, - styles, -}) -class XItem extends FASTElement { - @attr value: string | undefined; - - onClick(e: MouseEvent) { - console.log(e.type); - } -} - -const xAppTemplate = html` -
- ${repeat( - x => x.items, - html` - - ` - )} -
-`; -@customElement({ - name: "x-app", - template: xAppTemplate, -}) -class XApp extends FASTElement { - items: RandomItem[] = data; -} diff --git a/packages/utilities/fast-benchmarks/package.json b/packages/utilities/fast-benchmarks/package.json index d72effeeaf9..b1430d9ac0f 100644 --- a/packages/utilities/fast-benchmarks/package.json +++ b/packages/utilities/fast-benchmarks/package.json @@ -1,20 +1,26 @@ { - "name": "fast-benchmarks", + "name": "@microsoft/fast-benchmarks", "version": "1.0.0", "description": "utility library benchmarking for FAST libraries", "type": "module", + "private": true, + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", "scripts": { "build": "tsc && tsc --build", "benchmark": "node scripts/index.js", "help": "node ./scripts/index.js --help", - "benchmark:binding": "tach --config examples/fast-element/binding/tachometer.json", + "benchmarks": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", "debug:binding": "tach --config fast-element/binding/tachometer.json --manual", - "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions local latest --localBenchFile=index2" + "benchmark:fast-element:test": "yarn run benchmark --library=fast-element --benchmark=test --versions 1.6.0 1.10.1 --operations=update10th", + "benchmark:fast-element:test:local": "yarn run benchmark --library=fast-element --benchmark=localTest --versions local 1.10.1 --localBenchFile=index2 --operations=create10k", + "link": "rm -f node_modules/@microsoft/fast-element && ln -s ../../web-components/fast-element node_modules/@microsoft/fast-element" }, - "author": "Microsoft", - "license": "ISC", "dependencies": { - "@microsoft/fast-element": "file:../../web-components/fast-element", + "@microsoft/fast-element": "^1.9.0", "tachometer": "^0.5.10" }, "devDependencies": { diff --git a/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json new file mode 100644 index 00000000000..3dc267d1eb0 --- /dev/null +++ b/packages/utilities/fast-benchmarks/results/fast-element_localTest-create10k.json @@ -0,0 +1,372 @@ +{ + "benchmarks": [ + { + "name": "localTest-create10k [create10k]", + "bytesSent": 124156, + "version": "local", + "measurement": { + "name": "create10k", + "mode": "performance", + "entryName": "create10k" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 656.2061180565081, + "high": 665.9272152887461 + }, + "differences": [ + null, + { + "absolute": { + "low": 642.1506750083594, + "high": 651.8717786702281 + }, + "percentChange": { + "low": 4568.648008087548, + "high": 4637.911651537858 + } + }, + { + "absolute": { + "low": -5.490759052563835, + "high": 36.484092396228576 + }, + "percentChange": { + "low": -0.9244285146995573, + "high": 5.725353796795471 + } + }, + { + "absolute": { + "low": 642.1655132091593, + "high": 651.8866148694282 + }, + "percentChange": { + "low": 4573.597207488145, + "high": 4642.902695489103 + } + } + ], + "samples": [ + 681, + 649.8000000119209, + 679.1999999880791, + 665.5, + 654.6000000238419, + 660.8000000119209, + 678, + 668.0999999642372, + 655.1999999880791, + 683.1999999880791, + 688.1000000238419, + 656.3000000119209, + 654.1000000238419, + 675.6000000238419, + 663.1000000238419, + 647.8999999761581, + 654.8000000119209, + 661.8000000119209, + 642.8999999761581, + 656.0999999642372, + 654.5, + 643.7000000476837, + 651.1000000238419, + 673.9000000357628, + 665.6000000238419, + 646.6999999880791, + 675.1000000238419, + 647.5, + 653.4000000357628, + 644.3999999761581 + ] + }, + { + "name": "localTest-create10k [usedJSHeapSize]", + "bytesSent": 124156, + "version": "local", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.049849525352856, + "high": 14.061030141313816 + }, + "differences": [ + { + "absolute": { + "low": -651.8717786702281, + "high": -642.1506750083594 + }, + "percentChange": { + "low": -97.8894798914553, + "high": -97.85816840426678 + } + }, + null, + { + "absolute": { + "low": -651.9313948128939, + "high": -611.0977255220288 + }, + "percentChange": { + "low": -97.89164822784461, + "high": -97.75392395385029 + } + }, + { + "absolute": { + "low": 0.007572614132296841, + "high": 0.022101785867711363 + }, + "percentChange": { + "low": 0.05391137816005071, + "high": 0.1574356756306405 + } + } + ], + "samples": [ + 14.042323, + 14.066664, + 14.063874, + 14.035961, + 14.026999, + 14.046914, + 14.067111, + 14.074182, + 14.037626, + 14.039938, + 14.027129, + 14.063121, + 14.062894, + 14.027526, + 14.059491, + 14.050642, + 14.069321, + 14.066356, + 14.049903, + 14.07867, + 14.047201, + 14.068638, + 14.061324, + 14.059864, + 14.070647, + 14.064498, + 14.043131, + 14.05132, + 14.067982, + 14.071945 + ] + }, + { + "name": "localTest-create10k [create10k]", + "bytesSent": 119298, + "version": "1.8.0", + "measurement": { + "name": "create10k", + "mode": "performance", + "entryName": "create10k" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 625.1531661206998, + "high": 665.9868338808897 + }, + "differences": [ + { + "absolute": { + "low": -36.484092396228576, + "high": 5.490759052563835 + }, + "percentChange": { + "low": -5.515025855381156, + "high": 0.8266434415975789 + } + }, + { + "absolute": { + "low": 611.0977255220288, + "high": 651.9313948128939 + }, + "percentChange": { + "low": 4347.755168459803, + "high": 4638.296746753635 + } + }, + null, + { + "absolute": { + "low": 611.1125629602851, + "high": 651.9462317746376 + }, + "percentChange": { + "low": 4352.458831010695, + "high": 4643.300309243986 + } + } + ], + "samples": [ + 663.6999999880791, + 634.5, + 636.0999999642372, + 635, + 631.8000000119209, + 628.1999999880791, + 641.5, + 636.8999999761581, + 633.5, + 629.0999999642372, + 650, + 634.5, + 631.5, + 634.1999999880791, + 636.8999999761581, + 618.1000000238419, + 626.7999999523163, + 628.1000000238419, + 647.3000000119209, + 628.2000000476837, + 842.9000000357628, + 611.3000000119209, + 630.1000000238419, + 623.3999999761581, + 619.5, + 629.6000000238419, + 650.5, + 840.3999999761581, + 608.8000000119209, + 604.7000000476837 + ] + }, + { + "name": "localTest-create10k [usedJSHeapSize]", + "bytesSent": 119298, + "version": "1.8.0", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.035963380752078, + "high": 14.045241885914587 + }, + "differences": [ + { + "absolute": { + "low": -651.8866148694282, + "high": -642.1655132091593 + }, + "percentChange": { + "low": -97.89170072733121, + "high": -97.86043643486924 + } + }, + { + "absolute": { + "low": -0.022101785867711363, + "high": -0.007572614132296841 + }, + "percentChange": { + "low": -0.1572148999541157, + "high": -0.05390905171073043 + } + }, + { + "absolute": { + "low": -651.9462317746376, + "high": -611.1125629602851 + }, + "percentChange": { + "low": -97.89387216033809, + "high": -97.75629664139802 + } + }, + null + ], + "samples": [ + 14.029456, + 14.012073, + 14.050417, + 14.03265, + 14.032775, + 14.031108, + 14.051811, + 14.049096, + 14.052766, + 14.056264, + 14.055737, + 14.038716, + 14.04397, + 14.056429, + 14.036335, + 14.025586, + 14.044231, + 14.047976, + 14.048912, + 14.044429, + 14.036702, + 14.037932, + 14.049999, + 14.032336, + 14.029085, + 14.052773, + 14.051911, + 14.0107, + 14.049156, + 14.026748 + ] + } + ] +} diff --git a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json index e69de29bb2d..faa8774a6bc 100644 --- a/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json +++ b/packages/utilities/fast-benchmarks/results/fast-element_test-update10th.json @@ -0,0 +1,372 @@ +{ + "benchmarks": [ + { + "name": "test-update10th [update10th]", + "bytesSent": 117574, + "version": "1.6.0", + "measurement": { + "name": "update10th", + "mode": "performance", + "entryName": "update10th" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 418.5574936082805, + "high": 467.8758397210792 + }, + "differences": [ + null, + { + "absolute": { + "low": 404.5068586127215, + "high": 453.8252053833049 + }, + "percentChange": { + "low": 2878.920000977545, + "high": 3229.929060711528 + } + }, + { + "absolute": { + "low": -38.0130234418856, + "high": 36.393023443077716 + }, + "percentChange": { + "low": -8.552411740112492, + "high": 8.187568788003615 + } + }, + { + "absolute": { + "low": 404.4982083011005, + "high": 453.8165549615926 + }, + "percentChange": { + "low": 2877.087529446436, + "high": 3227.879837156517 + } + } + ], + "samples": [ + 393.5, + 402.69999998807907, + 402.7000000178814, + 394.09999999403954, + 408.40000000596046, + 395.09999999403954, + 400.7000000178814, + 538.6999999880791, + 404, + 392.59999999403954, + 438.80000001192093, + 464.2000000178814, + 508.19999998807907, + 434.59999999403954, + 426.2999999821186, + 395.89999997615814, + 426, + 551.7000000178814, + 455.80000001192093, + 455, + 550.5, + 432.7999999821186, + 612.0999999940395, + 405.5, + 411.59999999403954, + 392.19999998807907, + 401, + 393.5, + 612, + 396.2999999821186 + ] + }, + { + "name": "test-update10th [usedJSHeapSize]", + "bytesSent": 117574, + "version": "1.6.0", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.046607207674546, + "high": 14.054662125658789 + }, + "differences": [ + { + "absolute": { + "low": -453.8252053833049, + "high": -404.5068586127215 + }, + "percentChange": { + "low": -97.00622913543458, + "high": -96.65347018390675 + } + }, + null, + { + "absolute": { + "low": -457.8326318196642, + "high": -402.11943217517006 + }, + "percentChange": { + "low": -97.03415553009407, + "high": -96.63710985933523 + } + }, + { + "absolute": { + "low": -0.014102530828603747, + "high": -0.003198202504725076 + }, + "percentChange": { + "low": -0.10029675715130996, + "high": -0.022758812831874104 + } + } + ], + "samples": [ + 14.054687, + 14.066721, + 14.061316, + 14.037834, + 14.038739, + 14.043633, + 14.060127, + 14.039792, + 14.059118, + 14.039964, + 14.054077, + 14.060214, + 14.043143, + 14.05679, + 14.042428, + 14.061754, + 14.034361, + 14.045844, + 14.043341, + 14.026835, + 14.037937, + 14.059991, + 14.058622, + 14.055476, + 14.066783, + 14.053226, + 14.049112, + 14.068376, + 14.0523, + 14.046499 + ] + }, + { + "name": "test-update10th [update10th]", + "bytesSent": 119552, + "version": "1.10.1", + "measurement": { + "name": "update10th", + "mode": "performance", + "entryName": "update10th" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 416.17006713297826, + "high": 471.8832661951893 + }, + "differences": [ + { + "absolute": { + "low": -36.393023443077716, + "high": 38.0130234418856 + }, + "percentChange": { + "low": -8.217856487110584, + "high": 8.58336620744642 + } + }, + { + "absolute": { + "low": 402.11943217517006, + "high": 457.8326318196642 + }, + "percentChange": { + "low": 2861.928669063402, + "high": 3258.4501209065666 + } + }, + null, + { + "absolute": { + "low": 402.1107818572308, + "high": 457.82398140427017 + }, + "percentChange": { + "low": 2860.106608202675, + "high": 3256.383392694746 + } + } + ], + "samples": [ + 398, + 387.09999999403954, + 390.09999999403954, + 387.5, + 389.40000000596046, + 393.5, + 477.59999999403954, + 454.09999999403954, + 411.69999998807907, + 398.5, + 471.59999999403954, + 406.59999999403954, + 444.69999998807907, + 453.40000000596046, + 470.19999998807907, + 437.60000002384186, + 742.4000000059605, + 490, + 449.90000000596046, + 597.5999999940395, + 498, + 527.1999999880791, + 398.19999998807907, + 398.59999999403954, + 424.09999999403954, + 397.09999999403954, + 401.59999999403954, + 413.59999999403954, + 402.40000000596046, + 408.5 + ] + }, + { + "name": "test-update10th [usedJSHeapSize]", + "bytesSent": 119552, + "version": "1.10.1", + "measurement": { + "name": "usedJSHeapSize", + "mode": "expression", + "expression": "window.usedJSHeapSize" + }, + "browser": { + "name": "chrome", + "headless": true, + "windowSize": { + "width": 1024, + "height": 768 + }, + "addArguments": [ + "--js-flags=--expose-gc", + "--enable-precise-memory-info" + ], + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" + }, + "mean": { + "low": 14.055610027467281, + "high": 14.062960039199382 + }, + "differences": [ + { + "absolute": { + "low": -453.8165549615926, + "high": -404.4982083011005 + }, + "percentChange": { + "low": -97.0043856060924, + "high": -96.65141026497308 + } + }, + { + "absolute": { + "low": 0.003198202504725076, + "high": 0.014102530828603747 + }, + "percentChange": { + "low": 0.02274894137609521, + "high": 0.10038238858704586 + } + }, + { + "absolute": { + "low": -457.82398140427017, + "high": -402.1107818572308 + }, + "percentChange": { + "low": -97.03232923909158, + "high": -96.63503982278979 + } + }, + null + ], + "samples": [ + 14.067407, + 14.068533, + 14.064939, + 14.072032, + 14.052961, + 14.041445, + 14.048059, + 14.069951, + 14.059963, + 14.060732, + 14.061753, + 14.0451, + 14.039854, + 14.044865, + 14.058013, + 14.063448, + 14.068704, + 14.047315, + 14.069702, + 14.047309, + 14.061824, + 14.06535, + 14.05915, + 14.045282, + 14.065971, + 14.070905, + 14.06687, + 14.062969, + 14.060151, + 14.067994 + ] + } + ] +} diff --git a/packages/utilities/fast-benchmarks/results/result.json b/packages/utilities/fast-benchmarks/results/result.json deleted file mode 100644 index ae10e971ddf..00000000000 --- a/packages/utilities/fast-benchmarks/results/result.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "benchmarks": [ - { - "name": "my-benchmark-createDelete5x-memory", - "bytesSent": 2462, - "version": "1.8.0", - "measurement": { - "name": "usedJSHeapSize", - "mode": "expression", - "expression": "window.usedJSHeapSize" - }, - "browser": { - "name": "chrome", - "headless": true, - "windowSize": { - "width": 1024, - "height": 768 - }, - "addArguments": [ - "--js-flags=--expose-gc", - "--enable-precise-memory-info" - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" - }, - "mean": { - "low": 2.798855688350844, - "high": 2.8072279116491567 - }, - "differences": [ - null, - { - "absolute": { - "low": -0.006109477419492123, - "high": 0.006640144086160134 - }, - "percentChange": { - "low": -0.21799172212870524, - "high": 0.2369253286071103 - } - } - ], - "samples": [ - 2.808279, - 2.801631, - 2.802211, - 2.808047, - 2.810679, - 2.808827, - 2.804287, - 2.812383, - 2.781763, - 2.810795, - 2.789987, - 2.794883, - 2.811811, - 2.783375, - 2.777799, - 2.806811, - 2.808839, - 2.809983, - 2.812307, - 2.808351, - 2.779391, - 2.808427, - 2.812959, - 2.810375, - 2.811219, - 2.811399, - 2.797831, - 2.809859, - 2.811671, - 2.785075 - ] - }, - { - "name": "my-benchmark-createDelete5x-memory", - "bytesSent": 2462, - "version": "1.9.0", - "measurement": { - "name": "usedJSHeapSize", - "mode": "expression", - "expression": "window.usedJSHeapSize" - }, - "browser": { - "name": "chrome", - "headless": true, - "windowSize": { - "width": 1024, - "height": 768 - }, - "addArguments": [ - "--js-flags=--expose-gc", - "--enable-precise-memory-info" - ], - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/101.0.4951.64 Safari/537.36" - }, - "mean": { - "low": 2.7979686936484023, - "high": 2.8075842396849304 - }, - "differences": [ - { - "absolute": { - "low": -0.006640144086160134, - "high": 0.006109477419492123 - }, - "percentChange": { - "low": -0.23688137250091656, - "high": 0.2179495582601153 - } - }, - null - ], - "samples": [ - 2.809623, - 2.810455, - 2.811059, - 2.810767, - 2.805663, - 2.775991, - 2.811427, - 2.812123, - 2.778291, - 2.812443, - 2.792823, - 2.775027, - 2.811891, - 2.811607, - 2.810131, - 2.810563, - 2.809639, - 2.809727, - 2.811411, - 2.805347, - 2.810707, - 2.805539, - 2.785347, - 2.783935, - 2.776715, - 2.811763, - 2.812499, - 2.807943, - 2.796287, - 2.806551 - ] - } - ] -} diff --git a/packages/utilities/fast-benchmarks/scripts/index.js b/packages/utilities/fast-benchmarks/scripts/index.js index 3a514fc6790..2f489a589d8 100644 --- a/packages/utilities/fast-benchmarks/scripts/index.js +++ b/packages/utilities/fast-benchmarks/scripts/index.js @@ -78,6 +78,8 @@ async function runBenchmark(configPaths, pathNames) { for (let i = 0; i < configPaths.length; i++) { const configPath = configPaths[i]; const pathName = pathNames[i]; + + console.log("path name", pathName); const res = new Promise((resolve, reject) => { const args = [ "tach", @@ -89,7 +91,7 @@ async function runBenchmark(configPaths, pathNames) { child.on("close", code => { if (code !== 0) { reject({ - command: `npx tach --config ${configPath} --json-file=results/${options.benchmark}/${pathName}.json`, + command: `npx tach --config ${configPath} --json-file=results/${pathName}.json`, }); return; } @@ -118,8 +120,10 @@ const run = async () => { options ); await buildBenchmark(tsConfigPath); + await runBenchmark(tachoConfigPaths, pathNames); } catch (error) { + console.error("ERRROR", error); return error; } }; diff --git a/packages/utilities/fast-benchmarks/scripts/template.js b/packages/utilities/fast-benchmarks/scripts/template.js index da5d669f70e..fdc19617efc 100644 --- a/packages/utilities/fast-benchmarks/scripts/template.js +++ b/packages/utilities/fast-benchmarks/scripts/template.js @@ -246,27 +246,9 @@ async function generateBenchmarks( }; } - //adjust some settings to separately report memory benchmark results - // const memoryBench = JSON.parse(JSON.stringify(bench)); - // const memoryMeasurement = [ - // { - // name: "usedJSHeapSize", - // mode: "expression", - // expression: "window.usedJSHeapSize", - // }, - // ]; - // memoryBench.name = `${name}-memory`; - // memoryBench.measurement = memoryMeasurement; - // memoryBench.browser.addArguments = [ - // "--js-flags=--expose-gc", - // "--enable-precise-memory-info", - // ]; - // memoryBenchmarks.push(memoryBench); - if (!memory) benchmarks.push(bench); }); - // tachoData[`${operation}-memory`] = memoryBenchmarks; if (!memory) tachoData[operation] = benchmarks; }); return tachoData; @@ -327,11 +309,11 @@ export async function generateTemplates(options) { try { const tsConfigPath = await generateTsConfig(options); const fileName = `${options.library}_${options.benchmark}`; - //special handling if 'local' version was passed in as an option const localProps = { branchName: "", operationProps: {} }; if (options.versions.includes(LOCAL)) { - localProps.branchName = await getLocalGitBranchName(); + // localProps.branchName = await getLocalGitBranchName(); + localProps.branchName = "users/wendy/local-build-actions"; // check if user passed in localBenchFile for different implementation of local if (options.localBenchFile) localProps.operationProps = await generateHtmlTemplates( diff --git a/packages/utilities/fast-benchmarks/utils/index.d.ts b/packages/utilities/fast-benchmarks/utils/index.d.ts deleted file mode 100644 index 8249a7cd1f3..00000000000 --- a/packages/utilities/fast-benchmarks/utils/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export declare const _random: (max: number) => number; -export declare const adjectives: string[]; -export declare const colours: string[]; -export declare const nouns: string[]; -export declare class RandomItem { - readonly id: number; - label: string; - constructor(id: number); -} -export declare const data: RandomItem[]; -export declare const destroy: (container: { - innerHTML: string; -}) => void; -export declare const getTestStartName: (name: any) => string; -export declare const updateComplete: () => Promise; -declare global { - interface Window { - gc: () => void; - usedJSHeapSize: number; - } - interface Performance { - memory: { - usedJSHeapSize: number; - }; - } -} -export declare function measureMemory(): void; diff --git a/packages/utilities/fast-benchmarks/utils/index.js b/packages/utilities/fast-benchmarks/utils/index.js deleted file mode 100644 index 30e412464ca..00000000000 --- a/packages/utilities/fast-benchmarks/utils/index.js +++ /dev/null @@ -1,94 +0,0 @@ -export const _random = (max) => { - return Math.round(Math.random() * 1000) % max; -}; -//generate 10k, pass this value in -const itemCount = 10000; -let id = 0; -export const adjectives = [ - "pretty", - "large", - "big", - "small", - "tall", - "short", - "long", - "handsome", - "plain", - "quaint", - "clean", - "elegant", - "easy", - "angry", - "crazy", - "helpful", - "mushy", - "odd", - "unsightly", - "adorable", - "important", - "inexpensive", - "cheap", - "expensive", - "fancy", -]; -export const colours = [ - "red", - "yellow", - "blue", - "green", - "pink", - "brown", - "purple", - "brown", - "white", - "black", - "orange", -]; -export const nouns = [ - "table", - "chair", - "house", - "bbq", - "desk", - "car", - "pony", - "cookie", - "sandwich", - "burger", - "pizza", - "mouse", - "keyboard", -]; -export class RandomItem { - constructor(id) { - this.id = id; - this.label = - adjectives[_random(adjectives.length)] + - " " + - colours[_random(colours.length)] + - " " + - nouns[_random(nouns.length)]; - } -} -function generateData(count) { - const data = []; - for (let i = 0; i < count; i++) { - data.push(new RandomItem(++id)); - } - return data; -} -export const data = generateData(itemCount); -export const destroy = (container) => { - container.innerHTML = ""; -}; -export const getTestStartName = (name) => `${name}-start`; -export const updateComplete = () => new Promise(r => requestAnimationFrame(r)); -export function measureMemory() { - if (window && performance && performance.memory) { - // Report results in MBs\ - window.usedJSHeapSize = performance.memory.usedJSHeapSize / 1e6; - } - else { - window.usedJSHeapSize = 0; - } -} diff --git a/packages/web-components/fast-element/package.json b/packages/web-components/fast-element/package.json index dc0711af102..b50a735571d 100644 --- a/packages/web-components/fast-element/package.json +++ b/packages/web-components/fast-element/package.json @@ -1,90 +1,90 @@ { - "name": "@microsoft/fast-element", - "description": "A library for constructing Web Components", - "version": "1.9.0", - "author": { - "name": "Microsoft", - "url": "https://discord.gg/FcSNfg4" - }, - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/Microsoft/fast.git" - }, - "bugs": { - "url": "https://github.com/Microsoft/fast/issues/new/choose" - }, - "main": "dist/esm/index.js", - "type": "module", - "types": "dist/fast-element.d.ts", - "unpkg": "dist/fast-element.min.js", - "sideEffects": [ - "./dist/esm/debug.js", - "./dist/esm/polyfills.js" - ], - "scripts": { - "clean:dist": "node ../../../build/clean.js dist", - "doc": "api-extractor run --local", - "doc:ci": "api-extractor run", - "build": "yarn build:tsc && yarn build:rollup && yarn doc", - "build:rollup": "rollup -c", - "build:tsc": "tsc -p ./tsconfig.json", - "dev": "tsc -p ./tsconfig.json -w", - "tdd": "yarn dev & yarn test-chrome:watch", - "prepare": "yarn clean:dist && yarn build", - "prettier": "prettier --config ../../../.prettierrc --write \"**/*.ts\"", - "prettier:diff": "prettier --config ../../../.prettierrc \"**/*.ts\" --list-different", - "eslint": "eslint . --ext .ts", - "eslint:fix": "eslint . --ext .ts --fix", - "test": "yarn eslint && yarn test-chrome:verbose && yarn doc:ci", - "test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", - "test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", - "test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage", - "test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage --reporter=mocha", - "test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js", - "test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging", - "test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js --reporter=mocha", - "test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha", - "test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage", - "test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage --reporter=mocha" - }, - "devDependencies": { - "@microsoft/api-extractor": "7.19.4", - "@types/chai": "^4.2.11", - "@types/karma": "^5.0.0", - "@types/mocha": "^7.0.2", - "@types/webpack-env": "^1.15.2", - "chai": "^4.2.0", - "esm": "^3.2.25", - "ignore-loader": "^0.1.2", - "istanbul": "^0.4.5", - "istanbul-instrumenter-loader": "^3.0.1", - "jsdom": "^16.2.2", - "jsdom-global": "3.0.2", - "karma": "^5.0.4", - "karma-chrome-launcher": "^3.1.0", - "karma-coverage": "^2.0.2", - "karma-coverage-istanbul-reporter": "^3.0.0", - "karma-firefox-launcher": "^2.1.0", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-source-map-support": "^1.4.0", - "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^4.0.2", - "mocha": "^7.1.2", - "prettier": "2.0.2", - "rollup": "^2.7.6", - "rollup-plugin-filesize": "^9.1.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-transform-tagged-template": "^0.0.3", - "rollup-plugin-typescript2": "^0.27.0", - "source-map": "^0.7.3", - "source-map-loader": "^0.2.4", - "ts-loader": "^7.0.2", - "ts-node": "^8.9.1", - "tsconfig-paths": "^3.9.0", - "tslib": "^1.11.1", - "typescript": "^3.9.0", - "webpack": "^4.44.0" - } + "name": "@microsoft/fast-element", + "description": "A library for constructing Web Components", + "version": "1.9.0", + "author": { + "name": "Microsoft", + "url": "https://discord.gg/FcSNfg4" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/fast.git" + }, + "bugs": { + "url": "https://github.com/Microsoft/fast/issues/new/choose" + }, + "main": "dist/esm/index.js", + "type": "module", + "types": "dist/fast-element.d.ts", + "unpkg": "dist/fast-element.min.js", + "sideEffects": [ + "./dist/esm/debug.js", + "./dist/esm/polyfills.js" + ], + "scripts": { + "clean:dist": "node ../../../build/clean.js dist", + "doc": "api-extractor run --local", + "doc:ci": "api-extractor run", + "build": "yarn build:tsc && yarn build:rollup && yarn doc", + "build:rollup": "rollup -c", + "build:tsc": "tsc -p ./tsconfig.json", + "dev": "tsc -p ./tsconfig.json -w", + "tdd": "yarn dev & yarn test-chrome:watch", + "prepare": "yarn clean:dist && yarn build", + "prettier": "prettier --config ../../../.prettierrc --write \"**/*.ts\"", + "prettier:diff": "prettier --config ../../../.prettierrc \"**/*.ts\" --list-different", + "eslint": "eslint . --ext .ts", + "eslint:fix": "eslint . --ext .ts --fix", + "test": "yarn eslint && yarn test-chrome:verbose && yarn doc:ci", + "test-node": "mocha --reporter min --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", + "test-node:verbose": "mocha --reporter spec --exit dist/esm/__test__/setup-node.js './dist/esm/**/*.spec.js'", + "test-chrome": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage", + "test-chrome:verbose": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --single-run --coverage --reporter=mocha", + "test-chrome:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js", + "test-chrome:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging", + "test-chrome:verbose:watch": "karma start karma.conf.cjs --browsers=ChromeHeadlessOpt --coverage --watch-extensions js --reporter=mocha", + "test-chrome:verbose:debugger": "karma start karma.conf.cjs --browsers=ChromeDebugging --reporter=mocha", + "test-firefox": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage", + "test-firefox:verbose": "karma start karma.conf.cjs --browsers=FirefoxHeadless --single-run --coverage --reporter=mocha" + }, + "devDependencies": { + "@microsoft/api-extractor": "7.19.4", + "@types/chai": "^4.2.11", + "@types/karma": "^5.0.0", + "@types/mocha": "^7.0.2", + "@types/webpack-env": "^1.15.2", + "chai": "^4.2.0", + "esm": "^3.2.25", + "ignore-loader": "^0.1.2", + "istanbul": "^0.4.5", + "istanbul-instrumenter-loader": "^3.0.1", + "jsdom": "^16.2.2", + "jsdom-global": "3.0.2", + "karma": "^5.0.4", + "karma-chrome-launcher": "^3.1.0", + "karma-coverage": "^2.0.2", + "karma-coverage-istanbul-reporter": "^3.0.0", + "karma-firefox-launcher": "^2.1.0", + "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-source-map-support": "^1.4.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-webpack": "^4.0.2", + "mocha": "^7.1.2", + "prettier": "2.0.2", + "rollup": "^2.7.6", + "rollup-plugin-filesize": "^9.1.2", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-transform-tagged-template": "^0.0.3", + "rollup-plugin-typescript2": "^0.27.0", + "source-map": "^0.7.3", + "source-map-loader": "^0.2.4", + "ts-loader": "^7.0.2", + "ts-node": "^8.9.1", + "tsconfig-paths": "^3.9.0", + "tslib": "^1.11.1", + "typescript": "^3.9.0", + "webpack": "^4.44.0" + } } diff --git a/yarn.lock b/yarn.lock index bb3c067d7fa..054325c8536 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3633,9 +3633,6 @@ "@microsoft/fast-jss-utilities" "^4.8.0" "@microsoft/fast-web-utilities" "^4.6.0" -"@microsoft/fast-element@file:packages/web-components/fast-element": - version "1.9.0" - "@microsoft/fast-jss-manager-react@^4.8.0": version "4.8.0" resolved "https://registry.yarnpkg.com/@microsoft/fast-jss-manager-react/-/fast-jss-manager-react-4.8.0.tgz#0694b18e9250a26a443ad0d6ab5938bbca2147ca" @@ -14246,9 +14243,9 @@ immediate@~3.0.5: integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= immer@8.0.1, immer@^9.0.6, immer@^9.0.7: - version "9.0.12" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" - integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== + version "9.0.14" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.14.tgz#e05b83b63999d26382bb71676c9d827831248a48" + integrity sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw== import-fresh@^2.0.0: version "2.0.0"