From deaf96717757bee9c098c32c87e0f9757aa28d91 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Tue, 6 Jan 2026 17:42:14 +0600 Subject: [PATCH 1/9] wip --- .gitignore | 1 + lib/index.browser.ts | 1 - package-lock.json | 37 ++++++-- package.json | 17 +++- rollup.config.new.js | 195 +++++++++++++++++++++++++++++++++++++++++++ tsconfig.build.json | 11 +++ tsconfig.json | 1 + 7 files changed, 252 insertions(+), 11 deletions(-) create mode 100644 rollup.config.new.js create mode 100644 tsconfig.build.json diff --git a/.gitignore b/.gitignore index 71c227dbc..0dbfdca60 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ lerna-debug.log coverage/ dist/ +.build/ # user-specific ignores ought to be defined in user's `core.excludesfile` .idea/* diff --git a/lib/index.browser.ts b/lib/index.browser.ts index 79e5968bf..9891037d8 100644 --- a/lib/index.browser.ts +++ b/lib/index.browser.ts @@ -27,7 +27,6 @@ import { Platform } from './platform_support'; * null on error */ - export const createInstance = function(config: Config): Client { const client = getOptimizelyInstance({ ...config, diff --git a/package-lock.json b/package-lock.json index a55aef60f..81bb5d185 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", + "@rollup/plugin-alias": "^3.1.9", "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@types/chai": "^4.2.11", @@ -58,6 +59,7 @@ "ts-loader": "^9.3.1", "ts-node": "^8.10.2", "tsconfig-paths": "^4.2.0", + "tslib": "^2.8.1", "typescript": "^4.7.4", "vite": "^6.4.1", "vitest": "^3.2.4", @@ -2039,6 +2041,22 @@ } } }, + "node_modules/@rollup/plugin-alias": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz", + "integrity": "sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "slash": "^3.0.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, "node_modules/@rollup/plugin-commonjs": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz", @@ -5124,9 +5142,9 @@ } }, "node_modules/coveralls-next/node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", "dependencies": { @@ -11591,6 +11609,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/rollup-plugin-typescript2/node_modules/tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", + "dev": true, + "license": "0BSD" + }, "node_modules/rollup-pluginutils": { "version": "2.8.2", "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", @@ -13157,9 +13182,9 @@ } }, "node_modules/tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, diff --git a/package.json b/package.json index 9ea6a2e21..60af2a94f 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ } }, "scripts": { - "clean": "rm -rf dist", - "clean:win": "(if exist dist rd /s/q dist)", + "clean": "rm -rf dist .build", + "clean:win": "(if exist dist rd /s/q dist) && (if exist .build rd /s/q .build)", "lint": "tsc --noEmit && eslint 'lib/**/*.js' 'lib/**/*.ts'", "validate-platform-isolation": "./scripts/platform-validator.js --validate", "fix-platform-export": "./scripts/platform-validator.js --fix-export", @@ -75,9 +75,16 @@ "test-umdbrowser": "npm run build-browser-umd && karma start karma.umd.conf.js --single-run", "test-karma-local": "karma start karma.local_chrome.bs.conf.js && npm run build-browser-umd && karma start karma.local_chrome.umd.conf.js", "prebuild": "npm run clean", +<<<<<<< HEAD "build": "npm run validate-platform-isolation && tsc --noEmit && npm run genmsg && rollup -c && cp dist/index.browser.d.ts dist/index.d.ts", "build:win": "tsc --noEmit && npm run genmsg && rollup -c && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", "build-browser-umd": "npm run validate-platform-isolation && tsc --noEmit && npm run genmsg && rollup -c --config-umd", +======= + "compile": "tsc -p tsconfig.build.json", + "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && cp dist/index.browser.d.ts dist/index.d.ts", + "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", + "build-browser-umd": "npm run compile && rollup -c rollup.config.new.js --config-umd", +>>>>>>> dddfddaf (wip) "coveralls": "nyc --reporter=lcov npm test", "prepare": "npm run build", "prepublishOnly": "npm test", @@ -108,6 +115,7 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", + "@rollup/plugin-alias": "^3.1.9", "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-node-resolve": "^7.1.1", "@types/chai": "^4.2.11", @@ -149,11 +157,12 @@ "ts-loader": "^9.3.1", "ts-node": "^8.10.2", "tsconfig-paths": "^4.2.0", + "tslib": "^2.8.1", "typescript": "^4.7.4", "vite": "^6.4.1", "vitest": "^3.2.4", - "webpack": "^5.94.0", - "webdriverio": "^9.21.0" + "webdriverio": "^9.21.0", + "webpack": "^5.94.0" }, "peerDependencies": { "@react-native-async-storage/async-storage": ">=1.0.0 <3.0.0", diff --git a/rollup.config.new.js b/rollup.config.new.js new file mode 100644 index 000000000..c5e3a860b --- /dev/null +++ b/rollup.config.new.js @@ -0,0 +1,195 @@ +/** + * Copyright 2020-2022 Optimizely + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import commonjs from '@rollup/plugin-commonjs'; +import { terser } from 'rollup-plugin-terser'; +import resolve from '@rollup/plugin-node-resolve'; +import alias from '@rollup/plugin-alias'; +import { dependencies, peerDependencies } from './package.json'; + +const aliasPlugin = alias({ + entries: [ + { find: 'error_message', replacement: './.build/message/error_message.gen.js' }, + { find: 'log_message', replacement: './.build/message/log_message.gen.js' }, + ] +}); + +const cjsBundleFor = (platform, opt = {}) => { + const { minify, ext } = { + minify: true, + ext: '.js', + ...opt, + }; + + const min = minify ? '.min' : ''; + + return { + plugins: [aliasPlugin, resolve(), commonjs()], + external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), + input: `.build/index.${platform}.js`, + output: { + exports: 'named', + format: 'cjs', + file: `dist/index.${platform}${min}${ext}`, + plugins: minify ? [terser()] : undefined, + sourcemap: true, + }, + } +}; + +const esmBundleFor = (platform, opt) => { + const { minify, ext } = { + minify: true, + ext: '.js', + ...opt, + }; + + const min = minify ? '.min' : ''; + + return { + ...cjsBundleFor(platform), + output: [ + { + format: 'es', + file: `dist/index.${platform}.es${min}${ext}`, + plugins: minify ? [terser()] : undefined, + sourcemap: true, + }, + ], + } +}; + +const cjsBundleForUAParser = (opt = {}) => { + const { minify, ext } = { + minify: true, + ext: '.js', + ...opt, + }; + + const min = minify ? '.min' : ''; + + return { + plugins: [aliasPlugin, resolve(), commonjs()], + external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), + input: `.build/odp/ua_parser/ua_parser.js`, + output: { + exports: 'named', + format: 'cjs', + file: `dist/ua_parser${min}${ext}`, + plugins: minify ? [terser()] : undefined, + sourcemap: true, + }, + }; +}; + +const esmBundleForUAParser = (opt = {}) => { + const { minify, ext } = { + minify: true, + ext: '.js', + ...opt, + }; + + const min = minify ? '.min' : ''; + + return { + ...cjsBundleForUAParser(), + output: [ + { + format: 'es', + file: `dist/ua_parser.es${min}${ext}`, + plugins: minify ? [terser()] : undefined, + sourcemap: true, + }, + ], + }; +}; + +const umdBundle = { + plugins: [ + aliasPlugin, + resolve({ browser: true }), + commonjs({ + namedExports: { + '@optimizely/js-sdk-event-processor': ['LogTierV1EventProcessor', 'LocalStoragePendingEventsDispatcher'], + 'json-schema': ['validate'], + }, + }), + ], + input: '.build/index.browser.js', + output: [ + { + name: 'optimizelySdk', + format: 'umd', + file: 'dist/optimizely.browser.umd.js', + exports: 'named', + }, + { + name: 'optimizelySdk', + format: 'umd', + file: 'dist/optimizely.browser.umd.min.js', + exports: 'named', + plugins: [terser()], + sourcemap: true, + }, + ], +}; + +// A separate bundle for json schema validator. +const jsonSchemaBundle = { + plugins: [aliasPlugin, resolve(), commonjs()], + external: ['json-schema', 'uuid'], + input: '.build/utils/json_schema_validator/index.js', + output: { + exports: 'named', + format: 'cjs', + file: 'dist/optimizely.json_schema_validator.min.js', + plugins: [terser()], + sourcemap: true, + }, +}; + +const bundles = { + 'cjs-node-min': cjsBundleFor('node'), + 'cjs-browser-min': cjsBundleFor('browser'), + 'cjs-react-native-min': cjsBundleFor('react_native'), + 'cjs-universal': cjsBundleFor('universal'), + 'esm-browser-min': esmBundleFor('browser'), + 'esm-node-min': esmBundleFor('node', { ext: '.mjs' }), + 'esm-react-native-min': esmBundleFor('react_native'), + 'esm-universal': esmBundleFor('universal'), + 'json-schema': jsonSchemaBundle, + 'cjs-ua-parser-min': cjsBundleForUAParser(), + 'esm-ua-parser-min': esmBundleForUAParser(), + umd: umdBundle, +}; + +// Collect all --config-* options and return the matching bundle configs +// Builds all bundles if no --config-* option given +// --config-cjs will build all three cjs-* bundles +// --config-umd will build only the umd bundle +// --config-umd --config-json will build both umd and the json-schema bundles +export default args => { + const patterns = Object.keys(args) + .filter(arg => arg.startsWith('config-')) + .map(arg => arg.replace(/config-/, '')); + + // default to matching all bundles + if (!patterns.length) patterns.push(/.*/); + + return Object.entries(bundles) + .filter(([name, config]) => patterns.some(pattern => name.match(pattern))) + .map(([name, config]) => config); +}; diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 000000000..fa07c8cf1 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "./.build", + "declarationDir": "./dist", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "noEmit": false + } +} diff --git a/tsconfig.json b/tsconfig.json index e70a7ce62..281d8595c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "DOM", ], "declaration": true, + "importHelpers": true, "strict": true, "noImplicitThis": true, "noImplicitReturns": true, From 80fbb89c8e6b69f95c988ffa88d6a2d48218cb0d Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Tue, 6 Jan 2026 21:10:16 +0600 Subject: [PATCH 2/9] updage --- package-lock.json | 1111 +++++++++------------ package.json | 17 +- rollup.config.js | 216 ---- rollup.config.new.js => rollup.config.mjs | 44 +- 4 files changed, 501 insertions(+), 887 deletions(-) delete mode 100644 rollup.config.js rename rollup.config.new.js => rollup.config.mjs (81%) diff --git a/package-lock.json b/package-lock.json index 81bb5d185..3f9127822 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,9 +17,10 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^3.1.9", - "@rollup/plugin-commonjs": "^11.0.2", - "@rollup/plugin-node-resolve": "^7.1.1", + "@rollup/plugin-alias": "^6.0.0", + "@rollup/plugin-commonjs": "^29.0.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^0.4.4", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -52,9 +53,7 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "2.79.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-typescript2": "^0.27.1", + "rollup": "^4.55.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", @@ -269,6 +268,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz", "integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -278,6 +278,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz", "integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -297,6 +298,7 @@ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", "@babel/types": "^7.28.4" @@ -613,6 +615,7 @@ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.5.tgz", "integrity": "sha512-qQ5m48eI/MFLQ5PxQj4PFaprjyCTLI37ElWMmNs0K8Lk3dVeOdNpB3ks8jc7yM5CDmVC73eMVk/trk3fgmrUpA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" @@ -1074,9 +1077,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", - "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1346,13 +1349,23 @@ "camelcase": "^5.3.1", "find-up": "^4.1.0", "get-package-type": "^0.1.0", - "js-yaml": "^4.1.1", + "js-yaml": "^3.13.1", "resolve-from": "^5.0.0" }, "engines": { "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -1367,6 +1380,20 @@ "node": ">=8" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -1782,6 +1809,7 @@ "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-2.2.0.tgz", "integrity": "sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw==", "dev": true, + "license": "MIT", "dependencies": { "merge-options": "^3.0.4" }, @@ -2042,85 +2070,125 @@ } }, "node_modules/@rollup/plugin-alias": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-3.1.9.tgz", - "integrity": "sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-6.0.0.tgz", + "integrity": "sha512-tPCzJOtS7uuVZd+xPhoy5W4vThe6KWXNmsFCNktaAh5RTqcLiSfT4huPQIXkgJ6YCOjJHvecOAzQxLFhPxKr+g==", "dev": true, "license": "MIT", - "dependencies": { - "slash": "^3.0.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">=20.19.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": ">=4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-commonjs": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.1.0.tgz", - "integrity": "sha512-Ycr12N3ZPN96Fw2STurD21jMqzKwL9QuFhms3SD7KKRK7oaXUsBU9Zt0jL/rOPHiPYisI21/rXGO3jr9BnLHUA==", + "version": "29.0.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.0.tgz", + "integrity": "sha512-U2YHaxR2cU/yAiwKJtJRhnyLk7cifnQw0zUpISsocBDoHDJn+HTV74ABqnwr5bEgWUwFZC9oFL6wLe21lHu5eQ==", "dev": true, "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.0.8", + "@rollup/pluginutils": "^5.0.1", "commondir": "^1.0.1", - "estree-walker": "^1.0.1", - "glob": "^7.1.2", - "is-reference": "^1.1.2", - "magic-string": "^0.25.2", - "resolve": "^1.11.0" + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" }, "engines": { - "node": ">= 8.0.0" + "node": ">=16.0.0 || 14 >= 14.17" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/plugin-node-resolve": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz", - "integrity": "sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", "dev": true, "license": "MIT", "dependencies": { - "@rollup/pluginutils": "^3.0.8", - "@types/resolve": "0.0.8", - "builtin-modules": "^3.1.0", + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", "is-module": "^1.0.0", - "resolve": "^1.14.2" + "resolve": "^1.22.1" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-terser": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz", + "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "serialize-javascript": "^6.0.1", + "smob": "^1.0.0", + "terser": "^5.17.4" + }, + "engines": { + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" }, "engines": { - "node": ">= 8.0.0" + "node": ">=14.0.0" }, "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.5.tgz", - "integrity": "sha512-iDGS/h7D8t7tvZ1t6+WPK04KD0MwzLZrG0se1hzBjSi5fyxlsiggoJHwh18PCFNn7tG43OWb6pdZ6Y+rMlmyNQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.55.1.tgz", + "integrity": "sha512-9R0DM/ykwfGIlNu6+2U09ga0WXeZ9MRC2Ter8jnz8415VbuIykVuc6bhdrbORFZANDmTDvq26mJrEVTl8TdnDg==", "cpu": [ "arm" ], @@ -2132,9 +2200,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.5.tgz", - "integrity": "sha512-wrSAViWvZHBMMlWk6EJhvg8/rjxzyEhEdgfMMjREHEq11EtJ6IP6yfcCH57YAEca2Oe3FNCE9DSTgU70EIGmVw==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.55.1.tgz", + "integrity": "sha512-eFZCb1YUqhTysgW3sj/55du5cG57S7UTNtdMjCW7LwVcj3dTTcowCsC8p7uBdzKsZYa8J7IDE8lhMI+HX1vQvg==", "cpu": [ "arm64" ], @@ -2146,9 +2214,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.5.tgz", - "integrity": "sha512-S87zZPBmRO6u1YXQLwpveZm4JfPpAa6oHBX7/ghSiGH3rz/KDgAu1rKdGutV+WUI6tKDMbaBJomhnT30Y2t4VQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.55.1.tgz", + "integrity": "sha512-p3grE2PHcQm2e8PSGZdzIhCKbMCw/xi9XvMPErPhwO17vxtvCN5FEA2mSLgmKlCjHGMQTP6phuQTYWUnKewwGg==", "cpu": [ "arm64" ], @@ -2160,9 +2228,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.5.tgz", - "integrity": "sha512-YTbnsAaHo6VrAczISxgpTva8EkfQus0VPEVJCEaboHtZRIb6h6j0BNxRBOwnDciFTZLDPW5r+ZBmhL/+YpTZgA==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.55.1.tgz", + "integrity": "sha512-rDUjG25C9qoTm+e02Esi+aqTKSBYwVTaoS1wxcN47/Luqef57Vgp96xNANwt5npq9GDxsH7kXxNkJVEsWEOEaQ==", "cpu": [ "x64" ], @@ -2174,9 +2242,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.5.tgz", - "integrity": "sha512-1T8eY2J8rKJWzaznV7zedfdhD1BqVs1iqILhmHDq/bqCUZsrMt+j8VCTHhP0vdfbHK3e1IQ7VYx3jlKqwlf+vw==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.55.1.tgz", + "integrity": "sha512-+JiU7Jbp5cdxekIgdte0jfcu5oqw4GCKr6i3PJTlXTCU5H5Fvtkpbs4XJHRmWNXF+hKmn4v7ogI5OQPaupJgOg==", "cpu": [ "arm64" ], @@ -2188,9 +2256,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.5.tgz", - "integrity": "sha512-sHTiuXyBJApxRn+VFMaw1U+Qsz4kcNlxQ742snICYPrY+DDL8/ZbaC4DVIB7vgZmp3jiDaKA0WpBdP0aqPJoBQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.55.1.tgz", + "integrity": "sha512-V5xC1tOVWtLLmr3YUk2f6EJK4qksksOYiz/TCsFHu/R+woubcLWdC9nZQmwjOAbmExBIVKsm1/wKmEy4z4u4Bw==", "cpu": [ "x64" ], @@ -2202,9 +2270,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.5.tgz", - "integrity": "sha512-dV3T9MyAf0w8zPVLVBptVlzaXxka6xg1f16VAQmjg+4KMSTWDvhimI/Y6mp8oHwNrmnmVl9XxJ/w/mO4uIQONA==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.55.1.tgz", + "integrity": "sha512-Rn3n+FUk2J5VWx+ywrG/HGPTD9jXNbicRtTM11e/uorplArnXZYsVifnPPqNNP5BsO3roI4n8332ukpY/zN7rQ==", "cpu": [ "arm" ], @@ -2216,9 +2284,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.5.tgz", - "integrity": "sha512-wIGYC1x/hyjP+KAu9+ewDI+fi5XSNiUi9Bvg6KGAh2TsNMA3tSEs+Sh6jJ/r4BV/bx/CyWu2ue9kDnIdRyafcQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.55.1.tgz", + "integrity": "sha512-grPNWydeKtc1aEdrJDWk4opD7nFtQbMmV7769hiAaYyUKCT1faPRm2av8CX1YJsZ4TLAZcg9gTR1KvEzoLjXkg==", "cpu": [ "arm" ], @@ -2230,9 +2298,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.5.tgz", - "integrity": "sha512-Y+qVA0D9d0y2FRNiG9oM3Hut/DgODZbU9I8pLLPwAsU0tUKZ49cyV1tzmB/qRbSzGvY8lpgGkJuMyuhH7Ma+Vg==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.55.1.tgz", + "integrity": "sha512-a59mwd1k6x8tXKcUxSyISiquLwB5pX+fJW9TkWU46lCqD/GRDe9uDN31jrMmVP3feI3mhAdvcCClhV8V5MhJFQ==", "cpu": [ "arm64" ], @@ -2244,9 +2312,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.5.tgz", - "integrity": "sha512-juaC4bEgJsyFVfqhtGLz8mbopaWD+WeSOYr5E16y+1of6KQjc0BpwZLuxkClqY1i8sco+MdyoXPNiCkQou09+g==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.55.1.tgz", + "integrity": "sha512-puS1MEgWX5GsHSoiAsF0TYrpomdvkaXm0CofIMG5uVkP6IBV+ZO9xhC5YEN49nsgYo1DuuMquF9+7EDBVYu4uA==", "cpu": [ "arm64" ], @@ -2258,9 +2326,23 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.5.tgz", - "integrity": "sha512-rIEC0hZ17A42iXtHX+EPJVL/CakHo+tT7W0pbzdAGuWOt2jxDFh7A/lRhsNHBcqL4T36+UiAgwO8pbmn3dE8wA==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.55.1.tgz", + "integrity": "sha512-r3Wv40in+lTsULSb6nnoudVbARdOwb2u5fpeoOAZjFLznp6tDU8kd+GTHmJoqZ9lt6/Sys33KdIHUaQihFcu7g==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.55.1.tgz", + "integrity": "sha512-MR8c0+UxAlB22Fq4R+aQSPBayvYa3+9DrwG/i1TKQXFYEaoW3B5b/rkSRIypcZDdWjWnpcvxbNaAJDcSbJU3Lw==", "cpu": [ "loong64" ], @@ -2272,9 +2354,23 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.5.tgz", - "integrity": "sha512-T7l409NhUE552RcAOcmJHj3xyZ2h7vMWzcwQI0hvn5tqHh3oSoclf9WgTl+0QqffWFG8MEVZZP1/OBglKZx52Q==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.55.1.tgz", + "integrity": "sha512-3KhoECe1BRlSYpMTeVrD4sh2Pw2xgt4jzNSZIIPLFEsnQn9gAnZagW9+VqDqAHgm1Xc77LzJOo2LdigS5qZ+gw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.55.1.tgz", + "integrity": "sha512-ziR1OuZx0vdYZZ30vueNZTg73alF59DicYrPViG0NEgDVN8/Jl87zkAPu4u6VjZST2llgEUjaiNl9JM6HH1Vdw==", "cpu": [ "ppc64" ], @@ -2286,9 +2382,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.5.tgz", - "integrity": "sha512-7OK5/GhxbnrMcxIFoYfhV/TkknarkYC1hqUw1wU2xUN3TVRLNT5FmBv4KkheSG2xZ6IEbRAhTooTV2+R5Tk0lQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.55.1.tgz", + "integrity": "sha512-uW0Y12ih2XJRERZ4jAfKamTyIHVMPQnTZcQjme2HMVDAHY4amf5u414OqNYC+x+LzRdRcnIG1YodLrrtA8xsxw==", "cpu": [ "riscv64" ], @@ -2300,9 +2396,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.5.tgz", - "integrity": "sha512-GwuDBE/PsXaTa76lO5eLJTyr2k8QkPipAyOrs4V/KJufHCZBJ495VCGJol35grx9xryk4V+2zd3Ri+3v7NPh+w==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.55.1.tgz", + "integrity": "sha512-u9yZ0jUkOED1BFrqu3BwMQoixvGHGZ+JhJNkNKY/hyoEgOwlqKb62qu+7UjbPSHYjiVy8kKJHvXKv5coH4wDeg==", "cpu": [ "riscv64" ], @@ -2314,9 +2410,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.5.tgz", - "integrity": "sha512-IAE1Ziyr1qNfnmiQLHBURAD+eh/zH1pIeJjeShleII7Vj8kyEm2PF77o+lf3WTHDpNJcu4IXJxNO0Zluro8bOw==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.55.1.tgz", + "integrity": "sha512-/0PenBCmqM4ZUd0190j7J0UsQ/1nsi735iPRakO8iPciE7BQ495Y6msPzaOmvx0/pn+eJVVlZrNrSh4WSYLxNg==", "cpu": [ "s390x" ], @@ -2328,9 +2424,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.5.tgz", - "integrity": "sha512-Pg6E+oP7GvZ4XwgRJBuSXZjcqpIW3yCBhK4BcsANvb47qMvAbCjR6E+1a/U2WXz1JJxp9/4Dno3/iSJLcm5auw==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.55.1.tgz", + "integrity": "sha512-a8G4wiQxQG2BAvo+gU6XrReRRqj+pLS2NGXKm8io19goR+K8lw269eTrPkSdDTALwMmJp4th2Uh0D8J9bEV1vg==", "cpu": [ "x64" ], @@ -2342,9 +2438,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.5.tgz", - "integrity": "sha512-txGtluxDKTxaMDzUduGP0wdfng24y1rygUMnmlUJ88fzCCULCLn7oE5kb2+tRB+MWq1QDZT6ObT5RrR8HFRKqg==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.55.1.tgz", + "integrity": "sha512-bD+zjpFrMpP/hqkfEcnjXWHMw5BIghGisOKPj+2NaNDuVT+8Ds4mPf3XcPHuat1tz89WRL+1wbcxKY3WSbiT7w==", "cpu": [ "x64" ], @@ -2355,10 +2451,24 @@ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.55.1.tgz", + "integrity": "sha512-eLXw0dOiqE4QmvikfQ6yjgkg/xDM+MdU9YJuP4ySTibXU0oAvnEWXt7UDJmD4UkYialMfOGFPJnIHSe/kdzPxg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.5.tgz", - "integrity": "sha512-3DFiLPnTxiOQV993fMc+KO8zXHTcIjgaInrqlG8zDp1TlhYl6WgrOHuJkJQ6M8zHEcntSJsUp1XFZSY8C1DYbg==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.55.1.tgz", + "integrity": "sha512-xzm44KgEP11te3S2HCSyYf5zIzWmx3n8HDCc7EE59+lTcswEWNpvMLfd9uJvVX8LCg9QWG67Xt75AuHn4vgsXw==", "cpu": [ "arm64" ], @@ -2370,9 +2480,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.5.tgz", - "integrity": "sha512-nggc/wPpNTgjGg75hu+Q/3i32R00Lq1B6N1DO7MCU340MRKL3WZJMjA9U4K4gzy3dkZPXm9E1Nc81FItBVGRlA==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.55.1.tgz", + "integrity": "sha512-yR6Bl3tMC/gBok5cz/Qi0xYnVbIxGx5Fcf/ca0eB6/6JwOY+SRUcJfI0OpeTpPls7f194as62thCt/2BjxYN8g==", "cpu": [ "arm64" ], @@ -2384,9 +2494,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.5.tgz", - "integrity": "sha512-U/54pTbdQpPLBdEzCT6NBCFAfSZMvmjr0twhnD9f4EIvlm9wy3jjQ38yQj1AGznrNO65EWQMgm/QUjuIVrYF9w==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.55.1.tgz", + "integrity": "sha512-3fZBidchE0eY0oFZBnekYCfg+5wAB0mbpCBuofh5mZuzIU/4jIVkbESmd2dOsFNS78b53CYv3OAtwqkZZmU5nA==", "cpu": [ "ia32" ], @@ -2398,9 +2508,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.5.tgz", - "integrity": "sha512-2NqKgZSuLH9SXBBV2dWNRCZmocgSOx8OJSdpRaEcRlIfX8YrKxUT6z0F1NpvDVhOsl190UFTRh2F2WDWWCYp3A==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.55.1.tgz", + "integrity": "sha512-xGGY5pXj69IxKb4yv/POoocPy/qmEGhimy/FoTpTSVju3FYXUQQMFCaZZXJVidsmGxRioZAwpThl/4zX41gRKg==", "cpu": [ "x64" ], @@ -2412,9 +2522,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.5.tgz", - "integrity": "sha512-JRpZUhCfhZ4keB5v0fe02gQJy05GqboPOaxvjugW04RLSYYoB/9t2lx2u/tMs/Na/1NXfY8QYjgRljRpN+MjTQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.55.1.tgz", + "integrity": "sha512-SPEpaL6DX4rmcXtnhdrQYgzQ5W2uW3SCJch88lB2zImhJRhIIK44fkUrgIV/Q8yUNfw5oyZ5vkeQsZLhCb06lw==", "cpu": [ "x64" ], @@ -2621,9 +2731,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2700,14 +2810,11 @@ } }, "node_modules/@types/resolve": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", - "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } + "license": "MIT" }, "node_modules/@types/semver": { "version": "7.7.1", @@ -3038,16 +3145,6 @@ } } }, - "node_modules/@vitest/browser/node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/@vitest/expect": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz", @@ -3104,9 +3201,9 @@ } }, "node_modules/@vitest/expect/node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", "dev": true, "license": "MIT", "engines": { @@ -3160,13 +3257,6 @@ } } }, - "node_modules/@vitest/mocker/node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, "node_modules/@vitest/mocker/node_modules/estree-walker": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", @@ -3177,16 +3267,6 @@ "@types/estree": "^1.0.0" } }, - "node_modules/@vitest/mocker/node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/@vitest/pretty-format": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz", @@ -3230,16 +3310,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@vitest/snapshot/node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/@vitest/spy": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz", @@ -3269,15 +3339,15 @@ } }, "node_modules/@wdio/config": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.21.0.tgz", - "integrity": "sha512-8TP5/q+Agjc43LET1f0LhLmuEI803O3QtZEbSxOkkvJ7/e1jDWPm4qsL7SjQJlx8xGrW0kwRlPl7+U9Sr0dhCQ==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.23.0.tgz", + "integrity": "sha512-hhtngUG2uCxYmScSEor+k22EVlsTW3ARXgke8NPVeQA4p1+GC2CvRZi4P7nmhRTZubgLrENYYsveFcYR+1UXhQ==", "dev": true, "license": "MIT", "dependencies": { "@wdio/logger": "9.18.0", "@wdio/types": "9.20.0", - "@wdio/utils": "9.21.0", + "@wdio/utils": "9.23.0", "deepmerge-ts": "^7.0.3", "glob": "^10.2.2", "import-meta-resolve": "^4.0.0" @@ -3464,9 +3534,9 @@ "license": "MIT" }, "node_modules/@wdio/utils": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.21.0.tgz", - "integrity": "sha512-aj8ao2V/e6Sv9gZby2ZIj4dMLjwYVba47Nlr+pOfK8N4VKKU0VRLPzvTlfK1HWaoS6u/GBbVx2pefYRrvd72BQ==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.23.0.tgz", + "integrity": "sha512-WhXuVSxEvPw/i34bL1aCHAOi+4g29kRkIMyBShNSxH+Shxh2G91RJYsXm4IAiPMGcC4H6G8T2VcbZ32qnGPm5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -3678,9 +3748,9 @@ "license": "Apache-2.0" }, "node_modules/@zip.js/zip.js": { - "version": "2.8.11", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.11.tgz", - "integrity": "sha512-0fztsk/0ryJ+2PPr9EyXS5/Co7OK8q3zY/xOoozEWaUsL5x+C0cyZ4YyMuUffOO2Dx/rAdq4JMPqW0VUtm+vzA==", + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.13.tgz", + "integrity": "sha512-UcWZ5i9Hlspgo+8q8PUPd9TmDYM62eqfb/0iZ5SF3bqfX/uFUmV660MC9Lsvon7/sidzesXLQlIf8/mbDUf6gQ==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -3896,6 +3966,19 @@ "node": ">= 8" } }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/append-transform": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", @@ -4382,9 +4465,9 @@ } }, "node_modules/basic-ftp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", - "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.1.0.tgz", + "integrity": "sha512-RkaJzeJKDbaDWTIPiJwubyljaEPwpVWkm9Rt5h9Nd6h7tEXTJ3VB4qxdZBioV7JO5yLUaOKwz7vDOzlncUsegw==", "dev": true, "license": "MIT", "engines": { @@ -4608,19 +4691,6 @@ "dev": true, "license": "MIT" }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4709,9 +4779,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001761", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001761.tgz", - "integrity": "sha512-JF9ptu1vP2coz98+5051jZ4PwQgd2ni8A+gYSN7EA7dPKIMf0pDlSUxhdmVOaV3/fYK5uWBkgSXJaRLr4+3A6g==", + "version": "1.0.30001762", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz", + "integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==", "dev": true, "funding": [ { @@ -5141,19 +5211,6 @@ "node": ">=18" } }, - "node_modules/coveralls-next/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/crc-32": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", @@ -5329,6 +5386,16 @@ "dev": true, "license": "MIT" }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/deepmerge-ts": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", @@ -5570,9 +5637,9 @@ } }, "node_modules/edgedriver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.2.0.tgz", - "integrity": "sha512-49G6010o0VYXUMNi5OvxqE9O/kazs0qmJVqHcSHNvp1VfojO21Kb/NaJN40uy11yrlGHRp7y6a372xoCnShzlA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.3.0.tgz", + "integrity": "sha512-ggEQL+oEyIcM4nP2QC3AtCQ04o4kDNefRM3hja0odvlPSnsaxiruMxEZ93v3gDCKWYW6BXUr51PPradb+3nffw==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -5581,7 +5648,7 @@ "@zip.js/zip.js": "^2.8.11", "decamelize": "^6.0.1", "edge-paths": "^3.0.5", - "fast-xml-parser": "^5.3.2", + "fast-xml-parser": "^5.3.3", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.6", "which": "^6.0.0" @@ -5725,9 +5792,9 @@ } }, "node_modules/engine.io": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", - "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", + "version": "6.6.5", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.5.tgz", + "integrity": "sha512-2RZdgEbXmp5+dVbRm0P7HQUImZpICccJy7rN7Tv+SFa55pH+lxnuw6/K1ZxxBfHoYpSkHLAO92oa8O4SwFXA2A==", "dev": true, "license": "MIT", "dependencies": { @@ -5737,9 +5804,9 @@ "base64id": "2.0.0", "cookie": "~0.7.2", "cors": "~2.8.5", - "debug": "~4.3.1", + "debug": "~4.4.1", "engine.io-parser": "~5.2.1", - "ws": "~8.17.1" + "ws": "~8.18.3" }, "engines": { "node": ">=10.2.0" @@ -5755,28 +5822,10 @@ "node": ">=10.0.0" } }, - "node_modules/engine.io/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/engine.io/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", "engines": { @@ -6230,9 +6279,9 @@ } }, "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -6286,9 +6335,9 @@ } }, "node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true, "license": "MIT" }, @@ -6514,9 +6563,9 @@ } }, "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", "dev": true, "license": "ISC", "dependencies": { @@ -6558,6 +6607,24 @@ "pend": "~1.2.0" } }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -8192,6 +8259,20 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-util/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -8315,9 +8396,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", - "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", "dependencies": { @@ -8987,13 +9068,13 @@ } }, "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { - "sourcemap-codec": "^1.4.8" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/make-dir": { @@ -9560,6 +9641,19 @@ "node": ">=8.6" } }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mime": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", @@ -10581,13 +10675,13 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=8.6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" @@ -10726,9 +10820,9 @@ } }, "node_modules/prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.1.tgz", + "integrity": "sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==", "dev": true, "license": "MIT", "dependencies": { @@ -10952,9 +11046,9 @@ } }, "node_modules/qs": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", - "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -11327,6 +11421,19 @@ "node": ">=8.10.0" } }, + "node_modules/readdirp/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/regenerator-runtime": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", @@ -11483,156 +11590,50 @@ } }, "node_modules/rollup": { - "version": "2.79.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.2.tgz", - "integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==", + "version": "4.55.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.55.1.tgz", + "integrity": "sha512-wDv/Ht1BNHB4upNbK74s9usvl7hObDnvVzknxqY/E/O3X6rW1U1rV1aENEfJ54eFZDTNo7zv1f5N4edCluH7+A==", "dev": true, "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=10.0.0" + "node": ">=18.0.0", + "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.55.1", + "@rollup/rollup-android-arm64": "4.55.1", + "@rollup/rollup-darwin-arm64": "4.55.1", + "@rollup/rollup-darwin-x64": "4.55.1", + "@rollup/rollup-freebsd-arm64": "4.55.1", + "@rollup/rollup-freebsd-x64": "4.55.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.55.1", + "@rollup/rollup-linux-arm-musleabihf": "4.55.1", + "@rollup/rollup-linux-arm64-gnu": "4.55.1", + "@rollup/rollup-linux-arm64-musl": "4.55.1", + "@rollup/rollup-linux-loong64-gnu": "4.55.1", + "@rollup/rollup-linux-loong64-musl": "4.55.1", + "@rollup/rollup-linux-ppc64-gnu": "4.55.1", + "@rollup/rollup-linux-ppc64-musl": "4.55.1", + "@rollup/rollup-linux-riscv64-gnu": "4.55.1", + "@rollup/rollup-linux-riscv64-musl": "4.55.1", + "@rollup/rollup-linux-s390x-gnu": "4.55.1", + "@rollup/rollup-linux-x64-gnu": "4.55.1", + "@rollup/rollup-linux-x64-musl": "4.55.1", + "@rollup/rollup-openbsd-x64": "4.55.1", + "@rollup/rollup-openharmony-arm64": "4.55.1", + "@rollup/rollup-win32-arm64-msvc": "4.55.1", + "@rollup/rollup-win32-ia32-msvc": "4.55.1", + "@rollup/rollup-win32-x64-gnu": "4.55.1", + "@rollup/rollup-win32-x64-msvc": "4.55.1", "fsevents": "~2.3.2" } }, - "node_modules/rollup-plugin-terser": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.3.1.tgz", - "integrity": "sha512-1pkwkervMJQGFYvM9nscrUoncPwiKR/K+bHdjv6PFgRo3cgPHoRT83y2Aa3GvINj4539S15t/tpFPb775TDs6w==", - "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/code-frame": "^7.5.5", - "jest-worker": "^24.9.0", - "rollup-pluginutils": "^2.8.2", - "serialize-javascript": "^6.0.2", - "terser": "^4.6.2" - }, - "peerDependencies": { - "rollup": ">=0.66.0 <3" - } - }, - "node_modules/rollup-plugin-terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/rollup-plugin-terser/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/rollup-plugin-terser/node_modules/jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", - "dev": true, - "license": "MIT", - "dependencies": { - "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rollup-plugin-terser/node_modules/supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/rollup-plugin-terser/node_modules/terser": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/rollup-plugin-typescript2": { - "version": "0.27.3", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.3.tgz", - "integrity": "sha512-gmYPIFmALj9D3Ga1ZbTZAKTXq1JKlTQBtj299DXhqYz9cL3g/AQfUvbb2UhH+Nf++cCq941W2Mv7UcrcgLzJJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" - }, - "peerDependencies": { - "rollup": ">=1.26.3", - "typescript": ">=2.4.0" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rollup-plugin-typescript2/node_modules/tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", - "dev": true, - "license": "0BSD" - }, - "node_modules/rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "estree-walker": "^0.6.1" - } - }, - "node_modules/rollup-pluginutils/node_modules/estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true, - "license": "MIT" - }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -11658,9 +11659,9 @@ } }, "node_modules/safaridriver": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safaridriver/-/safaridriver-1.0.0.tgz", - "integrity": "sha512-J92IFbskyo7OYB3Dt4aTdyhag1GlInrfbPCmMteb7aBK7PwlnGz1HI0+oyNN97j7pV9DqUAVoVgkNRMrfY47mQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safaridriver/-/safaridriver-1.0.1.tgz", + "integrity": "sha512-jkg4434cYgtrIF2AeY/X0Wmd2W73cK5qIEFE3hDrrQenJH/2SDJIXGvPAigfvQTcE9+H31zkiNHbUqcihEiMRA==", "dev": true, "license": "MIT", "engines": { @@ -12181,17 +12182,24 @@ "npm": ">= 3.0.0" } }, + "node_modules/smob": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz", + "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==", + "dev": true, + "license": "MIT" + }, "node_modules/socket.io": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.1.tgz", - "integrity": "sha512-oZ7iUCxph8WYRHHcjBEc9unw3adt5CmSNlppj/5Q4k2RIrhl8Z5yY2Xr4j9zj0+wzVZ0bxmYoGSzKJnRl6A4yg==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.8.3.tgz", + "integrity": "sha512-2Dd78bqzzjE6KPkD5fHZmDAKRNe3J15q+YHDrIsy9WEkqttc7GY+kT9OBLSMaPbQaEd0x1BjcmtMtXkfpc+T5A==", "dev": true, "license": "MIT", "dependencies": { "accepts": "~1.3.4", "base64id": "~2.0.0", "cors": "~2.8.5", - "debug": "~4.3.2", + "debug": "~4.4.1", "engine.io": "~6.6.0", "socket.io-adapter": "~2.5.2", "socket.io-parser": "~4.2.4" @@ -12201,38 +12209,20 @@ } }, "node_modules/socket.io-adapter": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz", - "integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==", + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.6.tgz", + "integrity": "sha512-DkkO/dz7MGln0dHn5bmN3pPy+JmywNICWrJqVWiVOyvXjWQFIv9c2h24JrQLLFJ2aQVQf/Cvl1vblnd4r2apLQ==", "dev": true, "license": "MIT", "dependencies": { - "debug": "~4.3.4", - "ws": "~8.17.1" - } - }, - "node_modules/socket.io-adapter/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "debug": "~4.4.1", + "ws": "~8.18.3" } }, "node_modules/socket.io-adapter/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "dev": true, "license": "MIT", "engines": { @@ -12252,55 +12242,19 @@ } }, "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.5.tgz", + "integrity": "sha512-bPMmpy/5WWKHea5Y/jYAP6k74A+hvmRCQaJuJB6I/ML5JZq/KfNieUVo/3Mh7SAqn7TyFdIo6wqYHInG1MU1bQ==", "dev": true, "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "debug": "~4.4.1" }, "engines": { "node": ">=10.0.0" } }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socks": { "version": "2.8.7", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", @@ -12372,14 +12326,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true, - "license": "MIT" - }, "node_modules/spacetrim": { "version": "0.11.59", "resolved": "https://registry.npmjs.org/spacetrim/-/spacetrim-0.11.59.tgz", @@ -12438,6 +12384,13 @@ "node": ">= 10.x" } }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -12977,37 +12930,6 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/tinypool": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", @@ -13286,9 +13208,9 @@ } }, "node_modules/undici": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz", - "integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==", + "version": "7.18.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.1.tgz", + "integrity": "sha512-0L1RtVqD2twa4hYKeNitqG8zvwe+4cT7L2FDP+64QC8mxjA4TlKjSqPLyOjaRdnUnWYQyxKyhDkqOHLKXw+lkA==", "dev": true, "license": "MIT", "engines": { @@ -13528,86 +13450,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/vite/node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/vite/node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, - "node_modules/vite/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/vite/node_modules/rollup": { - "version": "4.53.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.5.tgz", - "integrity": "sha512-iTNAbFSlRpcHeeWu73ywU/8KuU/LZmNCSxp6fjQkJBD3ivUb8tpDrXhIxEzA05HlYMEwmtaUnb3RP+YNv162OQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "1.0.8" - }, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.0.0" - }, - "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.5", - "@rollup/rollup-android-arm64": "4.53.5", - "@rollup/rollup-darwin-arm64": "4.53.5", - "@rollup/rollup-darwin-x64": "4.53.5", - "@rollup/rollup-freebsd-arm64": "4.53.5", - "@rollup/rollup-freebsd-x64": "4.53.5", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.5", - "@rollup/rollup-linux-arm-musleabihf": "4.53.5", - "@rollup/rollup-linux-arm64-gnu": "4.53.5", - "@rollup/rollup-linux-arm64-musl": "4.53.5", - "@rollup/rollup-linux-loong64-gnu": "4.53.5", - "@rollup/rollup-linux-ppc64-gnu": "4.53.5", - "@rollup/rollup-linux-riscv64-gnu": "4.53.5", - "@rollup/rollup-linux-riscv64-musl": "4.53.5", - "@rollup/rollup-linux-s390x-gnu": "4.53.5", - "@rollup/rollup-linux-x64-gnu": "4.53.5", - "@rollup/rollup-linux-x64-musl": "4.53.5", - "@rollup/rollup-openharmony-arm64": "4.53.5", - "@rollup/rollup-win32-arm64-msvc": "4.53.5", - "@rollup/rollup-win32-ia32-msvc": "4.53.5", - "@rollup/rollup-win32-x64-gnu": "4.53.5", - "@rollup/rollup-win32-x64-msvc": "4.53.5", - "fsevents": "~2.3.2" - } - }, "node_modules/vitest": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz", @@ -13720,9 +13562,9 @@ } }, "node_modules/vitest/node_modules/check-error": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", - "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", "dev": true, "license": "MIT", "engines": { @@ -13739,16 +13581,6 @@ "node": ">=6" } }, - "node_modules/vitest/node_modules/magic-string": { - "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.5" - } - }, "node_modules/vitest/node_modules/pathval": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", @@ -13759,19 +13591,6 @@ "node": ">= 14.16" } }, - "node_modules/vitest/node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/vlq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vlq/-/vlq-1.0.1.tgz", @@ -13830,9 +13649,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.4.tgz", - "integrity": "sha512-c5EGNOiyxxV5qmTtAB7rbiXxi1ooX1pQKMLX/MIabJjRA0SJBQOjKF+KSVfHkr9U1cADPon0mRiVe/riyaiDUA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.0.tgz", + "integrity": "sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA==", "dev": true, "license": "MIT", "dependencies": { @@ -13844,19 +13663,19 @@ } }, "node_modules/webdriver": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.21.0.tgz", - "integrity": "sha512-XLOhpU/EFPo4TMk+0fRli4g1WriUujxrfDxGT/QRq0MJsfhSYPF8FdefFdL5gHIrJfSKscaQHGWkbnsHftfqeg==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.23.0.tgz", + "integrity": "sha512-XkZOhjoBOY7maKI3BhDF2rNiDne4wBD6Gw6VUnt4X9b7j9NtfzcCrThBlT0hnA8W77bWNtMRCSpw9Ajy08HqKg==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "9.21.0", + "@wdio/config": "9.23.0", "@wdio/logger": "9.18.0", "@wdio/protocols": "9.16.2", "@wdio/types": "9.20.0", - "@wdio/utils": "9.21.0", + "@wdio/utils": "9.23.0", "deepmerge-ts": "^7.0.3", "https-proxy-agent": "^7.0.6", "undici": "^6.21.3", @@ -13901,9 +13720,9 @@ } }, "node_modules/webdriver/node_modules/undici": { - "version": "6.22.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.22.0.tgz", - "integrity": "sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw==", + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz", + "integrity": "sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==", "dev": true, "license": "MIT", "engines": { @@ -13918,20 +13737,20 @@ "license": "MIT" }, "node_modules/webdriverio": { - "version": "9.21.0", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.21.0.tgz", - "integrity": "sha512-7teaXajOuNdn2UyyKlqMLssJjf0vDEih+Lo+tE/gHOt/P+mB8CinZym4PGtsriZLcyt4xV+Cun3hDmXM+pL26A==", + "version": "9.23.0", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.23.0.tgz", + "integrity": "sha512-Y5y4jpwHvuduUfup+gXTuCU6AROn/k6qOba3st0laFluKHY+q5SHOpQAJdS8acYLwE8caDQ2dXJhmXyxuJrm0Q==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", - "@wdio/config": "9.21.0", + "@wdio/config": "9.23.0", "@wdio/logger": "9.18.0", "@wdio/protocols": "9.16.2", "@wdio/repl": "9.16.2", "@wdio/types": "9.20.0", - "@wdio/utils": "9.21.0", + "@wdio/utils": "9.23.0", "archiver": "^7.0.1", "aria-query": "^5.3.0", "cheerio": "^1.0.0-rc.12", @@ -13948,7 +13767,7 @@ "rgb2hex": "0.2.5", "serialize-error": "^12.0.0", "urlpattern-polyfill": "^10.0.0", - "webdriver": "9.21.0" + "webdriver": "9.23.0" }, "engines": { "node": ">=18.20.0" @@ -14090,13 +13909,6 @@ "node": ">=10.13.0" } }, - "node_modules/webpack/node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, "node_modules/webpack/node_modules/es-module-lexer": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.0.0.tgz", @@ -14108,6 +13920,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", "dev": true, "license": "MIT", "dependencies": { @@ -14263,9 +14076,9 @@ } }, "node_modules/ws": { - "version": "8.18.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", - "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 60af2a94f..46df71556 100644 --- a/package.json +++ b/package.json @@ -81,10 +81,16 @@ "build-browser-umd": "npm run validate-platform-isolation && tsc --noEmit && npm run genmsg && rollup -c --config-umd", ======= "compile": "tsc -p tsconfig.build.json", +<<<<<<< HEAD "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && cp dist/index.browser.d.ts dist/index.d.ts", "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", "build-browser-umd": "npm run compile && rollup -c rollup.config.new.js --config-umd", >>>>>>> dddfddaf (wip) +======= + "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.mjs && cp dist/index.browser.d.ts dist/index.d.ts", + "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.mjs && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", + "build-browser-umd": "npm run compile && rollup -c rollup.config.mjs --config-umd", +>>>>>>> 7932309a (updage) "coveralls": "nyc --reporter=lcov npm test", "prepare": "npm run build", "prepublishOnly": "npm test", @@ -115,9 +121,10 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^3.1.9", - "@rollup/plugin-commonjs": "^11.0.2", - "@rollup/plugin-node-resolve": "^7.1.1", + "@rollup/plugin-alias": "^6.0.0", + "@rollup/plugin-commonjs": "^29.0.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^0.4.4", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -150,9 +157,7 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "2.79.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-typescript2": "^0.27.1", + "rollup": "^4.55.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index f7cc6c247..000000000 --- a/rollup.config.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Copyright 2020-2022 Optimizely - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import commonjs from '@rollup/plugin-commonjs'; -import { terser } from 'rollup-plugin-terser'; -import resolve from '@rollup/plugin-node-resolve'; -import { dependencies, peerDependencies } from './package.json'; -import typescript from 'rollup-plugin-typescript2'; - -const typescriptPluginOptions = { - allowJs: true, - exclude: [ - './dist', - './lib/**/*.tests.js', - './lib/**/*.tests.ts', - './lib/**/*.umdtests.js', - './lib/tests', - 'node_modules', - ], - include: ['./lib/**/*.ts', './lib/**/*.js'], - tsconfigOverride: { - compilerOptions: { - paths: { - "*": [ - "./typings/*" - ], - "error_message": [ - "./lib/message/error_message.gen" - ], - "log_message": [ - "./lib/message/log_message.gen" - ], - } - } - } -}; - -const cjsBundleFor = (platform, opt = {}) => { - const { minify, ext } = { - minify: true, - ext: '.js', - ...opt, - }; - - const min = minify ? '.min' : ''; - - return { - plugins: [resolve(), commonjs(), typescript(typescriptPluginOptions)], - external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), - input: `lib/index.${platform}.ts`, - output: { - exports: 'named', - format: 'cjs', - file: `dist/index.${platform}${min}${ext}`, - plugins: minify ? [terser()] : undefined, - sourcemap: true, - }, - } -}; - -const esmBundleFor = (platform, opt) => { - const { minify, ext } = { - minify: true, - ext: '.js', - ...opt, - }; - - const min = minify ? '.min' : ''; - - return { - ...cjsBundleFor(platform), - output: [ - { - format: 'es', - file: `dist/index.${platform}.es${min}${ext}`, - plugins: minify ? [terser()] : undefined, - sourcemap: true, - }, - ], - } -}; - -const cjsBundleForUAParser = (opt = {}) => { - const { minify, ext } = { - minify: true, - ext: '.js', - ...opt, - }; - - const min = minify ? '.min' : ''; - - return { - plugins: [resolve(), commonjs(), typescript(typescriptPluginOptions)], - external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), - input: `lib/odp/ua_parser/ua_parser.ts`, - output: { - exports: 'named', - format: 'cjs', - file: `dist/ua_parser${min}${ext}`, - plugins: minify ? [terser()] : undefined, - sourcemap: true, - }, - }; -}; - -const esmBundleForUAParser = (opt = {}) => { - const { minify, ext } = { - minify: true, - ext: '.js', - ...opt, - }; - - const min = minify ? '.min' : ''; - - return { - ...cjsBundleForUAParser(), - output: [ - { - format: 'es', - file: `dist/ua_parser.es${min}${ext}`, - plugins: minify ? [terser()] : undefined, - sourcemap: true, - }, - ], - }; -}; - -const umdBundle = { - plugins: [ - resolve({ browser: true }), - commonjs({ - namedExports: { - '@optimizely/js-sdk-event-processor': ['LogTierV1EventProcessor', 'LocalStoragePendingEventsDispatcher'], - 'json-schema': ['validate'], - }, - }), - typescript(typescriptPluginOptions), - ], - input: 'lib/index.browser.ts', - output: [ - { - name: 'optimizelySdk', - format: 'umd', - file: 'dist/optimizely.browser.umd.js', - exports: 'named', - }, - { - name: 'optimizelySdk', - format: 'umd', - file: 'dist/optimizely.browser.umd.min.js', - exports: 'named', - plugins: [terser()], - sourcemap: true, - }, - ], -}; - -// A separate bundle for json schema validator. -const jsonSchemaBundle = { - plugins: [resolve(), commonjs(), typescript(typescriptPluginOptions)], - external: ['json-schema', 'uuid'], - input: 'lib/utils/json_schema_validator/index.ts', - output: { - exports: 'named', - format: 'cjs', - file: 'dist/optimizely.json_schema_validator.min.js', - plugins: [terser()], - sourcemap: true, - }, -}; - -const bundles = { - 'cjs-node-min': cjsBundleFor('node'), - 'cjs-browser-min': cjsBundleFor('browser'), - 'cjs-react-native-min': cjsBundleFor('react_native'), - 'cjs-universal': cjsBundleFor('universal'), - 'esm-browser-min': esmBundleFor('browser'), - 'esm-node-min': esmBundleFor('node', { ext: '.mjs' }), - 'esm-react-native-min': esmBundleFor('react_native'), - 'esm-universal': esmBundleFor('universal'), - 'json-schema': jsonSchemaBundle, - 'cjs-ua-parser-min': cjsBundleForUAParser(), - 'esm-ua-parser-min': esmBundleForUAParser(), - umd: umdBundle, -}; - -// Collect all --config-* options and return the matching bundle configs -// Builds all bundles if no --config-* option given -// --config-cjs will build all three cjs-* bundles -// --config-umd will build only the umd bundle -// --config-umd --config-json will build both umd and the json-schema bundles -export default args => { - const patterns = Object.keys(args) - .filter(arg => arg.startsWith('config-')) - .map(arg => arg.replace(/config-/, '')); - - // default to matching all bundles - if (!patterns.length) patterns.push(/.*/); - - return Object.entries(bundles) - .filter(([name, config]) => patterns.some(pattern => name.match(pattern))) - .map(([name, config]) => config); -}; diff --git a/rollup.config.new.js b/rollup.config.mjs similarity index 81% rename from rollup.config.new.js rename to rollup.config.mjs index c5e3a860b..4150117b5 100644 --- a/rollup.config.new.js +++ b/rollup.config.mjs @@ -1,5 +1,5 @@ /** - * Copyright 2020-2022 Optimizely + * Copyright 2020-2022, 2025 Optimizely * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,32 @@ */ import commonjs from '@rollup/plugin-commonjs'; -import { terser } from 'rollup-plugin-terser'; -import resolve from '@rollup/plugin-node-resolve'; +import nodeResolve from '@rollup/plugin-node-resolve'; +import terser from '@rollup/plugin-terser'; import alias from '@rollup/plugin-alias'; -import { dependencies, peerDependencies } from './package.json'; +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; +import { dirname, join } from 'path'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const require = createRequire(import.meta.url); +const { dependencies, peerDependencies } = require('./package.json'); + +const resolvePlugin = nodeResolve({ + extensions: ['.js'] +}); + +const resolvePluginBrowser = nodeResolve({ + browser: true, + extensions: ['.js'] +}); const aliasPlugin = alias({ entries: [ - { find: 'error_message', replacement: './.build/message/error_message.gen.js' }, - { find: 'log_message', replacement: './.build/message/log_message.gen.js' }, + { find: 'error_message', replacement: join(__dirname, '.build/message/error_message.gen.js') }, + { find: 'log_message', replacement: join(__dirname, '.build/message/log_message.gen.js') }, ] }); @@ -37,7 +54,7 @@ const cjsBundleFor = (platform, opt = {}) => { const min = minify ? '.min' : ''; return { - plugins: [aliasPlugin, resolve(), commonjs()], + plugins: [aliasPlugin, resolvePlugin, commonjs()], external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), input: `.build/index.${platform}.js`, output: { @@ -82,7 +99,7 @@ const cjsBundleForUAParser = (opt = {}) => { const min = minify ? '.min' : ''; return { - plugins: [aliasPlugin, resolve(), commonjs()], + plugins: [aliasPlugin, resolvePlugin, commonjs()], external: ['https', 'http', 'url'].concat(Object.keys({ ...dependencies, ...peerDependencies } || {})), input: `.build/odp/ua_parser/ua_parser.js`, output: { @@ -120,13 +137,8 @@ const esmBundleForUAParser = (opt = {}) => { const umdBundle = { plugins: [ aliasPlugin, - resolve({ browser: true }), - commonjs({ - namedExports: { - '@optimizely/js-sdk-event-processor': ['LogTierV1EventProcessor', 'LocalStoragePendingEventsDispatcher'], - 'json-schema': ['validate'], - }, - }), + resolvePluginBrowser, + commonjs(), ], input: '.build/index.browser.js', output: [ @@ -149,7 +161,7 @@ const umdBundle = { // A separate bundle for json schema validator. const jsonSchemaBundle = { - plugins: [aliasPlugin, resolve(), commonjs()], + plugins: [aliasPlugin, resolvePlugin, commonjs()], external: ['json-schema', 'uuid'], input: '.build/utils/json_schema_validator/index.js', output: { From 52a488e6a2b81a410965699e6e4cfb5ad944169e Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Tue, 6 Jan 2026 22:17:03 +0600 Subject: [PATCH 3/9] upd --- package.json | 23 ++++++----------------- tsconfig.build.json | 11 ----------- tsconfig.json | 4 +++- 3 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 tsconfig.build.json diff --git a/package.json b/package.json index 46df71556..ef8374323 100644 --- a/package.json +++ b/package.json @@ -75,22 +75,10 @@ "test-umdbrowser": "npm run build-browser-umd && karma start karma.umd.conf.js --single-run", "test-karma-local": "karma start karma.local_chrome.bs.conf.js && npm run build-browser-umd && karma start karma.local_chrome.umd.conf.js", "prebuild": "npm run clean", -<<<<<<< HEAD - "build": "npm run validate-platform-isolation && tsc --noEmit && npm run genmsg && rollup -c && cp dist/index.browser.d.ts dist/index.d.ts", - "build:win": "tsc --noEmit && npm run genmsg && rollup -c && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", - "build-browser-umd": "npm run validate-platform-isolation && tsc --noEmit && npm run genmsg && rollup -c --config-umd", -======= "compile": "tsc -p tsconfig.build.json", -<<<<<<< HEAD "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && cp dist/index.browser.d.ts dist/index.d.ts", "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", "build-browser-umd": "npm run compile && rollup -c rollup.config.new.js --config-umd", ->>>>>>> dddfddaf (wip) -======= - "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.mjs && cp dist/index.browser.d.ts dist/index.d.ts", - "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.mjs && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", - "build-browser-umd": "npm run compile && rollup -c rollup.config.mjs --config-umd", ->>>>>>> 7932309a (updage) "coveralls": "nyc --reporter=lcov npm test", "prepare": "npm run build", "prepublishOnly": "npm test", @@ -121,10 +109,9 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^6.0.0", - "@rollup/plugin-commonjs": "^29.0.0", - "@rollup/plugin-node-resolve": "^16.0.3", - "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-alias": "^3.1.9", + "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-node-resolve": "^7.1.1", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -157,7 +144,9 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "^4.55.1", + "rollup": "2.79.2", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-typescript2": "^0.27.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", diff --git a/tsconfig.build.json b/tsconfig.build.json deleted file mode 100644 index fa07c8cf1..000000000 --- a/tsconfig.build.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./.build", - "declarationDir": "./dist", - "declaration": true, - "declarationMap": true, - "sourceMap": true, - "noEmit": false - } -} diff --git a/tsconfig.json b/tsconfig.json index 281d8595c..b3d1744e4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,13 +27,15 @@ }, "resolveJsonModule": true, "allowJs": true, - "outDir": "./dist", + "outDir": "./.build", + "declarationDir": "./dist", "sourceMap": true, "skipLibCheck": true, "useUnknownInCatchVariables": false }, "exclude": [ "./dist", + "./.build", "./lib/**/*.tests.js", "./lib/**/*.tests.ts", "./lib/**/*.spec.ts", From 3ad5a43e7dfefa9ff5095840876d54c9bb11e4eb Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 19:47:00 +0600 Subject: [PATCH 4/9] add ts check --- .github/workflows/javascript.yml | 16 + package.json | 3 +- scripts/run-ts-example.js | 100 ++++++ ts-example/.gitignore | 4 + ts-example/README.md | 56 ++++ ts-example/datafile-server.js | 58 ++++ ts-example/datafile.json | 507 +++++++++++++++++++++++++++++++ ts-example/package-lock.json | 143 +++++++++ ts-example/package.json | 19 ++ ts-example/src/index.ts | 206 +++++++++++++ ts-example/tsconfig.json | 17 ++ 11 files changed, 1128 insertions(+), 1 deletion(-) create mode 100755 scripts/run-ts-example.js create mode 100644 ts-example/.gitignore create mode 100644 ts-example/README.md create mode 100755 ts-example/datafile-server.js create mode 100644 ts-example/datafile.json create mode 100644 ts-example/package-lock.json create mode 100644 ts-example/package.json create mode 100644 ts-example/src/index.ts create mode 100644 ts-example/tsconfig.json diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 73372c500..c2917f8c5 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -26,6 +26,22 @@ jobs: npm install npm run lint + ts-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 20 + cache-dependency-path: ./package-lock.json + cache: 'npm' + - name: Run TypeScript example + working-directory: . + run: | + npm install + npm run ts-example + integration_tests: uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@master secrets: diff --git a/package.json b/package.json index ef8374323..192344b16 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,8 @@ "prepare": "npm run build", "prepublishOnly": "npm test", "postbuild:win": "@powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.min.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.min.d.ts\"", - "genmsg": "jiti message_generator ./lib/message/error_message.ts ./lib/message/log_message.ts" + "genmsg": "jiti message_generator ./lib/message/error_message.ts ./lib/message/log_message.ts", + "ts-example": "node ./scripts/run-ts-example.js" }, "repository": { "type": "git", diff --git a/scripts/run-ts-example.js b/scripts/run-ts-example.js new file mode 100755 index 000000000..de5b0b541 --- /dev/null +++ b/scripts/run-ts-example.js @@ -0,0 +1,100 @@ +#!/usr/bin/env node + +/** + * Script to build the SDK and run the TypeScript example + */ + +const { execSync, spawn } = require('child_process'); +const path = require('path'); + +const rootDir = path.join(__dirname, '..'); +const exampleDir = path.join(rootDir, 'ts-example'); + +let datafileServer = null; + +function run(command, cwd) { + console.log(`\n> ${command}`); + console.log(` (in ${cwd})\n`); + try { + execSync(command, { + cwd, + stdio: 'inherit', + shell: true + }); + } catch (error) { + console.error(`\nError executing: ${command}`); + cleanup(); + process.exit(1); + } +} + +function startDatafileServer() { + console.log('\n=== Starting Datafile Server ==='); + console.log('Starting server at http://localhost:8910...\n'); + + const serverPath = path.join(exampleDir, 'datafile-server.js'); + datafileServer = spawn('node', [serverPath], { + stdio: 'inherit', + detached: false + }); + + datafileServer.on('error', (error) => { + console.error('Failed to start datafile server:', error); + process.exit(1); + }); + + // Give the server time to start + return new Promise((resolve) => setTimeout(resolve, 1000)); +} + +function cleanup() { + if (datafileServer) { + console.log('\n=== Stopping Datafile Server ===\n'); + datafileServer.kill(); + datafileServer = null; + } +} + +// Handle cleanup on exit +process.on('exit', cleanup); +process.on('SIGINT', () => { + cleanup(); + process.exit(0); +}); +process.on('SIGTERM', () => { + cleanup(); + process.exit(0); +}); + +async function main() { + console.log('=== Building SDK and Running TypeScript Example ===\n'); + + // Step 1: Build the SDK + console.log('Step 1: Building SDK...'); + run('npm run build', rootDir); + + // Step 2: Install dependencies for ts-example + console.log('\nStep 2: Installing ts-example dependencies...'); + run('npm install', exampleDir); + + // Step 3: Build the ts-example + console.log('\nStep 3: Building ts-example...'); + run('npm run build', exampleDir); + + // Step 4: Start the datafile server + await startDatafileServer(); + + // Step 5: Run the ts-example + console.log('\nStep 4: Running ts-example...'); + run('npm start', exampleDir); + + // Cleanup and exit + cleanup(); + console.log('\n=== Example completed successfully! ===\n'); +} + +main().catch((error) => { + console.error('Error:', error); + cleanup(); + process.exit(1); +}); diff --git a/ts-example/.gitignore b/ts-example/.gitignore new file mode 100644 index 000000000..dd6e803c7 --- /dev/null +++ b/ts-example/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +dist/ +*.log +.DS_Store diff --git a/ts-example/README.md b/ts-example/README.md new file mode 100644 index 000000000..89406900c --- /dev/null +++ b/ts-example/README.md @@ -0,0 +1,56 @@ +# TypeScript Example - Optimizely SDK + +This example demonstrates all factory functions from the Optimizely SDK, including static and polling datafile managers. + +## Files + +- `src/index.ts` - Main example demonstrating all SDK factory functions +- `datafile.json` - Test datafile with Optimizely configuration +- `datafile-server.js` - Simple HTTP server for testing polling datafile manager + +## Setup + +Install dependencies: +```bash +npm install +``` + +## Running the Example + +### 1. Start the Datafile Server (for polling manager test) + +In a separate terminal, run: +```bash +node datafile-server.js +``` + +This starts an HTTP server at `http://localhost:8910` that serves the `datafile.json` file. The polling project config manager will fetch updates from this server every 10 seconds. + +### 2. Run the Example + +```bash +npm start +``` + +## What This Example Demonstrates + +1. **createStaticProjectConfigManager** - Creates a config manager with a static datafile +2. **createInstance** - Creates an Optimizely client instance with the static config manager +3. **createPollingProjectConfigManager** - Creates a config manager that polls for datafile updates from localhost:8910 +4. **getSendBeaconEventDispatcher** - Gets the SendBeacon event dispatcher (Node.js returns undefined) +5. **eventDispatcher** - Default event dispatcher +6. **createForwardingEventProcessor** - Creates an event processor that forwards events immediately +7. **createBatchEventProcessor** - Creates an event processor that batches events +8. **createOdpManager** - Creates an Optimizely Data Platform manager +9. **createVuidManager** - Creates a Visitor Unique ID manager + +## Test Datafile + +The `datafile.json` contains a complete Optimizely configuration with: +- 2 feature flags (`flag_1`, `flag_2`) +- 4 experiments (`exp_1`, `exp_2`, `exp_3`, `exp_4`) +- 7 typed audiences based on age conditions +- 2 rollouts with delivery rules +- 1 integer variable (`integer_variable`) + +This datafile is used for testing SDK functionality with realistic configuration. diff --git a/ts-example/datafile-server.js b/ts-example/datafile-server.js new file mode 100755 index 000000000..edd039c08 --- /dev/null +++ b/ts-example/datafile-server.js @@ -0,0 +1,58 @@ +#!/usr/bin/env node + +/** + * Simple HTTP server to serve the datafile for testing polling project config manager + * Runs at http://localhost:8910 + */ + +import http from 'http'; +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const PORT = 8910; +const datafilePath = path.join(__dirname, 'datafile.json'); + +const server = http.createServer((req, res) => { + console.log(`[${new Date().toISOString()}] ${req.method} ${req.url}`); + + // Read and serve the datafile + fs.readFile(datafilePath, 'utf8', (err, data) => { + if (err) { + console.error('Error reading datafile:', err); + res.writeHead(500, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify({ error: 'Failed to read datafile' })); + return; + } + + // Set CORS headers for cross-origin requests + res.writeHead(200, { + 'Content-Type': 'application/json', + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET, OPTIONS', + 'Access-Control-Allow-Headers': 'Content-Type' + }); + + res.end(data); + }); +}); + +server.listen(PORT, () => { + console.log(`\n=== Datafile Server Started ===`); + console.log(`Server running at http://localhost:${PORT}`); + console.log(`Serving datafile from: ${datafilePath}`); + console.log(`\nPress Ctrl+C to stop the server\n`); +}); + +// Handle graceful shutdown +process.on('SIGINT', () => { + console.log('\n\nShutting down datafile server...'); + server.close(() => { + console.log('Server stopped'); + process.exit(0); + }); +}); diff --git a/ts-example/datafile.json b/ts-example/datafile.json new file mode 100644 index 000000000..a78ee1162 --- /dev/null +++ b/ts-example/datafile.json @@ -0,0 +1,507 @@ +{ + "accountId": "24535200037", + "projectId": "5088239376138240", + "revision": "21", + "attributes": [ + { + "id": "7001", + "key": "age" + } + ], + "audiences": [ + { + "name": "age_22", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4001" + }, + { + "name": "age_60", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4002" + }, + { + "name": "age_90", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4003" + }, + { + "name": "age_94", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4004" + }, + { + "name": "age_95", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4005" + }, + { + "name": "age_96", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4006" + }, + { + "name": "age_97", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]", + "id": "4007" + }, + { + "id": "$opt_dummy_audience", + "name": "Optimizely-Generated Audience for Backwards Compatibility", + "conditions": "[\"or\", {\"match\": \"exact\", \"name\": \"$opt_dummy_attribute\", \"type\": \"custom_attribute\", \"value\": \"$opt_dummy_value\"}]" + } + ], + "version": "4", + "events": [], + "integrations": [], + "anonymizeIP": true, + "botFiltering": false, + "typedAudiences": [ + { + "name": "age_22", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 22 + } + ] + ] + ], + "id": "4001" + }, + { + "name": "age_60", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 60 + } + ] + ] + ], + "id": "4002" + }, + { + "name": "age_90", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 90 + } + ] + ] + ], + "id": "4003" + }, + { + "name": "age_94", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 94 + } + ] + ] + ], + "id": "4004" + }, + { + "name": "age_95", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 95 + } + ] + ] + ], + "id": "4005" + }, + { + "name": "age_96", + "conditions": [ + "and", + [ + "or", + [ + "or", + { + "match": "le", + "name": "age", + "type": "custom_attribute", + "value": 96 + } + ] + ] + ], + "id": "4006" + } + ], + "variables": [], + "environmentKey": "production", + "sdkKey": "sdk_key", + "featureFlags": [ + { + "id": "1001", + "key": "flag_1", + "rolloutId": "rollout-371334-671741182375276", + "experimentIds": [ + "2001", + "2002", + "2003" + ], + "variables": [ + { + "id": "6001", + "key": "integer_variable", + "type": "integer", + "defaultValue": "0" + } + ] + }, + { + "id": "1002", + "key": "flag_2", + "rolloutId": "rollout-374517-931741182375293", + "experimentIds": [ + "2004" + ], + "variables": [] + } + ], + "rollouts": [ + { + "id": "rollout-371334-671741182375276", + "experiments": [ + { + "id": "3001", + "key": "delivery_1", + "status": "Running", + "layerId": "9300001480454", + "variations": [ + { + "id": "5004", + "key": "variation_4", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "4" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5004", + "endOfRange": 1500 + } + ], + "forcedVariations": {}, + "audienceIds": [ + "4001" + ], + "audienceConditions": [ + "or", + "4001" + ] + }, + { + "id": "3002", + "key": "delivery_2", + "status": "Running", + "layerId": "9300001480455", + "variations": [ + { + "id": "5005", + "key": "variation_5", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "5" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5005", + "endOfRange": 4000 + } + ], + "forcedVariations": {}, + "audienceIds": [ + "4002" + ], + "audienceConditions": [ + "or", + "4002" + ] + }, + { + "id": "3003", + "key": "delivery_3", + "status": "Running", + "layerId": "9300001495996", + "variations": [ + { + "id": "5006", + "key": "variation_6", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "6" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5006", + "endOfRange": 8000 + } + ], + "forcedVariations": {}, + "audienceIds": [ + "4003" + ], + "audienceConditions": [ + "or", + "4003" + ] + }, + { + "id": "default-rollout-id", + "key": "default-rollout-key", + "status": "Running", + "layerId": "rollout-371334-671741182375276", + "variations": [ + { + "id": "5007", + "key": "variation_7", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "7" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5007", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceIds": [], + "audienceConditions": [] + } + ] + }, + { + "id": "rollout-374517-931741182375293", + "experiments": [ + { + "id": "default-rollout-374517-931741182375293", + "key": "default-rollout-374517-931741182375293", + "status": "Running", + "layerId": "rollout-374517-931741182375293", + "variations": [ + { + "id": "1177722", + "key": "off", + "featureEnabled": false, + "variables": [] + } + ], + "trafficAllocation": [ + { + "entityId": "1177722", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceIds": [], + "audienceConditions": [] + } + ] + } + ], + "experiments": [ + { + "id": "2001", + "key": "exp_1", + "status": "Running", + "layerId": "9300001480444", + "variations": [ + { + "id": "5001", + "key": "variation_1", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "1" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5001", + "endOfRange": 5000 + }, + { + "entityId": "5001", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceIds": [ + "4001" + ], + "audienceConditions": [ + "or", + "4001" + ] + }, + { + "id": "2002", + "key": "exp_2", + "status": "Running", + "layerId": "9300001480448", + "variations": [ + { + "id": "5002", + "key": "variation_2", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "2" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5002", + "endOfRange": 5000 + }, + { + "entityId": "5002", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceConditions": [ + "or", + "4002" + ] + }, + { + "id": "2003", + "key": "exp_3", + "status": "Running", + "layerId": "9300001480451", + "variations": [ + { + "id": "5003", + "key": "variation_3", + "featureEnabled": true, + "variables": [ + { + "id": "6001", + "value": "3" + } + ] + } + ], + "trafficAllocation": [ + { + "entityId": "5003", + "endOfRange": 5000 + }, + { + "entityId": "5003", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceIds": [], + "audienceConditions": [ + "or", + "4003" + ], + "cmab": { + "attributes": ["7001"] + } + }, + { + "id": "2004", + "key": "exp_4", + "status": "Running", + "layerId": "9300001497754", + "variations": [ + { + "id": "5100", + "key": "variation_flag_2", + "featureEnabled": true, + "variables": [] + } + ], + "trafficAllocation": [ + { + "entityId": "5100", + "endOfRange": 5000 + }, + { + "entityId": "5100", + "endOfRange": 10000 + } + ], + "forcedVariations": {}, + "audienceIds": [], + "audienceConditions": [] + } + ], + "groups": [] +} diff --git a/ts-example/package-lock.json b/ts-example/package-lock.json new file mode 100644 index 000000000..52e5df029 --- /dev/null +++ b/ts-example/package-lock.json @@ -0,0 +1,143 @@ +{ + "name": "optimizely-sdk-typescript-example", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "optimizely-sdk-typescript-example", + "version": "1.0.0", + "dependencies": { + "@optimizely/optimizely-sdk": "file:../" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "typescript": "^4.7.4" + } + }, + "..": { + "name": "@optimizely/optimizely-sdk", + "version": "6.3.0", + "license": "Apache-2.0", + "dependencies": { + "decompress-response": "^7.0.0", + "json-schema": "^0.4.0", + "murmurhash": "^2.0.1", + "uuid": "^10.0.0" + }, + "devDependencies": { + "@react-native-async-storage/async-storage": "^2", + "@react-native-community/netinfo": "^11.3.2", + "@rollup/plugin-alias": "^6.0.0", + "@rollup/plugin-commonjs": "^29.0.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^0.4.4", + "@types/chai": "^4.2.11", + "@types/mocha": "^5.2.7", + "@types/nise": "^1.4.0", + "@types/node": "^18.7.18", + "@types/ua-parser-js": "^0.7.36", + "@types/uuid": "^10.0.0", + "@typescript-eslint/eslint-plugin": "^5.33.0", + "@typescript-eslint/parser": "^5.33.0", + "@vitest/browser": "3.2.4", + "chai": "^4.2.0", + "coveralls-next": "^5.0.0", + "eslint": "^8.21.0", + "eslint-config-prettier": "^6.10.0", + "eslint-plugin-local-rules": "^3.0.2", + "eslint-plugin-prettier": "^3.1.2", + "happy-dom": "^20.0.11", + "jiti": "^2.4.1", + "karma": "^6.4.0", + "karma-browserstack-launcher": "^1.5.1", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.1.1", + "karma-mocha": "^2.0.1", + "karma-webpack": "^5.0.1", + "lodash": "^4.17.11", + "minimatch": "^9.0.5", + "mocha": "^10.2.0", + "mocha-lcov-reporter": "^1.3.0", + "nise": "^6.1.1", + "nock": "11.9.1", + "nyc": "^15.0.1", + "prettier": "^1.19.1", + "promise-polyfill": "8.1.0", + "rollup": "^4.55.1", + "sinon": "^2.3.1", + "ts-loader": "^9.3.1", + "ts-node": "^8.10.2", + "tsconfig-paths": "^4.2.0", + "tslib": "^2.8.1", + "typescript": "^4.7.4", + "vite": "^6.4.1", + "vitest": "^3.2.4", + "webdriverio": "^9.21.0", + "webpack": "^5.94.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": ">=1.0.0 <3.0.0", + "@react-native-community/netinfo": ">=5.0.0 <12.0.0", + "fast-text-encoding": "^1.0.6", + "react-native-get-random-values": "^1.11.0", + "ua-parser-js": "^1.0.38" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + }, + "@react-native-community/netinfo": { + "optional": true + }, + "fast-text-encoding": { + "optional": true + }, + "react-native-get-random-values": { + "optional": true + }, + "ua-parser-js": { + "optional": true + } + } + }, + "node_modules/@optimizely/optimizely-sdk": { + "resolved": "..", + "link": true + }, + "node_modules/@types/node": { + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/ts-example/package.json b/ts-example/package.json new file mode 100644 index 000000000..9a5eae7a5 --- /dev/null +++ b/ts-example/package.json @@ -0,0 +1,19 @@ +{ + "name": "optimizely-sdk-typescript-example", + "version": "1.0.0", + "description": "TypeScript example for Optimizely SDK", + "type": "module", + "main": "dist/index.js", + "scripts": { + "build": "tsc", + "start": "node dist/index.js", + "dev": "tsc && node dist/index.js" + }, + "dependencies": { + "@optimizely/optimizely-sdk": "file:../" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "typescript": "^4.7.4" + } +} diff --git a/ts-example/src/index.ts b/ts-example/src/index.ts new file mode 100644 index 000000000..447734798 --- /dev/null +++ b/ts-example/src/index.ts @@ -0,0 +1,206 @@ +import { + createInstance, + createStaticProjectConfigManager, + createPollingProjectConfigManager, + createForwardingEventProcessor, + createBatchEventProcessor, + createOdpManager, + createVuidManager, + createLogger, + createErrorNotifier, + getSendBeaconEventDispatcher, + eventDispatcher, + INFO, + NOTIFICATION_TYPES, + type Client, + type Config, + type OpaqueConfigManager, + type OpaqueEventProcessor, + type OpaqueOdpManager, + type OpaqueVuidManager, + type OpaqueLogger, + type OpaqueErrorNotifier, + type EventDispatcher, + type OptimizelyDecision, + type OptimizelyUserContext, + type DecisionNotificationPayload, + type UserAttributes, + type ErrorHandler, + type LogHandler, +} from '@optimizely/optimizely-sdk'; +import * as fs from 'fs'; +import * as path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +const __filename: string = fileURLToPath(import.meta.url); +const __dirname: string = dirname(__filename); + +const datafilePath: string = path.join(__dirname, '..', 'datafile.json'); +const testDatafile: string = fs.readFileSync(datafilePath, 'utf8'); + +async function testStaticConfigSetup(): Promise { + const logger: OpaqueLogger = createLogger({ + level: INFO, + }); + + const errorHandler: ErrorHandler = { + handleError: (error: Error): void => { + console.error(`[ErrorHandler] ${error.message}`); + }, + }; + const errorNotifier: OpaqueErrorNotifier = createErrorNotifier(errorHandler); + + const staticConfigManager: OpaqueConfigManager = createStaticProjectConfigManager({ + datafile: testDatafile, + }); + + const dispatcher: EventDispatcher = eventDispatcher; + + const forwardingProcessor: OpaqueEventProcessor = createForwardingEventProcessor(dispatcher); + + const odpManager: OpaqueOdpManager = createOdpManager(); + + const vuidManager: OpaqueVuidManager = createVuidManager(); + + const config: Config = { + projectConfigManager: staticConfigManager, + eventProcessor: forwardingProcessor, + odpManager: odpManager, + vuidManager: vuidManager, + logger: logger, + errorNotifier: errorNotifier, + }; + + const optimizelyClient: Client = createInstance(config); + + await optimizelyClient.onReady(); + + const listenerId: number = optimizelyClient.notificationCenter.addNotificationListener( + NOTIFICATION_TYPES.DECISION, + (notification: DecisionNotificationPayload) => { + console.log('Decision notification received:', { + type: notification.type, + userId: notification.userId, + }); + } + ); + + const userAttributes: UserAttributes = { age: 25, browser: 'chrome' }; + const userContext: OptimizelyUserContext = optimizelyClient.createUserContext( + 'test_user_1', + userAttributes + ); + + const decision: OptimizelyDecision = userContext.decide('flag_1'); + if (typeof decision.variationKey !== 'string' || decision.variationKey.length === 0) { + throw new Error(`Expected non-empty string for variationKey, got: ${decision.variationKey}`); + } + console.log(`variationKey: ${decision.variationKey}`); + + const vuid: string | undefined = optimizelyClient.getVuid(); + void vuid; + + optimizelyClient.notificationCenter.removeNotificationListener(listenerId); + + optimizelyClient.close(); +} + +async function testPollingConfigSetup(): Promise { + const logHandler: LogHandler = { + log: (_level: number, message: string): void => { + console.log(`[Logger] ${message}`); + }, + }; + const logger: OpaqueLogger = createLogger({ + level: INFO, + logHandler: logHandler, + }); + + const errorHandler: ErrorHandler = { + handleError: (error: Error): void => { + console.error(`[ErrorHandler] ${error.message}`); + }, + }; + const errorNotifier: OpaqueErrorNotifier = createErrorNotifier(errorHandler); + + const pollingManager: OpaqueConfigManager = createPollingProjectConfigManager({ + sdkKey: 'sdk_key', + urlTemplate: 'http://localhost:8910', + updateInterval: 10000, + }); + + const dispatcher: EventDispatcher = eventDispatcher; + + const batchProcessor: OpaqueEventProcessor = createBatchEventProcessor({ + eventDispatcher: dispatcher, + batchSize: 10, + flushInterval: 30000, + }); + + const odpManager: OpaqueOdpManager = createOdpManager({ + segmentsCacheSize: 5000, + segmentsCacheTimeout: 300000, + eventBatchSize: 20, + eventFlushInterval: 5000, + }); + + const vuidManager: OpaqueVuidManager = createVuidManager(); + + const config: Config = { + projectConfigManager: pollingManager, + eventProcessor: batchProcessor, + odpManager: odpManager, + vuidManager: vuidManager, + logger: logger, + errorNotifier: errorNotifier, + }; + + const optimizelyClient: Client = createInstance(config); + + await optimizelyClient.onReady(); + + const listenerId: number = optimizelyClient.notificationCenter.addNotificationListener( + NOTIFICATION_TYPES.DECISION, + (notification: DecisionNotificationPayload) => { + console.log('Decision notification received:', { + type: notification.type, + userId: notification.userId, + }); + } + ); + + const userAttributes: UserAttributes = { age: 30, location: 'US' }; + const userContext: OptimizelyUserContext = optimizelyClient.createUserContext( + 'test_user_2', + userAttributes + ); + + const decision: OptimizelyDecision = userContext.decide('flag_2'); + if (typeof decision.variationKey !== 'string' || decision.variationKey.length === 0) { + throw new Error(`Expected non-empty string for variationKey, got: ${decision.variationKey}`); + } + console.log(`variationKey: ${decision.variationKey}`); + + const vuid: string | undefined = optimizelyClient.getVuid(); + void vuid; + + optimizelyClient.notificationCenter.removeNotificationListener(listenerId); + + optimizelyClient.close(); +} + +async function main(): Promise { + try { + await testStaticConfigSetup(); + await testPollingConfigSetup(); + } catch (error) { + console.error('Error running tests:', error); + process.exit(1); + } +} + +main().catch((error) => { + console.error('Unhandled error:', error); + process.exit(1); +}); diff --git a/ts-example/tsconfig.json b/ts-example/tsconfig.json new file mode 100644 index 000000000..2e3fa8159 --- /dev/null +++ b/ts-example/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "ES2020", + "lib": ["ES6"], + "moduleResolution": "node", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "outDir": "./dist", + "rootDir": "./src", + "declaration": true, + "sourceMap": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} From 775a6c5660a87c6e9d24e7af57a23fc6d5ed9428 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 20:09:24 +0600 Subject: [PATCH 5/9] upd --- package.json | 8 +++----- scripts/run-ts-example.js | 37 +++++++++++++++++++---------------- ts-example/datafile-server.js | 7 +++++-- ts-example/package-lock.json | 11 ++++++----- ts-example/src/index.ts | 1 + 5 files changed, 35 insertions(+), 29 deletions(-) diff --git a/package.json b/package.json index 192344b16..2496f50cb 100644 --- a/package.json +++ b/package.json @@ -75,14 +75,12 @@ "test-umdbrowser": "npm run build-browser-umd && karma start karma.umd.conf.js --single-run", "test-karma-local": "karma start karma.local_chrome.bs.conf.js && npm run build-browser-umd && karma start karma.local_chrome.umd.conf.js", "prebuild": "npm run clean", - "compile": "tsc -p tsconfig.build.json", - "build": "npm run validate-platform-isolation && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && cp dist/index.browser.d.ts dist/index.d.ts", - "build:win": "tsc --noEmit && npm run genmsg && npm run compile && rollup -c rollup.config.new.js && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts", - "build-browser-umd": "npm run compile && rollup -c rollup.config.new.js --config-umd", + "build": "npm run validate-platform-isolation && npm run genmsg && tsc && rollup -c rollup.config.mjs && cp dist/index.browser.d.ts dist/index.d.ts", + "build:win": "npm run validate-platform-isolation && npm run genmsg && tsc && rollup -c rollup.config.mjs && copy dist\\index.browser.d.ts dist\\index.d.ts", + "build-browser-umd": "tsc && rollup -c rollup.config.mjs --config-umd", "coveralls": "nyc --reporter=lcov npm test", "prepare": "npm run build", "prepublishOnly": "npm test", - "postbuild:win": "@powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.min.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.min.d.ts\"", "genmsg": "jiti message_generator ./lib/message/error_message.ts ./lib/message/log_message.ts", "ts-example": "node ./scripts/run-ts-example.js" }, diff --git a/scripts/run-ts-example.js b/scripts/run-ts-example.js index de5b0b541..9a4d29b9c 100755 --- a/scripts/run-ts-example.js +++ b/scripts/run-ts-example.js @@ -47,25 +47,28 @@ function startDatafileServer() { return new Promise((resolve) => setTimeout(resolve, 1000)); } -function cleanup() { +async function cleanup() { if (datafileServer) { console.log('\n=== Stopping Datafile Server ===\n'); - datafileServer.kill(); - datafileServer = null; + + return new Promise((resolve) => { + const timeout = setTimeout(() => { + console.log('Force killing datafile server...'); + datafileServer.kill('SIGKILL'); + resolve(); + }, 2000); + + datafileServer.on('exit', () => { + clearTimeout(timeout); + datafileServer = null; + resolve(); + }); + + datafileServer.kill('SIGTERM'); + }); } } -// Handle cleanup on exit -process.on('exit', cleanup); -process.on('SIGINT', () => { - cleanup(); - process.exit(0); -}); -process.on('SIGTERM', () => { - cleanup(); - process.exit(0); -}); - async function main() { console.log('=== Building SDK and Running TypeScript Example ===\n'); @@ -89,12 +92,12 @@ async function main() { run('npm start', exampleDir); // Cleanup and exit - cleanup(); + await cleanup(); console.log('\n=== Example completed successfully! ===\n'); } -main().catch((error) => { +main().catch(async (error) => { console.error('Error:', error); - cleanup(); + await cleanup(); process.exit(1); }); diff --git a/ts-example/datafile-server.js b/ts-example/datafile-server.js index edd039c08..a64c140c4 100755 --- a/ts-example/datafile-server.js +++ b/ts-example/datafile-server.js @@ -49,10 +49,13 @@ server.listen(PORT, () => { }); // Handle graceful shutdown -process.on('SIGINT', () => { +const shutdown = () => { console.log('\n\nShutting down datafile server...'); server.close(() => { console.log('Server stopped'); process.exit(0); }); -}); +}; + +process.on('SIGINT', shutdown); +process.on('SIGTERM', shutdown); diff --git a/ts-example/package-lock.json b/ts-example/package-lock.json index 52e5df029..3a12c175e 100644 --- a/ts-example/package-lock.json +++ b/ts-example/package-lock.json @@ -28,10 +28,9 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^6.0.0", - "@rollup/plugin-commonjs": "^29.0.0", - "@rollup/plugin-node-resolve": "^16.0.3", - "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-alias": "^3.1.9", + "@rollup/plugin-commonjs": "^11.0.2", + "@rollup/plugin-node-resolve": "^7.1.1", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -64,7 +63,9 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "^4.55.1", + "rollup": "2.79.2", + "rollup-plugin-terser": "^5.3.0", + "rollup-plugin-typescript2": "^0.27.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", diff --git a/ts-example/src/index.ts b/ts-example/src/index.ts index 447734798..eccd3b604 100644 --- a/ts-example/src/index.ts +++ b/ts-example/src/index.ts @@ -194,6 +194,7 @@ async function main(): Promise { try { await testStaticConfigSetup(); await testPollingConfigSetup(); + process.exit(0); } catch (error) { console.error('Error running tests:', error); process.exit(1); From d60559d6e4089f0715155ef98c13928e10861b95 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 21:34:47 +0600 Subject: [PATCH 6/9] upd --- package-lock.json | 70 ++++++++++++++++++++++++----------------------- package.json | 11 ++++---- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3f9127822..3d71dfd11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1739,9 +1739,9 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.11.0.tgz", - "integrity": "sha512-n6oQX6mYkG8TRPuPXmbPidkUbsSRalhmaaVAQxvH1IkQy63cwsH+kOjB3e4cpCDHg0aSvsiX9bQ4s2VB6mGWUQ==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.11.1.tgz", + "integrity": "sha512-YmhAxs7XPuxN0j7LJloHpfD1ylhDuFmmwMvfy/+6nBSrETT2ycL53LrhgPtR+f+GcPSybQVuQ5inWWu5MrWCpA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -3487,9 +3487,9 @@ } }, "node_modules/@wdio/repl/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", "dev": true, "license": "MIT", "dependencies": { @@ -3517,9 +3517,9 @@ } }, "node_modules/@wdio/types/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", "dev": true, "license": "MIT", "dependencies": { @@ -3748,9 +3748,9 @@ "license": "Apache-2.0" }, "node_modules/@zip.js/zip.js": { - "version": "2.8.13", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.13.tgz", - "integrity": "sha512-UcWZ5i9Hlspgo+8q8PUPd9TmDYM62eqfb/0iZ5SF3bqfX/uFUmV660MC9Lsvon7/sidzesXLQlIf8/mbDUf6gQ==", + "version": "2.8.14", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.14.tgz", + "integrity": "sha512-BZ7OyJLA5cjYwf2jVjvZCK10swzIc6sDOLpkPjJXfXgx/IHF5y61PyL3Ko5/q3bUU5GvIhk6tzKDUcDJ7rhzbg==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -4455,9 +4455,9 @@ } }, "node_modules/baseline-browser-mapping": { - "version": "2.9.11", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.11.tgz", - "integrity": "sha512-Sg0xJUNDU1sJNGdfGWhVHX0kkZ+HWcvmVymJbj6NSgZZmW/8S9Y2HQ5euytnIgakgxN6papOAWiwDo1ctFDcoQ==", + "version": "2.9.14", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz", + "integrity": "sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==", "dev": true, "license": "Apache-2.0", "bin": { @@ -4779,9 +4779,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001762", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001762.tgz", - "integrity": "sha512-PxZwGNvH7Ak8WX5iXzoK1KPZttBXNPuaOvI2ZYU7NrlM+d9Ov+TUvlLOBNGzVXAntMSMMlJPd+jY6ovrVjSmUw==", + "version": "1.0.30001764", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz", + "integrity": "sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==", "dev": true, "funding": [ { @@ -7250,24 +7250,26 @@ "license": "MIT" }, "node_modules/happy-dom": { - "version": "20.0.11", - "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.0.11.tgz", - "integrity": "sha512-QsCdAUHAmiDeKeaNojb1OHOPF7NjcWPBR7obdu3NwH2a/oyQaLg5d0aaCy/9My6CdPChYF07dvz5chaXBGaD4g==", + "version": "20.1.0", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-20.1.0.tgz", + "integrity": "sha512-ebvqjBqzenBk2LjzNEAzoj7yhw7rW/R2/wVevMu6Mrq3MXtcI/RUz4+ozpcOcqVLEWPqLfg2v9EAU7fFXZUUJw==", "dev": true, "license": "MIT", "dependencies": { "@types/node": "^20.0.0", "@types/whatwg-mimetype": "^3.0.2", - "whatwg-mimetype": "^3.0.0" + "@types/ws": "^8.18.1", + "whatwg-mimetype": "^3.0.0", + "ws": "^8.18.3" }, "engines": { "node": ">=20.0.0" } }, "node_modules/happy-dom/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", "dev": true, "license": "MIT", "dependencies": { @@ -13208,9 +13210,9 @@ } }, "node_modules/undici": { - "version": "7.18.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.1.tgz", - "integrity": "sha512-0L1RtVqD2twa4hYKeNitqG8zvwe+4cT7L2FDP+64QC8mxjA4TlKjSqPLyOjaRdnUnWYQyxKyhDkqOHLKXw+lkA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.2.tgz", + "integrity": "sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==", "dev": true, "license": "MIT", "engines": { @@ -13686,9 +13688,9 @@ } }, "node_modules/webdriver/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", "dev": true, "license": "MIT", "dependencies": { @@ -13782,9 +13784,9 @@ } }, "node_modules/webdriverio/node_modules/@types/node": { - "version": "20.19.27", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.27.tgz", - "integrity": "sha512-N2clP5pJhB2YnZJ3PIHFk5RkygRX5WO/5f0WC08tp0wd+sv0rsJk3MqWn3CbNmT2J505a5336jaQj4ph1AdMug==", + "version": "20.19.28", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.28.tgz", + "integrity": "sha512-VyKBr25BuFDzBFCK5sUM6ZXiWfqgCTwTAOK8qzGV/m9FCirXYDlmczJ+d5dXBAQALGCdRRdbteKYfJ84NGEusw==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 2496f50cb..8db18d2c5 100644 --- a/package.json +++ b/package.json @@ -108,9 +108,10 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^3.1.9", - "@rollup/plugin-commonjs": "^11.0.2", - "@rollup/plugin-node-resolve": "^7.1.1", + "@rollup/plugin-alias": "^6.0.0", + "@rollup/plugin-commonjs": "^29.0.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^0.4.4", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -143,9 +144,7 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "2.79.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-typescript2": "^0.27.1", + "rollup": "^4.55.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", From 4b39a74d69bcf56da1fe5b9fd35cf78974da3bc4 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 22:22:40 +0600 Subject: [PATCH 7/9] update --- .github/workflows/javascript.yml | 2 +- scripts/run-ts-example.js | 20 ++++++++++----- ts-example/src/index.ts | 44 +++++++++++++++++++++----------- 3 files changed, 43 insertions(+), 23 deletions(-) diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index c2917f8c5..18ee26b80 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -26,7 +26,7 @@ jobs: npm install npm run lint - ts-check: + typescript_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/scripts/run-ts-example.js b/scripts/run-ts-example.js index 9a4d29b9c..5bf80279e 100755 --- a/scripts/run-ts-example.js +++ b/scripts/run-ts-example.js @@ -1,7 +1,19 @@ #!/usr/bin/env node /** - * Script to build the SDK and run the TypeScript example + * Copyright 2025, Optimizely + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ const { execSync, spawn } = require('child_process'); @@ -72,26 +84,20 @@ async function cleanup() { async function main() { console.log('=== Building SDK and Running TypeScript Example ===\n'); - // Step 1: Build the SDK console.log('Step 1: Building SDK...'); run('npm run build', rootDir); - // Step 2: Install dependencies for ts-example console.log('\nStep 2: Installing ts-example dependencies...'); run('npm install', exampleDir); - // Step 3: Build the ts-example console.log('\nStep 3: Building ts-example...'); run('npm run build', exampleDir); - // Step 4: Start the datafile server await startDatafileServer(); - // Step 5: Run the ts-example console.log('\nStep 4: Running ts-example...'); run('npm start', exampleDir); - // Cleanup and exit await cleanup(); console.log('\n=== Example completed successfully! ===\n'); } diff --git a/ts-example/src/index.ts b/ts-example/src/index.ts index eccd3b604..8b371d4ae 100644 --- a/ts-example/src/index.ts +++ b/ts-example/src/index.ts @@ -1,37 +1,51 @@ +/** + * Copyright 2025, Optimizely + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import { - createInstance, - createStaticProjectConfigManager, - createPollingProjectConfigManager, - createForwardingEventProcessor, createBatchEventProcessor, + createErrorNotifier, + createForwardingEventProcessor, + createInstance, + createLogger, createOdpManager, + createPollingProjectConfigManager, + createStaticProjectConfigManager, createVuidManager, - createLogger, - createErrorNotifier, - getSendBeaconEventDispatcher, eventDispatcher, INFO, NOTIFICATION_TYPES, type Client, type Config, + type DecisionNotificationPayload, + type ErrorHandler, + type EventDispatcher, + type LogHandler, type OpaqueConfigManager, + type OpaqueErrorNotifier, type OpaqueEventProcessor, + type OpaqueLogger, type OpaqueOdpManager, type OpaqueVuidManager, - type OpaqueLogger, - type OpaqueErrorNotifier, - type EventDispatcher, type OptimizelyDecision, type OptimizelyUserContext, - type DecisionNotificationPayload, - type UserAttributes, - type ErrorHandler, - type LogHandler, + type UserAttributes } from '@optimizely/optimizely-sdk'; import * as fs from 'fs'; import * as path from 'path'; -import { fileURLToPath } from 'url'; import { dirname } from 'path'; +import { fileURLToPath } from 'url'; const __filename: string = fileURLToPath(import.meta.url); const __dirname: string = dirname(__filename); From 0c657cb83f23dc83c357ed1e488fd76b1f23a2ff Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 23:51:00 +0600 Subject: [PATCH 8/9] updates --- .../typescript}/.gitignore | 0 {ts-example => examples/typescript}/README.md | 18 ++- .../typescript}/datafile-server.js | 0 .../typescript}/datafile.json | 0 .../typescript}/package-lock.json | 105 ++++++++++++++++-- .../typescript}/package.json | 6 +- .../typescript}/src/index.ts | 0 .../typescript}/tsconfig.json | 0 scripts/run-ts-example.js | 42 ++++++- 9 files changed, 149 insertions(+), 22 deletions(-) rename {ts-example => examples/typescript}/.gitignore (100%) rename {ts-example => examples/typescript}/README.md (82%) rename {ts-example => examples/typescript}/datafile-server.js (100%) rename {ts-example => examples/typescript}/datafile.json (100%) rename {ts-example => examples/typescript}/package-lock.json (54%) rename {ts-example => examples/typescript}/package.json (82%) rename {ts-example => examples/typescript}/src/index.ts (100%) rename {ts-example => examples/typescript}/tsconfig.json (100%) diff --git a/ts-example/.gitignore b/examples/typescript/.gitignore similarity index 100% rename from ts-example/.gitignore rename to examples/typescript/.gitignore diff --git a/ts-example/README.md b/examples/typescript/README.md similarity index 82% rename from ts-example/README.md rename to examples/typescript/README.md index 89406900c..7368bd236 100644 --- a/ts-example/README.md +++ b/examples/typescript/README.md @@ -8,14 +8,24 @@ This example demonstrates all factory functions from the Optimizely SDK, includi - `datafile.json` - Test datafile with Optimizely configuration - `datafile-server.js` - Simple HTTP server for testing polling datafile manager -## Setup +## Running the Example + +### From Project Root (Recommended) -Install dependencies: +Run from the project root to automatically build the SDK, create a tarball, and run the example: ```bash -npm install +npm run ts-example ``` -## Running the Example +This will: +1. Install SDK dependencies +2. Pack the SDK as a tarball (triggers build via `prepare` script) +3. Install the tarball in this example +4. Build and run the TypeScript example +5. Start the datafile server automatically +6. Clean up after completion + +### Manual Setup ### 1. Start the Datafile Server (for polling manager test) diff --git a/ts-example/datafile-server.js b/examples/typescript/datafile-server.js similarity index 100% rename from ts-example/datafile-server.js rename to examples/typescript/datafile-server.js diff --git a/ts-example/datafile.json b/examples/typescript/datafile.json similarity index 100% rename from ts-example/datafile.json rename to examples/typescript/datafile.json diff --git a/ts-example/package-lock.json b/examples/typescript/package-lock.json similarity index 54% rename from ts-example/package-lock.json rename to examples/typescript/package-lock.json index 3a12c175e..5042db4b6 100644 --- a/ts-example/package-lock.json +++ b/examples/typescript/package-lock.json @@ -8,7 +8,7 @@ "name": "optimizely-sdk-typescript-example", "version": "1.0.0", "dependencies": { - "@optimizely/optimizely-sdk": "file:../" + "@optimizely/optimizely-sdk": "file:../../optimizely-optimizely-sdk-6.3.0.tgz" }, "devDependencies": { "@types/node": "^20.0.0", @@ -18,6 +18,7 @@ "..": { "name": "@optimizely/optimizely-sdk", "version": "6.3.0", + "extraneous": true, "license": "Apache-2.0", "dependencies": { "decompress-response": "^7.0.0", @@ -28,9 +29,10 @@ "devDependencies": { "@react-native-async-storage/async-storage": "^2", "@react-native-community/netinfo": "^11.3.2", - "@rollup/plugin-alias": "^3.1.9", - "@rollup/plugin-commonjs": "^11.0.2", - "@rollup/plugin-node-resolve": "^7.1.1", + "@rollup/plugin-alias": "^6.0.0", + "@rollup/plugin-commonjs": "^29.0.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^0.4.4", "@types/chai": "^4.2.11", "@types/mocha": "^5.2.7", "@types/nise": "^1.4.0", @@ -63,9 +65,7 @@ "nyc": "^15.0.1", "prettier": "^1.19.1", "promise-polyfill": "8.1.0", - "rollup": "2.79.2", - "rollup-plugin-terser": "^5.3.0", - "rollup-plugin-typescript2": "^0.27.1", + "rollup": "^4.55.1", "sinon": "^2.3.1", "ts-loader": "^9.3.1", "ts-node": "^8.10.2", @@ -106,8 +106,43 @@ } }, "node_modules/@optimizely/optimizely-sdk": { - "resolved": "..", - "link": true + "version": "6.3.0", + "resolved": "file:../../optimizely-optimizely-sdk-6.3.0.tgz", + "integrity": "sha512-8tL44xQcGiOoRxbbZ303xCvSrRJYjUR7FcwrzZxLUlEMmR8aeO2lvtVAGkoWJ8DlaZAZJpjQSrqPz3Dr71yCLw==", + "license": "Apache-2.0", + "dependencies": { + "decompress-response": "^7.0.0", + "json-schema": "^0.4.0", + "murmurhash": "^2.0.1", + "uuid": "^10.0.0" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "@react-native-async-storage/async-storage": ">=1.0.0 <3.0.0", + "@react-native-community/netinfo": ">=5.0.0 <12.0.0", + "fast-text-encoding": "^1.0.6", + "react-native-get-random-values": "^1.11.0", + "ua-parser-js": "^1.0.38" + }, + "peerDependenciesMeta": { + "@react-native-async-storage/async-storage": { + "optional": true + }, + "@react-native-community/netinfo": { + "optional": true + }, + "fast-text-encoding": { + "optional": true + }, + "react-native-get-random-values": { + "optional": true + }, + "ua-parser-js": { + "optional": true + } + } }, "node_modules/@types/node": { "version": "20.19.28", @@ -119,6 +154,45 @@ "undici-types": "~6.21.0" } }, + "node_modules/decompress-response": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-7.0.0.tgz", + "integrity": "sha512-6IvPrADQyyPGLpMnUh6kfKiqy7SrbXbjoUuZ90WMBJKErzv2pCiwlGEXjRX9/54OnTq+XFVnkOnOMzclLI5aEA==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", + "license": "(AFL-2.1 OR BSD-3-Clause)" + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/murmurhash": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/murmurhash/-/murmurhash-2.0.1.tgz", + "integrity": "sha512-5vQEh3y+DG/lMPM0mCGPDnyV8chYg/g7rl6v3Gd8WMF9S429ox3Xk8qrk174kWhG767KQMqqxLD1WnGd77hiew==", + "license": "MIT" + }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", @@ -139,6 +213,19 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "dev": true, "license": "MIT" + }, + "node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } } } } diff --git a/ts-example/package.json b/examples/typescript/package.json similarity index 82% rename from ts-example/package.json rename to examples/typescript/package.json index 9a5eae7a5..d531be050 100644 --- a/ts-example/package.json +++ b/examples/typescript/package.json @@ -9,11 +9,11 @@ "start": "node dist/index.js", "dev": "tsc && node dist/index.js" }, - "dependencies": { - "@optimizely/optimizely-sdk": "file:../" - }, "devDependencies": { "@types/node": "^20.0.0", "typescript": "^4.7.4" + }, + "dependencies": { + "@optimizely/optimizely-sdk": "file:../../optimizely-optimizely-sdk-6.3.0.tgz" } } diff --git a/ts-example/src/index.ts b/examples/typescript/src/index.ts similarity index 100% rename from ts-example/src/index.ts rename to examples/typescript/src/index.ts diff --git a/ts-example/tsconfig.json b/examples/typescript/tsconfig.json similarity index 100% rename from ts-example/tsconfig.json rename to examples/typescript/tsconfig.json diff --git a/scripts/run-ts-example.js b/scripts/run-ts-example.js index 5bf80279e..4ff37b045 100755 --- a/scripts/run-ts-example.js +++ b/scripts/run-ts-example.js @@ -18,9 +18,10 @@ const { execSync, spawn } = require('child_process'); const path = require('path'); +const fs = require('fs'); const rootDir = path.join(__dirname, '..'); -const exampleDir = path.join(rootDir, 'ts-example'); +const exampleDir = path.join(rootDir, 'examples', 'typescript'); let datafileServer = null; @@ -40,6 +41,23 @@ function run(command, cwd) { } } +function runQuiet(command, cwd) { + try { + const output = execSync(command, { + cwd, + encoding: 'utf8', + shell: true + }).trim(); + // npm pack outputs the tarball filename on the last line + const lines = output.split('\n'); + return lines[lines.length - 1].trim(); + } catch (error) { + console.error(`\nError executing: ${command}`); + cleanup(); + process.exit(1); + } +} + function startDatafileServer() { console.log('\n=== Starting Datafile Server ==='); console.log('Starting server at http://localhost:8910...\n'); @@ -84,20 +102,32 @@ async function cleanup() { async function main() { console.log('=== Building SDK and Running TypeScript Example ===\n'); - console.log('Step 1: Building SDK...'); - run('npm run build', rootDir); + console.log('Installing SDK dependencies...'); + run('npm install', rootDir); - console.log('\nStep 2: Installing ts-example dependencies...'); + console.log('\nPacking SDK tarball...'); + const packOutput = runQuiet('npm pack', rootDir); + const tarballPath = path.join(rootDir, packOutput); + console.log(`Created: ${packOutput}`); + + console.log('\nInstalling ts-example devDependencies...'); run('npm install', exampleDir); - console.log('\nStep 3: Building ts-example...'); + console.log('\nInstalling SDK tarball in ts-example...'); + run(`npm install ${tarballPath}`, exampleDir); + + console.log('\nBuilding ts-example...'); run('npm run build', exampleDir); await startDatafileServer(); - console.log('\nStep 4: Running ts-example...'); + console.log('\nRunning ts-example...'); run('npm start', exampleDir); + console.log('\nCleaning up tarball...'); + fs.unlinkSync(tarballPath); + console.log(`Removed: ${packOutput}`); + await cleanup(); console.log('\n=== Example completed successfully! ===\n'); } From a2af367a1dc92e76f815a68eea9849ed6800a1a0 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Mon, 12 Jan 2026 23:54:12 +0600 Subject: [PATCH 9/9] updates --- .github/workflows/javascript.yml | 4 ++-- examples/typescript/README.md | 2 +- examples/typescript/package-lock.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index 18ee26b80..ec1c01176 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -26,7 +26,7 @@ jobs: npm install npm run lint - typescript_check: + typescript_test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -40,7 +40,7 @@ jobs: working-directory: . run: | npm install - npm run ts-example + npm run test-typescript integration_tests: uses: optimizely/javascript-sdk/.github/workflows/integration_test.yml@master diff --git a/examples/typescript/README.md b/examples/typescript/README.md index 7368bd236..cc4430e0f 100644 --- a/examples/typescript/README.md +++ b/examples/typescript/README.md @@ -14,7 +14,7 @@ This example demonstrates all factory functions from the Optimizely SDK, includi Run from the project root to automatically build the SDK, create a tarball, and run the example: ```bash -npm run ts-example +npm run test-typescript ``` This will: diff --git a/examples/typescript/package-lock.json b/examples/typescript/package-lock.json index 5042db4b6..bae849cb3 100644 --- a/examples/typescript/package-lock.json +++ b/examples/typescript/package-lock.json @@ -108,7 +108,7 @@ "node_modules/@optimizely/optimizely-sdk": { "version": "6.3.0", "resolved": "file:../../optimizely-optimizely-sdk-6.3.0.tgz", - "integrity": "sha512-8tL44xQcGiOoRxbbZ303xCvSrRJYjUR7FcwrzZxLUlEMmR8aeO2lvtVAGkoWJ8DlaZAZJpjQSrqPz3Dr71yCLw==", + "integrity": "sha512-p38sW+HR9lOeJPbsU7i6hILXFmXyPKmbU835PA0m8r713KFMN8N1ef7O2B6yod/JRdq6Aa/b8tGPbuvloRKyUg==", "license": "Apache-2.0", "dependencies": { "decompress-response": "^7.0.0", diff --git a/package.json b/package.json index 8db18d2c5..bbe797c38 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "prepare": "npm run build", "prepublishOnly": "npm test", "genmsg": "jiti message_generator ./lib/message/error_message.ts ./lib/message/log_message.ts", - "ts-example": "node ./scripts/run-ts-example.js" + "test-typescript": "node ./scripts/run-ts-example.js" }, "repository": { "type": "git",