Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
arch1995 committed Oct 4, 2024
1 parent 0345cb5 commit 51e9204
Show file tree
Hide file tree
Showing 95 changed files with 7,836 additions and 8,470 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backward.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: checkout tkey repo
uses: actions/checkout@v3
uses: actions/checkout@v4
# with:
# path: tkey

Expand All @@ -34,7 +34,7 @@ jobs:
# cd ./tkey

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "npm"
Expand All @@ -45,7 +45,7 @@ jobs:
npm run pack:lerna
- name: Clone comp tests
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: tkey/backward-compatibility-tests
path: backward-compatibility-tests
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/browserTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"

- name: Install Node.js dependencies
run: npm ci

- name: Run Build
run: npm run build && npx playwright install

- name: Browser Test Development Chrome (Mocked)
if: startsWith(matrix.browser, 'chromium')
run: npm run browser-tests:local-mocked-chrome
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/buildMocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:

steps:
- name: checkout tkey repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./tkey

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "npm"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "npm"
Expand All @@ -25,7 +25,7 @@ jobs:
run: npm ci

- name: Build & Lint
run: npm run build
run: npm run lint && npm run build

- name: Test Development
run: npm run test
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
},
"eslint.workingDirectories": [
{
Expand Down
103 changes: 54 additions & 49 deletions karmaBaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ process.env.CHROME_BIN = playwright.chromium.executablePath();
process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath();

const localBrowserConfig = (webpackConfig, karmaConfig, packageConfig) => {
// webpackConfig is an array of 2 objects, first object is for umd environment, second is for cjs environment
const { module, resolve, plugins } = webpackConfig[1] || webpackConfig[0];
return {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "",
Expand All @@ -24,9 +26,9 @@ const localBrowserConfig = (webpackConfig, karmaConfig, packageConfig) => {
frameworks: ["mocha", "webpack"],

webpack: {
module: webpackConfig[0].module,
resolve: webpackConfig[0].resolve,
plugins: webpackConfig[0].plugins,
module,
resolve,
plugins,
},

plugins: ["karma-mocha-reporter", "karma-webkit-launcher", "karma-chrome-launcher", "karma-firefox-launcher", "karma-mocha", "karma-webpack"],
Expand Down Expand Up @@ -61,67 +63,70 @@ const localBrowserConfig = (webpackConfig, karmaConfig, packageConfig) => {
};
};

const browserStackConfig = (webpackConfig, karmaConfig, packageConfig) => ({
browserStack: {
username: process.env.BROWSER_STACK_USERNAME,
accessKey: process.env.BROWSER_STACK_KEY,
project: packageConfig.name,
},
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "",
const browserStackConfig = (webpackConfig, karmaConfig, packageConfig) => {
const { module, resolve, plugins } = webpackConfig[1] || webpackConfig[0];
return {
browserStack: {
username: process.env.BROWSER_STACK_USERNAME,
accessKey: process.env.BROWSER_STACK_KEY,
project: packageConfig.name,
},
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: "",

files: [{ pattern: "./test/*.js" }],
files: [{ pattern: "./test/*.js" }],

preprocessors: {
"./test/*.js": ["webpack"],
},
preprocessors: {
"./test/*.js": ["webpack"],
},

// frameworks to us
frameworks: ["mocha", "webpack"],
// frameworks to us
frameworks: ["mocha", "webpack"],

webpack: {
module: webpackConfig[1].module,
resolve: webpackConfig[1].resolve,
plugins: webpackConfig[1].plugins,
},
webpack: {
module,
resolve,
plugins,
},

plugins: ["karma-webpack", "karma-mocha", "karma-browserstack-launcher"],
plugins: ["karma-webpack", "karma-mocha", "karma-browserstack-launcher"],

client: {
mocha: {
timeout: 0,
client: {
mocha: {
timeout: 0,
},
args: packageConfig.args,
},
args: packageConfig.args,
},

reporters: ["progress", "BrowserStack"],
reporters: ["progress", "BrowserStack"],

// web server port
port: 9876,
// web server port
port: 9876,

concurrency: 1,
concurrency: 1,

singleRun: true,
singleRun: true,

// enable / disable colors in the output (reporters and logs)
colors: true,
// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
logLevel: karmaConfig.LOG_INFO,
// level of logging
logLevel: karmaConfig.LOG_INFO,

// define browsers
customLaunchers: {
bs_firefox_windows: {
base: "BrowserStack",
browser: "Chrome",
browser_version: "90.0",
os: "Windows",
os_version: "10",
video: false,
// define browsers
customLaunchers: {
bs_firefox_windows: {
base: "BrowserStack",
browser: "Chrome",
browser_version: "90.0",
os: "Windows",
os_version: "10",
video: false,
},
},
},

browsers: ["bs_firefox_windows"],
});
browsers: ["bs_firefox_windows"],
};
};

module.exports = { localBrowserConfig, browserStackConfig };
Loading

0 comments on commit 51e9204

Please sign in to comment.