Skip to content

Commit

Permalink
fix(deps): update turbo monorepo to v2 (major) (#384)
Browse files Browse the repository at this point in the history
* fix(deps): update turbo monorepo to v2

* fix turbo.json

* fix dockerfile

* fix docker build

* fix format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: chiol <chiyoung.jeong@linecorp.com>
  • Loading branch information
renovate[bot] and chiol authored Jul 19, 2024
1 parent b8303b6 commit ad91773
Show file tree
Hide file tree
Showing 22 changed files with 71 additions and 64 deletions.
4 changes: 2 additions & 2 deletions apps/web/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './src/env.mjs';

import path from 'path';
import { fileURLToPath } from 'url';
import createJiti from 'jiti';

import * as i18nConfig from './next-i18next.config.js';

createJiti(fileURLToPath(import.meta.url))('./src/env');
const __dirname = fileURLToPath(new URL('.', import.meta.url));

/** @type {import('next').NextConfig} */
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"eslint": "^9.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jiti": "^1.21.6",
"msw": "^2.3.0",
"next-router-mock": "^0.9.13",
"node-mocks-http": "^1.14.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {

import { cn, useOAIQuery } from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';

interface IProps {
channelId: number;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/entities/tenant/ui/tenant-guard.ui.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import mockRouter from 'next-router-mock';

import { Path } from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';
import { server } from '@/msw';
import { render, screen, waitFor } from '@/test-utils';
import { useTenantStore } from '../tenant.model';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { faker } from '@faker-js/faker';
import { http, HttpResponse } from 'msw';

import { env } from '@/env.mjs';
import { env } from '@/env';

export const signInWithOAuthMockHandlers = [
http.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { faker } from '@faker-js/faker';
import userEvent from '@testing-library/user-event';
import { http, HttpResponse } from 'msw';

import { env } from '@/env.mjs';
import { env } from '@/env';
import { server } from '@/msw';
import { render, screen, waitFor } from '@/test-utils';
import CreateTenantForm from './create-tenant-form.ui';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/api/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { z } from 'zod';

import type { Jwt } from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';
import { createNextApiHandler, procedure } from '@/server/api-handler';
import type { JwtSession } from '@/server/iron-option';
import { ironOption } from '@/server/iron-option';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/api/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { z } from 'zod';

import type { Jwt } from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';
import { createNextApiHandler, procedure } from '@/server/api-handler';
import type { JwtSession } from '@/server/iron-option';
import { ironOption } from '@/server/iron-option';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/pages/api/refresh-jwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getIronSession } from 'iron-session';

import type { Jwt } from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';
import { createNextApiHandler } from '@/server/api-handler';
import type { JwtSession } from '@/server/iron-option';
import { ironOption } from '@/server/iron-option';
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/server/iron-option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
import type { SessionOptions } from 'iron-session';

import { env } from '@/env.mjs';
import { env } from '@/env';

export const ironOption: SessionOptions = {
cookieName: 'user-feedback',
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shared/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import type {
OAIResponse,
} from '@/shared';

import { env } from '@/env.mjs';
import { env } from '@/env';

class client {
private axiosInstance = axios.create({
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shared/ui/help-card-docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Trans } from 'react-i18next';

import { Icon } from '@ufb/ui';

import { env } from '@/env.mjs';
import { env } from '@/env';

type I18nKey =
| 'help-card.image-config'
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/shared/utils/path-parsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* License for the specific language governing permissions and limitations
* under the License.
*/
import { env } from '@/env.mjs';
import { env } from '@/env';

export const getRequestUrl = (
path: string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import type { DateRangeType } from '@/shared';
import { DATE_FORMAT, useQueryParamsState } from '@/shared';
import { EMPTY_FUNCTION } from '@/shared/utils/empty-function';

import { env } from '@/env.mjs';
import { env } from '@/env';

const DEFAULT_DATE_RANGE: DateRangeType = {
startDate: dayjs().subtract(env.NEXT_PUBLIC_MAX_DAYS, 'day').toDate(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { DateRangePicker, TablePagination, TableSearchInput } from '@/shared';
import type { Field } from '@/entities/field';
import { useIssueSearch } from '@/entities/issue';

import { env } from '@/env.mjs';
import { env } from '@/env';
import type { FeedbackColumnType } from '../feedback-table-columns';
import { useFeedbackTable } from '../model';
import ChannelSelectBox from './channel-select-box';
Expand Down
2 changes: 1 addition & 1 deletion docker/api.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add --no-cache libc6-compat

# Set working directory
WORKDIR /app
RUN npm install -g turbo@^1.13.2
RUN npm install -g turbo
COPY . .
RUN turbo prune --scope=api --docker

Expand Down
4 changes: 2 additions & 2 deletions docker/web.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk add --no-cache libc6-compat

# Set working directory
WORKDIR /app
RUN npm install -g turbo@^1.13.2
RUN npm install -g turbo
COPY . .
RUN turbo prune --scope=web --docker

Expand Down Expand Up @@ -41,7 +41,7 @@ ARG TURBO_TEAM
ENV TURBO_TEAM=${TURBO_TEAM}

COPY --from=builder /app/apps/web/.env.build /app/apps/web/.env.production
RUN SKIP_ENV_VALIDATION=1 pnpm dlx turbo run build --filter=web...
RUN SKIP_ENV_VALIDATION=true pnpm dlx turbo run build --filter=web...

FROM base AS runner
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"devDependencies": {
"@ufb/prettier-config": "workspace:*",
"prettier": "^3.2.5",
"turbo": "^1.13.2",
"turbo": "^2.0.0",
"typescript": "^5.4.5"
},
"packageManager": "pnpm@9.4.0",
Expand Down
79 changes: 41 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tooling/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"eslint-config-prettier": "^9.1.0",
"eslint-config-turbo": "^1.13.2",
"eslint-config-turbo": "^2.0.0",
"@ufb/eslint-plugin-header": "workspace:*",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
15 changes: 9 additions & 6 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$schema": "https://turbo.build/schema.json",
"experimentalUI": true,
"globalDependencies": ["**/.env"],
"pipeline": {
"ui": "tui",
"tasks": {
"topo": {
"dependsOn": ["^topo"]
},
Expand All @@ -22,7 +21,7 @@
},
"format": {
"outputs": ["node_modules/.cache/.prettiercache"],
"outputMode": "new-only"
"outputLogs": "new-only"
},
"@ufb/tailwind#build": {
"outputs": ["dist/**"]
Expand All @@ -48,6 +47,7 @@
"cache": false
}
},
"globalDependencies": ["**/.env"],
"globalEnv": [
"NODE_ENV",
"SESSION_PASSWORD",
Expand All @@ -72,6 +72,9 @@
"AUTO_MIGRATION",
"MASTER_API_KEY",
"BASE_URL",
"NEXT_PUBLIC_MAX_DAYS"
]
"NEXT_PUBLIC_MAX_DAYS",
"SKIP_ENV_VALIDATION",
"PORT"
],
"globalPassThroughEnv": ["NODE_ENV", "CI", "npm_lifecycle_event"]
}

0 comments on commit ad91773

Please sign in to comment.