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

Fix broken web deploy #1216

Merged
merged 14 commits into from
Jan 24, 2025
Merged

Fix broken web deploy #1216

merged 14 commits into from
Jan 24, 2025

Conversation

suddenlyGiovanni
Copy link
Owner

@suddenlyGiovanni suddenlyGiovanni commented Jan 24, 2025

Description

This pull request simplifies and modernizes multiple configurations and dependencies in the project:

  • Storybook Updates:

    • Simplified Storybook configuration by removing custom path resolution logic and relying on package names directly.
    • Migrated Storybook setup to use an async function for better flexibility. Utilized import.meta.resolve for path resolution and adopted the defineConfig wrapper.
  • Dependency Updates:

    • Updated react-dom dependency in package.json to use caret range for better compatibility.
    • Set virtual-store-dir in .npmrc for improved default compatibility with pnpm. Removed deprecated warnings from pnpm-lock.yaml for cleaner metadata.
  • Enhancements:

    • Added Tailwind CSS language server as a dev dependency to improve the development experience with Tailwind.
  • Chore Items:

    • Updated .dockerignore and .gitignore rules for improved clarity and environment support.
    • Updated .nvmrc to specify Node.js version 23.6 for consistency.
    • Refreshed nix
      This pull request includes various updates and improvements across multiple files in the project. The changes mainly focus on updating dependencies, modifying configuration files, and cleaning up the codebase. Below are the most important changes:

Dependency Updates:

  • Updated the react-dom dependency to use a caret version instead of a fixed version in package.json and pnpm-lock.yaml files. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added @tailwindcss/language-server to devDependencies in package.json and pnpm-lock.yaml. [1] [2]

Configuration Changes:

  • Updated the Node.js version in .nvmrc to 23.6 and modified the base image in Dockerfile to use node:23.6-alpine3.21. [1] [2]
  • Updated .dockerignore to include additional directories and files such as .direnv and .git/. [1] [2] [3] [4]
  • Modified .npmrc to change the virtual-store-dir to node_modules/.pnpm.

Codebase Simplification:

  • Simplified the main.ts configuration file in the packages/ui/.storybook directory by removing unnecessary functions and using default paths for Storybook addons. [1] [2]

Environment Configuration:

  • Updated NODE_OPTIONS in apps/web/.development.env to remove deprecated options.

These changes collectively aim to keep the project dependencies up-to-date, enhance configuration management, and simplify the codebase for better maintainability.

Updated nixpkgs to the latest revision to incorporate new changes. This helps ensure the environment is up-to-date and consistent with the latest improvements and fixes.
Update .nvmrc to specify Node.js version 23.6. Ensures consistency with the project's required environment setup.
Add missing entries and restructure ignore files for clarity and consistency across the repository. Removed redundant patterns and adjusted entries to support better local and CI environments.
Removed deprecated warnings for dependencies in pnpm-lock.yaml. This cleans up the output related to outdated messages for better clarity and maintainability. No changes were made to the actual dependencies or functionality.
Updated react-dom dependency specification in package.json and related files to use caret range (^19.0.0). This ensures compatibility with future minor and patch releases, improving dependency handling.
Includes @tailwindcss/language-server as a dev dependency. Updates .idea configuration to use the Tailwind CSS language server for enhanced development experience. Also notes deprecated packages and improves clarity in the pnpm-lock.yaml file.
…ations

Set `virtual-store-dir` to `node_modules/.pnpm` in `.npmrc` for better default compatibility. Removed deprecated warnings from `pnpm-lock.yaml` to clean up outdated metadata and ensure smoother dependency management.
Refactored the Storybook configuration to use an async function for better flexibility and modernization. Updated the `getAbsolutePath` function to leverage `import.meta.resolve` for resolving module paths. Simplified the default export with the new `defineConfig` wrapper.
Removed custom path resolution logic for Storybook addons and framework, relying directly on package names. This simplifies the configuration by eliminating unnecessary complexity and aligns with standard practices.
Copy link

changeset-bot bot commented Jan 24, 2025

⚠️ No Changeset found

Latest commit: 4a478a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

.npmrc Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[misspell] reported by reviewdog 🐶
"behaviour" is a misspelling of "behavior"

; If this is enabled, the primary behaviour of pnpm install becomes that of

Copy link

socket-security bot commented Jan 24, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@tailwindcss/[email protected] None 0 6.97 MB thecrypticace
npm/@types/[email protected] 🔁 npm/@types/[email protected] None +1 2.05 MB types

View full report↗︎

Updated Dockerfile to use Node.js 23.6-alpine3.21 for better compatibility and performance. Removed deprecated `--experimental-strip-types` flag from NODE_OPTIONS and CMD to align with the latest Node.js features.
@@ -10,7 +10,7 @@ RUN apk add --no-cache jq
RUN jq -r .packageManager package.json > pnpm-version.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3018> reported by reviewdog 🐶
Pin versions in apk add. Instead of apk add <package> use apk add <package>=<version>

RUN apk add --no-cache jq

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <SC2046> reported by reviewdog 🐶
Quote this to prevent word splitting.

RUN corepack enable \

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.

RUN pnpm dlx turbo prune --docker "@suddenlygiovanni/web"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <SC2164> reported by reviewdog 🐶
Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

RUN cd ./apps/web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3003> reported by reviewdog 🐶
Use WORKDIR to switch to a directory

RUN cd ./apps/web

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [hadolint] <DL3059> reported by reviewdog 🐶
Multiple consecutive RUN instructions. Consider consolidation.

RUN pnpm --filter @suddenlygiovanni/web --prod --no-optional deploy pruned

@suddenlyGiovanni suddenlyGiovanni changed the title Simplify and modernize configuration and dependencies Fix broken web deploy Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 12 changed files in this pull request and generated no comments.

Files not reviewed (9)
  • .dockerignore: Language not supported
  • .idea/tailwindcss.xml: Language not supported
  • .npmrc: Language not supported
  • .nvmrc: Language not supported
  • apps/web/.development.env: Language not supported
  • apps/web/.dockerignore: Language not supported
  • apps/web/Dockerfile: Language not supported
  • package.json: Language not supported
  • pnpm-lock.yaml: File too large
Comments suppressed due to low confidence (1)

packages/ui/.storybook/main.ts:3

  • Ensure that the new async configuration function is covered by tests to verify its correctness.
async function defineConfig(config: StorybookConfig): Promise<StorybookConfig> {
Updated the Storybook configuration function from async to a synchronous arrow function for improved simplicity and readability. This change has no impact on functionality but streamlines the code structure.
@suddenlyGiovanni suddenlyGiovanni marked this pull request as ready for review January 24, 2025 12:13
Updated vite peer dependency ranges across multiple packages to introduce broader version compatibility. Ensures support for `vite` versions 4.x, 5.x, and 6.x where applicable, aligning dependencies for better project consistency.
Updated several dependencies to their latest versions, including bumping `@types/react` from 19.0.2 to 19.0.8. Adjusted peer dependency and lock file consistency to reflect these updates and maintain compatibility.
Simplifies the configuration by clearing the allowedVersions object under peerDependencyRules. This change aligns dependencies without imposing specific version constraints for @react-router/dev.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"

'@babel/helper-optimise-call-expression': 7.25.9

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[misspell] reported by reviewdog 🐶
"optimise" is a misspelling of "optimize"

'@babel/helper-optimise-call-expression': 7.25.9

@suddenlyGiovanni suddenlyGiovanni merged commit 6f5bebe into main Jan 24, 2025
19 checks passed
@suddenlyGiovanni suddenlyGiovanni deleted the web/unstack-deploy branch January 24, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant