Skip to content

Commit

Permalink
fix: Upgrade base-image to node.js 22.x LTS (#124)
Browse files Browse the repository at this point in the history
* fix: Upgrade base-image to node.js 22.x LTS

* fix: Error message unit tests

* fix: Update error message for tests

* fix: Error message update

* fix: Tests error message

* fix: Changed node version and modified build-backend-docker-image.yaml

* fix: build-core-docker-image

* fix: build.yaml

* fix: Added branch on build.yaml

* fix: Revert build.yaml
  • Loading branch information
ramonamartin10 authored Dec 18, 2024
1 parent 683a331 commit fa338fe
Show file tree
Hide file tree
Showing 29 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
node-version: 18.18.2
node-version: 22
cache: "npm"
cache-dependency-path: qg-api-service/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-typescript-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
check-latest: true
cache: 'npm'
cache-dependency-path: yaku-apps-typescript/package-lock.json
Expand Down
2 changes: 1 addition & 1 deletion core-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LABEL maintainer="Neutrinos GROW/PAT"
LABEL description="YAKU core docker image based on Ubuntu 22.04 image"

ARG DEBIAN_FRONTEND=noninteractive
ARG NODE_VERSION=18
ARG NODE_VERSION=22
ARG USERNAME="qguser"
ARG USER_UID=1001
ARG USER_GID=1000
Expand Down
6 changes: 3 additions & 3 deletions qg-api-service/qg-api-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# BUILD FOR LOCAL DEVELOPMENT
###################

ARG BASE_IMAGE_NAME="node:18-alpine"
ARG BASE_IMAGE_NAME="node:22-alpine"

FROM ${BASE_IMAGE_NAME} As development

Expand All @@ -21,7 +21,7 @@ RUN npm install -ws --include-workspace-root
# BUILD FOR PRODUCTION
###################

ARG BASE_IMAGE_NAME="node:18-alpine"
ARG BASE_IMAGE_NAME="node:22-alpine"

FROM ${BASE_IMAGE_NAME} As build

Expand All @@ -46,7 +46,7 @@ USER node
# PRODUCTION
###################

ARG BASE_IMAGE_NAME="node:18-alpine"
ARG BASE_IMAGE_NAME="node:22-alpine"

FROM ${BASE_IMAGE_NAME} As production

Expand Down
2 changes: 1 addition & 1 deletion qg-api-service/scale-run-test/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion qg-api-service/yaku-cli/src/handlers/environment.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('loadEnvironments()', () => {
// the error message must be specific to permissions
expect(consoleErrorSpy).toHaveBeenCalledWith(
chalk.red(
`Failed to parse '${testEnvFilePath}' as JSON: SyntaxError: Unexpected token ! in JSON at position 0`,
`Failed to parse '${testEnvFilePath}' as JSON: SyntaxError: Unexpected token '!', \"![]\" is not valid JSON`,
),
)
expect(existsSyncSpy).toHaveBeenCalledWith(testEnvFilePath)
Expand Down
2 changes: 1 addition & 1 deletion qg-api-service/yaku-cli/src/handlers/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('login()', () => {

expect(consoleErrorSpy).toHaveBeenCalledWith(
chalk.red(
`Failed to parse '${testEnvHome}/.yakurc' as JSON: SyntaxError: Unexpected token ! in JSON at position 0`,
`Failed to parse '${testEnvHome}/.yakurc' as JSON: SyntaxError: Unexpected token '!', \"!\" is not valid JSON`,
),
)
expect(consoleErrorSpy).toHaveBeenCalledWith(chalk.red('process.exit: 1'))
Expand Down
2 changes: 1 addition & 1 deletion qg-api-service/yaku-client-lib/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
splitting: false,
sourcemap: true,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
})
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
splitting: false,
sourcemap: true,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
})
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/git-fetcher/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/html-finalizer/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/jira-evaluator/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
splitting: false,
sourcemap: true,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
})
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/jira-fetcher/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
splitting: false,
sourcemap: true,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
})
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/jira-finalizer/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
entry: ['src/**/*.ts', 'lib/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/json-evaluator/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/mend-fetcher/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/smb-fetcher/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('getProjectStatus', async () => {
undefined,
),
).rejects.toThrowError(
'Could not parse sonarqube response as JSON, Unexpected token s in JSON at position 0',
`Could not parse sonarqube response as JSON, Unexpected token 's', "some invalid json" is not valid JSON`,
)
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('getProjectStatus', async () => {
undefined,
),
).rejects.toThrowError(
'Could not parse sonarqube response as JSON, Unexpected token s in JSON at position 0',
`Could not parse sonarqube response as JSON, Unexpected token 's', "some invalid json" is not valid JSON`,
)
})
})
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/apps/sonarqube/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
splitting: false,
sourcemap: true,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
})
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('readJson', () => {
vi.mocked(readFile).mockResolvedValueOnce('invalid json')

await expect(readJson('./invalid.json')).rejects.toThrow(
'File ./invalid.json could not be parsed, failed with error: SyntaxError: Unexpected token i in JSON at position 0',
`File ./invalid.json could not be parsed, failed with error: SyntaxError: Unexpected token 'i', "invalid json" is not valid JSON`,
)
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
2 changes: 1 addition & 1 deletion yaku-apps-typescript/packages/log-utils/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
entry: ['src/**/*.ts'],
splitting: false,
clean: true,
target: 'node18',
target: 'node22',
format: ['esm'],
bundle: false,
sourcemap: true,
Expand Down

0 comments on commit fa338fe

Please sign in to comment.