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

Upgrade to yarn 3 #457

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# TODO: Uncomment this for yarn 3
# cache: yarn
# registry-url: https://npm.manageiq.org/
cache: ${{ !env.ACT && 'yarn' || '' }}
registry-url: https://npm.manageiq.org/
- name: Prepare tests
run: bin/setup
- name: Run tests
Expand Down
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dist/*.woff
dist/*.woff2
.tmp/
libs/
node_modules/
dist/index.html
tsd/
typings/
Expand All @@ -42,5 +41,13 @@ vendor.css
*.iml

coverage
yarn.lock
package-lock.json

/node_modules/
/.pnp.*
/.yarn/*
!/.yarn/patches
!/.yarn/plugins
!/.yarn/releases
!/.yarn/sdks
!/.yarn/versions
631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableGlobalCache: true
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.0.2.cjs
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,23 @@ For a great overview of using Angular 1.5.x Components please see: [NG-Conf 2016

## Development Environment

You need to have installed [Node.js >= 14 and npm >= 6](https://docs.npmjs.com/getting-started/installing-node) on your system.
It is recommended to use a node version manager such as [n](https://www.npmjs.com/package/n). If you have node installed then it is
just `yarn global add n` and then `n lts` to use the latest LTS version of node (see the docs for switching versions).
[nvm](https://github.com/nvm-sh/nvm) is *strongly* recommended for NodeJS version management.

Install these node packages globally in the system
```
npm install -g yarn
yarn global add webpack wiredep-cli typescript typescript-formatter
```bash
nvm install 12
nvm use 12

# Set version 12 as the default for all scripts
nvm alias default 12
```

After [yarn](http://yarn.io) is installed, it is pretty much a replacement for npm, with faster, more dependable builds
but still utilizing the npm packages.
You may need to restart your shell in order to source the nvm initialization environment.

See comparison: [npm vs. yarn commands](https://yarnpkg.com/en/docs/migrating-from-npm)
Then install `yarn` - you can find the recommended way for your platform at https://classic.yarnpkg.com/en/docs/install, or, if that fails, via npm.

```bash
npm install --global yarn
```

Install local node dependencies
```
Expand Down
9 changes: 5 additions & 4 deletions bin/before_install
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

set -e

if [ -n "$CI" ]; then
npm install --global yarn
if [ -n "$ACT" ]; then
# Install yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH
fi
6 changes: 1 addition & 5 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

set -e

if [ -n "$CI" ]; then
yarn global add typings webpack karma typescript
fi

yarn install
yarn
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build": "yarn run install-vendor && webpack -p",
"build-dev": "yarn run install-vendor && webpack",
"gettext:extract": "yarn run build && angular-gettext-cli --files './+(src|dist)/**/+(*.html|ui-components.js)' --dest './locale/ui-components.pot' --marker-names '__,N_' && yarn run gettext:validate",
"gettext:validate": "node scripts/validate-gettext-catalog.js",
"gettext:validate": "yarn node scripts/validate-gettext-catalog.js",
"install-vendor": "webpack --config webpack.vendor.config.js",
"build-docs": "jsdoc -c jsdoc-conf.json"
},
Expand All @@ -37,15 +37,15 @@
"angular-gettext-cli": "^1.2.0",
"angular-jsdoc": "~1.5.0",
"angular-mocks": "~1.5.9",
"angular-patternfly": "^3.15.0",
"angular-patternfly": "~3.26.0",
"angular-sanitize": "~1.5.9",
"awesome-typescript-loader": "~4.0.1",
"babel-eslint": "^7.2.3",
"bootstrap-combobox": "^1.0.2",
"bootstrap-datepicker": "^1.6.4",
"bootstrap-select": "~1.12.1",
"bootstrap-switch": "^3.3.4",
"browser-sync": "^2.18.2",
"browser-sync": "~2.18.2",
"browser-sync-spa": "^1.0.3",
"browser-sync-webpack-plugin": "^1.1.3",
"c3": "^0.4.11",
Expand Down Expand Up @@ -75,7 +75,7 @@
"ng-annotate-webpack-plugin": "0.1.3",
"node-sass": "^4.12.0",
"numeral": "^2.0.6",
"patternfly": "^3.15.0",
"patternfly": "~3.31.0",
"patternfly-bootstrap-treeview": "^2.1.5",
"raw-loader": "0.5.1",
"sass": "^0.5.0",
Expand All @@ -95,5 +95,6 @@
"es6-shim": "^0.35.3",
"es7-shim": "^6.0.0",
"sprintf-js": "^1.1.1"
}
},
"packageManager": "[email protected]"
}
Loading