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

drop yarn for npm and bump angular #260

Merged
merged 6 commits into from
Feb 10, 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
34 changes: 9 additions & 25 deletions .github/workflows/web-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,36 +64,20 @@ jobs:
echo ${{ steps.docker-prep.outputs.tags }}
echo ${{ steps.docker-prep.outputs.created }}

- name: Install Node
uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: '18.12.1'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache node modules
uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-
node-version: 20
cache: 'npm'
cache-dependency-path: src/NuGetTrends.Web/Portal/package-lock.json

- name: Install Angular CLI
run: npm install -g @angular/[email protected]

- name: Install Yarn
run: npm install -g yarn
run: npm install -g @angular/[email protected]

- name: Test/print Angular CLI versoin
- name: Test/print Angular CLI version
run: ng version

- name: 'Install SPA packages'
run: yarn install
run: npm install
working-directory: src/NuGetTrends.Web/Portal

# TODO: Enable again when we migrate to ESLint
Expand All @@ -102,12 +86,12 @@ jobs:
# working-directory: src/NuGetTrends.Web/Portal

- name: 'SPA test'
run: yarn run test-cc
run: npm run test-cc
working-directory: src/NuGetTrends.Web/Portal

- name: 'SPA prod build'
# Angular runs a prod build by default
run: yarn run build
run: npm run build
working-directory: src/NuGetTrends.Web/Portal

- name: Replace SPA path on coverage file (Hack codecov) # https://community.codecov.io/t/looking-for-assistance-with-path-fixing/1669/9
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Please raise an issue to discuss changes before raising large PRs.

### Requirements

- .NET SDK 7
- .NET SDK 8
- Docker, Compose (for the dependencies, postgres, rabbitmq)
- Node.js 15.0.1 (might also work with higher versions)
- Yarn (We use Yarn instead of npm)
- Node.js 20.10.0 (might also work with higher versions)
- NPM


### Run dependant services
Expand Down Expand Up @@ -44,7 +44,7 @@ The website is composed by two parts: An Angular SPA and an ASP.NET Core API. Th
To run it locally:

**SPA** (src/NuGetTrends.Web/Portal)
1. Install the SPA dependencies: `yarn install` (only the first time)
1. Install the SPA dependencies: `npm install` (only the first time)
2. Run the SPA: `ng serve`

**API** (src/NuGetTrends.Web)
Expand Down
8 changes: 4 additions & 4 deletions src/NuGetTrends.Web/Portal/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,22 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "nuget-trends:build"
"buildTarget": "nuget-trends:build"
},
"configurations": {
"production": {
"browserTarget": "nuget-trends:build:production"
"buildTarget": "nuget-trends:build:production"
},
"development": {
"browserTarget": "nuget-trends:build:development"
"buildTarget": "nuget-trends:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "nuget-trends:build"
"buildTarget": "nuget-trends:build"
}
},
"test": {
Expand Down
Loading
Loading