Skip to content

Commit

Permalink
chore: replace yarn with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
peara committed Nov 17, 2023
1 parent bd1f365 commit 2c34903
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9,143 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,13 @@ jobs:
with:
node-version: '16.14'
registry-url: https://npm.pkg.github.com/aura-nw
- name: Install Yarn
run: npm install -g yarn
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
path: ./node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[ -n "$CI" ] && exit 0

set -eux
yarn test
npm run test
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ FROM node:16-alpine
WORKDIR /app

# Install dependencies
COPY package.json package-lock.json yarn.lock ./
RUN yarn install
COPY package.json package-lock.json ./
RUN npm install

# Copy source
COPY . .

# Build and cleanup
ENV NODE_ENV=production
RUN yarn build
RUN npm run build

# Start server
CMD ["yarn", "start"]
CMD ["npm", "start"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ hasura metadata apply
[Config list network](network.json) to config list network with LCD, RPC, database
[Config chain](config.json) to setup job crawl and select chain id to crawl

## YARN scripts
## Scripts

- `yarn dev`: Start development mode (load all services locally with hot-reload & REPL)
- `yarn build`: Build .dist folder to start production mode
- `yarn start`: Start production mode (set `SERVICES` env variable to load certain services)
- `yarn lint`: Run ESLint
- `yarn test`: Run jest
- `npm run dev`: Start development mode (load all services locally with hot-reload & REPL)
- `npm run build`: Build .dist folder to start production mode
- `npm run start`: Start production mode (set `SERVICES` env variable to load certain services)
- `npm run lint`: Run ESLint
- `npm run test`: Run jest
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
"db:migrate:test:latest": "env DOTENV_CONFIG_PATH=./.env NODE_ENV=test ts-node --require dotenv/config ./node_modules/.bin/knex migrate:latest",
"db:migrate:test:rollback": "env DOTENV_CONFIG_PATH=./.env NODE_ENV=test ts-node --require dotenv/config ./node_modules/.bin/knex migrate:rollback",
"db:seed:make": "env DOTENV_CONFIG_PATH=./.env ts-node --require dotenv/config ./node_modules/.bin/knex seed:make",
"build": "yarn clean; tsc --project tsconfig.build.json",
"build": "npm run clean; tsc --project tsconfig.build.json",
"up": "docker-compose up -d",
"stop": "docker-compose stop",
"prepare": "husky install",
"jest": "NODE_OPTIONS='--loader ts-node/esm' jest",
"test": "docker compose up -d aurad && yarn jest --verbose --runInBand --forceExit && docker compose stop aurad && docker rm aurad_erascope",
"test-ci": "yarn jest --verbose --runInBand --forceExit",
"test-watch": "yarn jest --watch",
"test-coverage": "yarn jest --coverage",
"test": "docker compose up aurad -d && npm run jest --verbose --runInBand --forceExit && docker compose stop aurad && docker rm aurad_erascope",
"test-ci": "npm run jest --verbose --runInBand --forceExit",
"test-watch": "npm run jest --watch",
"test-coverage": "npm run jest --coverage",
"lint": "echo 'Running lint for repository' && eslint ."
},
"nodemonConfig": {
Expand Down Expand Up @@ -128,4 +128,4 @@
"tsconfig-paths": "^4.1.1",
"typescript": "^4.8.4"
}
}
}
Loading

0 comments on commit 2c34903

Please sign in to comment.