Skip to content

Commit

Permalink
Merge pull request #328 from zeeshanakram3/yarn-to-npm-migration
Browse files Browse the repository at this point in the history
migrate from `yarn` to `npm` and update dependency versions
  • Loading branch information
zeeshanakram3 committed Apr 26, 2024
2 parents 47142a2 + 7091144 commit 79e6d2b
Show file tree
Hide file tree
Showing 12 changed files with 36,272 additions and 23,974 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn build
- name: yarn pack test
npm install --frozen-lockfile
npm run build
- name: npm pack test
run: |
yarn pack --filename youtube-synch-test.tgz
tar zxvf ./youtube-synch-test.tgz
cd ./package && yarn link
PACKAGE_VERSION=$(jq -r '.version' package.json)
npm pack
tar zxvf ./youtube-sync-${PACKAGE_VERSION}.tgz
cd ./package && npm link
build_osx:
name: MacOS Checks
Expand All @@ -38,10 +39,11 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: checks
run: |
yarn install --frozen-lockfile
yarn build
- name: yarn pack test
npm install --frozen-lockfile
npm run build
- name: npm pack test
run: |
yarn pack --filename youtube-synch-test.tgz
tar zxvf ./youtube-synch-test.tgz
cd ./package && yarn link
PACKAGE_VERSION=$(jq -r '.version' package.json)
npm pack
tar zxvf ./youtube-sync-${PACKAGE_VERSION}.tgz
cd ./package && npm link
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn install --frozen-lockfile
yarn lint
npm install --frozen-lockfile
npm run lint
lint_osx:
name: MacOS Checks
Expand All @@ -33,5 +33,5 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: lint
run: |
yarn install --frozen-lockfile
yarn lint
npm install --frozen-lockfile
npm run lint
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 3.8.0

- Migrates from `yarn` to `npm` as dependency manager
- Updates `@polkadot/js` dependency (included in `@joystream/js`) version to be compatible with Nara runtime
- Updates `@graphql-codegen/cli` dependency version

### 3.7.0

- Adjust sync limits for different YPP tiers
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
RUN npm install -g node-gyp

# Copy the package.json and yarn.lock (or package-lock.json for npm) files
COPY package.json yarn.lock ./
COPY package.json package-lock.json ./

# Install dependencies
RUN yarn install
RUN npm install

# Copy the rest of your application
COPY . .

# Build the project
RUN yarn build
RUN npm run build

# Set the command to run when a container based on the image is started
CMD ["./scripts/start-youtube-synch-httpApi.sh"]
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ The Youtube-Synch node is used for youtube's creator onboarding and replicating

- Docker
- aws cli
- yarn
- nodejs
- npm >= 9.0.0
- nodejs >= 18.0.0

# Buildings the Youtube-Synch node

- Install dependencies
`yarn`
`npm install`
- Build the project
`yarn build`
`npm run build`

# Running the Youtube-Synch node

Expand Down Expand Up @@ -58,7 +58,7 @@ For running a local instance of dynamodb, this is useful is useful for testing &

### Local DynamoDB

- `yarn dynamodb:start` to start the local instance of dynamoDB.
- `npm dynamodb:start` to start the local instance of dynamoDB.
- Also if you want to use the local instance of dynamoDB, you need to set the following environment variable:
- `YT_SYNCH__AWS__ENDPOINT` to `http://localhost:4566`

Expand All @@ -77,7 +77,7 @@ Next there are two options, either you can provide the credentials in the `~/.aw

Youtube-synch service can be run as a nodejs program or as a docker container. The service depends on the above described configurations so please make sure to configure the env vars/config file before running the node.

To run Youtube-synch service as nodejs program, run `yarn start`
To run Youtube-synch service as nodejs program, run `npm start`

For running Youtube-synch service as a docker container, run `docker-compose up -d` at root of the project. This will start the service in the background.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ OPTIONS
--all see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.3.1/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.18/src/commands/help.ts)_

0 comments on commit 79e6d2b

Please sign in to comment.