Skip to content

switch from yarn to npm #3019

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

Merged
merged 1 commit into from
Apr 26, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install -g yarn && yarn install
- run: npm install
- run: apt-get update && apt-get -y install libcmark-dev
- name: Install Carton
uses: perl-actions/install-with-cpm@stable
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ FROM metacpan/metacpan-base:latest

ARG CPM_ARGS=--with-test

ENV NO_UPDATE_NOTIFIER=1

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash \
&& curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y -f --no-install-recommends libcmark-dev dumb-init nodejs yarn=1.19.2-1 \
&& apt-get install -y -f --no-install-recommends libcmark-dev dumb-init nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& npm install -g npm \
&& rm -rf /var/lib/apt/lists/* /root/.npm

COPY . /metacpan-web/
WORKDIR /metacpan-web

RUN npm install --verbose && npm cache clean --force

RUN cpanm --notest App::cpm \
&& cpm install -g Carton \
&& useradd -m metacpan-web -g users \
Expand All @@ -25,8 +28,6 @@ RUN chown -R metacpan-web:users /metacpan-web

USER metacpan-web:users

RUN yarn install --verbose && yarn cache clean

EXPOSE 5001

# Runs "/usr/bin/dumb-init -- /my/script --with --args"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you prefer not to use Docker, the following commands will get you started:
## Installing Manually

carton install
yarn install
npm install
export PATH="$(realpath ./node_modules/.bin):$PATH"

### Installing on macOS
Expand Down
2 changes: 1 addition & 1 deletion metacpan_web.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ consumer_key = metacpan.dev
cookie_secret = seekrit
consumer_secret = ClearAirTurbulence
log4perl_file = log4perl.conf
lessc_command = yarn -s run lessc
lessc_command = npx lessc

mark_unauthorized_releases = 0

Expand Down
Loading
Loading