Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJS Version and Dependency Updrages #2452

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
timeout-minutes: 30
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
# See nx recipe: https://nx.dev/recipes/ci/monorepo-ci-github-actions
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -139,7 +139,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build-and-version-packages:
strategy:
matrix:
node-version: [18.x]
node-version: [22.x]
env:
HUSKY: 0
NX_DISABLE_DB: true
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.1
22.11.0
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"engines": {
"node": "14 || ^18.12"
"node": "^18.18 || ^22.11"
},
"scripts": {
"alpha": "lerna version prerelease --allow-branch $(git branch --show-current) --preid $(git branch --show-current) --no-push --no-git-tag-version",
Expand All @@ -36,44 +36,44 @@
"validate": "./bin/run validate"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.2.3",
"@types/aws4": "^1.11.2",
"@types/chance": "^1.1.3",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.16",
"@types/jest": "^27.0.0",
"@types/ws": "^8.5.1",
"@typescript-eslint/eslint-plugin": "^4.14.0",
"@typescript-eslint/parser": "^4.14.0",
"@peculiar/webcrypto": "^1.5.0",
"@types/aws4": "^1.11.6",
"@types/chance": "^1.1.6",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jest": "^27.5.2",
"@types/ws": "^8.5.12",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"cors": "^2.8.5",
"eslint": "^7.25.0",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-jest": "^25.2.2",
"eslint-plugin-lodash": "^7.3.0",
"express": "^4.18.2",
"husky": "^7.0.0",
"jest": "^27.3.1",
"eslint-plugin-jest": "^25.7.0",
"eslint-plugin-lodash": "^7.4.0",
"express": "^4.21.2",
"husky": "^7.0.4",
"jest": "^27.5.1",
"jest-browser-globals": "^25.1.0-beta",
"jest-mock": "^29.3.1",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"jest-mock": "^29.7.0",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-jasmine": "^5.1.0",
"karma-webkit-launcher": "^2.0.0",
"karma-webpack": "^5.0.0",
"karma-webkit-launcher": "^2.6.0",
"karma-webpack": "^5.0.1",
"lerna": "^8.1.8",
"lint-staged": "^10.5.3",
"open": "^8.4.0",
"lint-staged": "^10.5.4",
"open": "^8.4.2",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"playwright-chromium": "^1.29.2",
"playwright-webkit": "^1.29.2",
"prettier": "^2.4.1",
"playwright-chromium": "^1.47.2",
"playwright-webkit": "^1.47.2",
"prettier": "^2.8.8",
"process": "^0.11.10",
"timers-browserify": "^2.0.12",
"ts-jest": "^27.0.7",
"ts-jest": "^27.1.5",
"ts-node": "^9.1.1",
"typescript": "4.3.5",
"ws": "^8.5.0"
"typescript": "4.9.5",
"ws": "^8.18.0"
},
"resolutions": {
"**/@size-limit/preset-small-lib/**/glob-parent": "^6.0.1",
Expand Down Expand Up @@ -113,6 +113,6 @@
}
},
"dependencies": {
"chance": "^1.1.8"
"chance": "^1.1.12"
}
}
8 changes: 4 additions & 4 deletions packages/actions-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"package.json"
],
"engines": {
"node": "14 || ^18.12"
"node": "^18.18 || ^22.11"
},
"engineStrict": true,
"license": "MIT",
Expand All @@ -38,10 +38,10 @@
"dependencies": {
"@amplitude/ua-parser-js": "^0.7.25",
"@segment/actions-core": "^3.142.0",
"cheerio": "^1.0.0-rc.10",
"dayjs": "^1.10.7",
"cheerio": "^1.0.0",
"dayjs": "^1.11.13",
"escape-goat": "^3",
"liquidjs": "^10.8.4",
"liquidjs": "^10.16.7",
"lodash": "^4.17.21"
},
"jest": {
Expand Down
6 changes: 3 additions & 3 deletions packages/ajv-human-errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
},
"license": "MIT",
"devDependencies": {
"ajv": "^8.6.3",
"ajv-formats": "^2.1.1",
"jest": "^27.3.1"
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"jest": "^27.5.1"
},
"peerDependencies": {
"ajv": "^8.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { extractAllocations } from './allocations'
import { Allocation } from '../types'
import { prepareEvent } from './events'

declare global {
interface Window {
analytics: any
}
}

async function emit(eventType: string, allocation: Allocation) {
if (eventType !== 'confirmed') return

Expand Down
26 changes: 13 additions & 13 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"directory": "packages/cli"
},
"engines": {
"node": "14 || ^18.12"
"node": "^18.18 || ^22.11"
},
"engineStrict": true,
"bin": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"@types/json-schema": "^7.0.7",
"@types/lodash": "^4.14.175",
"@types/mustache": "^4.1.0",
"@types/node": "^14.0.0",
"@types/node": "^22.10.5",
"@types/prompts": "^2.0.10",
"@types/rimraf": "^3.0.2",
"@types/to-title-case": "^1.0.0",
Expand All @@ -56,27 +56,27 @@
"@oclif/config": "^1.18.8",
"@oclif/errors": "^1.3.6",
"@oclif/plugin-help": "^3.3",
"@segment/action-destinations": "^3.288.0",
"@segment/actions-core": "^3.121.0",
"@segment/destinations-manifest": "^1.71.0",
"@types/node": "^18.11.15",
"chalk": "^4.1.1",
"@segment/action-destinations": "^3.337.4",
"@segment/actions-core": "^3.134.0",
"@segment/destinations-manifest": "^1.87.0",
"@types/node": "^22.10.5",
"chalk": "^4.1.2",
"chokidar": "^3.5.1",
"dotenv": "^10.0.0",
"ecs-logs-js": "^1.0.0",
"execa": "^5.1.1",
"fs-extra": "^10.0.0",
"globby": "^11.0.3",
"fs-extra": "^10.1.0",
"globby": "^11.1.0",
"jscodeshift": "^0.14.0",
"jscodeshift-add-imports": "^1.0.10",
"jscodeshift-add-imports": "^1.0.11",
"jsdom": "^24.1.1",
"json-diff": "^0.5.4",
"json-schema-to-typescript": "^10.1.5",
"lodash": "^4.17.20",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"ora": "^5.4.0",
"ora": "^5.4.1",
"prompts": "^2.4.2",
"slugify": "^1.6.1",
"slugify": "^1.6.6",
"to-title-case": "^1.0.0",
"tsconfig-paths": "^3.9.0",
"tslib": "^2.3.1"
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/src/commands/generate/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default class GenerateAction extends Command {
)
this.spinner.succeed(`Scaffold action`)
} catch (err) {
this.spinner.fail(`Scaffold action: ${chalk.red(err.message)}`)
this.spinner.fail(`Scaffold action: ${chalk.red((err as Error).message)}`)
this.exit()
}

Expand All @@ -127,7 +127,7 @@ export default class GenerateAction extends Command {
)
this.spinner.succeed(`Creating snapshot tests for ${chalk.bold(`${destination}'s ${slug}`)} destination action`)
} catch (err) {
this.spinner.fail(`Snapshot test creation failed: ${chalk.red(err.message)}`)
this.spinner.fail(`Snapshot test creation failed: ${chalk.red((err as Error).message)}`)
this.exit()
}
}
Expand All @@ -142,7 +142,7 @@ export default class GenerateAction extends Command {
fs.writeFileSync(entryFile, updatedCode, 'utf8')
this.spinner.succeed()
} catch (err) {
this.spinner.fail(chalk`Failed to update your destination imports: ${err.message}`)
this.spinner.fail(chalk`Failed to update your destination imports: ${(err as Error).message}`)
this.exit()
}

Expand All @@ -151,7 +151,7 @@ export default class GenerateAction extends Command {
await GenerateTypes.run(['--path', entryFile])
this.spinner.succeed()
} catch (err) {
this.spinner.fail(chalk`Generating types for {magenta ${slug}} action: ${err.message}`)
this.spinner.fail(chalk`Generating types for {magenta ${slug}} action: ${(err as Error).message}`)
this.exit()
}

Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default class Init extends Command {
renderTemplates(templatePath, targetDirectory, { ...answers, slugWithoutActions })
this.spinner.succeed(`Scaffold integration`)
} catch (err) {
this.spinner.fail(`Scaffold integration: ${chalk.red(err.message)}`)
this.spinner.fail(`Scaffold integration: ${chalk.red((err as Error).message)}`)
this.exit()
}

Expand All @@ -140,7 +140,7 @@ export default class Init extends Command {
await GenerateTypes.run(['--path', entryPath])
this.spinner.succeed()
} catch (err) {
this.spinner.fail(chalk`Generating types for {magenta ${slug}} destination: ${err.message}`)
this.spinner.fail(chalk`Generating types for {magenta ${slug}} destination: ${(err as Error).message}`)
}

if (!isBrowserTemplate) {
Expand All @@ -156,7 +156,7 @@ export default class Init extends Command {
)
this.spinner.succeed(`Created snapshot tests for ${slug} destination`)
} catch (err) {
this.spinner.fail(`Snapshot test creation failed: ${chalk.red(err.message)}`)
this.spinner.fail(`Snapshot test creation failed: ${chalk.red((err as Error).message)}`)
this.exit()
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/logger.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Logger } from 'ecs-logs-js'

const logger = new Logger({
level: process.env.LOG_LEVEL || 'debug',
level: (process.env.LOG_LEVEL as Logger['level']) || 'debug',
devMode: true
})

Expand Down
6 changes: 5 additions & 1 deletion packages/cli/src/lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,11 @@ function setupRoutes(def: DestinationDefinition | null): void {
// Construct a list of all the available routes to stdout
const routes: string[] = []
for (const r of router.stack) {
for (const [m, enabled] of Object.entries(r.route.methods)) {
if (!r.route) {
continue
}

for (const [m, enabled] of Object.entries((r.route as unknown as any).methods)) {
if (enabled && r.route.path !== '/manifest') {
routes.push(` ${m.toUpperCase()} ${r.route.path}`)
}
Expand Down
Loading
Loading