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

Migrate from yarn to pnpm #2424

Merged
merged 41 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
93e422e
Migrate from yarn to pnpm
rudyflores Aug 10, 2023
ec91da2
add hoist
rudyflores Aug 10, 2023
d95f295
fix lint issues
rudyflores Aug 10, 2023
4df7f6d
remove node 14.x since unsupported on pnpm 8
rudyflores Aug 10, 2023
815290a
remove node 14.x from ftp as well
rudyflores Aug 10, 2023
f45a115
fix broken unit test
rudyflores Aug 10, 2023
29c6f4c
translate workspace to filter property for pnpm
rudyflores Aug 10, 2023
df5b983
add latest lock file
rudyflores Aug 10, 2023
dd13c33
revert edits to unit tests
rudyflores Aug 18, 2023
be461c8
add shamefully-hoist to npmrc
rudyflores Aug 18, 2023
d11bb0d
remove github actions from PR
rudyflores Aug 22, 2023
4fd4dd2
revert to proper cli version
rudyflores Aug 23, 2023
33078cc
update workflows
rudyflores Aug 28, 2023
e4eceba
fix gui error issue
rudyflores Aug 28, 2023
c3c7f5a
resolve merge conflict
rudyflores Aug 28, 2023
e93e54b
solve webview bundling issue
rudyflores Aug 28, 2023
f322461
run tests in parallel for faster speeds
rudyflores Aug 28, 2023
7ab0ab3
fix missing property on unit test
rudyflores Aug 28, 2023
5880698
update readme and workspace definitions
rudyflores Aug 28, 2023
a10ef02
fix package command
rudyflores Aug 28, 2023
44a5e2c
remove install from top level prepare script
rudyflores Sep 7, 2023
b5c6d2c
add changelog
rudyflores Sep 8, 2023
cbc4ada
add fix for fresh-clone on windows
rudyflores Sep 8, 2023
749b78c
add fresh-clone for webviews package
rudyflores Sep 11, 2023
bdd45cc
Merge branch 'next' into migrate-to-new-tools2
rudyflores Sep 18, 2023
7b81562
update package-lock
rudyflores Sep 18, 2023
96f87e4
fix lint check
rudyflores Sep 18, 2023
72d5ab3
fix for lint error on ftp
rudyflores Sep 20, 2023
0ae66da
Revert "fix for lint error on ftp"
rudyflores Sep 20, 2023
c3e53e7
fix for lint error on ftp
rudyflores Sep 20, 2023
b297ab6
solve ftp issue with lint error
rudyflores Sep 20, 2023
d3225ca
Revert "solve ftp issue with lint error"
rudyflores Sep 20, 2023
39a0084
add build command to workflow
rudyflores Sep 20, 2023
91d22ac
add back missing lint prettier calls
rudyflores Sep 20, 2023
4ecc555
add missing build command to workflows
rudyflores Sep 20, 2023
25d2212
merge next and resolve conflicts
rudyflores Sep 22, 2023
ffd0aad
correct new workflows from merge to use pnpm
rudyflores Sep 22, 2023
f8bde65
remove old sample workspace location
rudyflores Sep 22, 2023
657e310
fix for samples github action
rudyflores Oct 2, 2023
5eae45a
bundle inner repo in vue-sample
rudyflores Oct 2, 2023
e329ee3
remove parallel and move to new script
rudyflores Oct 9, 2023
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/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating
- [ ] PR title follows [Conventional Commits Guidelines](https://www.conventionalcommits.org/en/v1.0.0-beta.2/)
- [ ] PR Description is included
- [ ] gif or screenshot is included if visual changes are made
- [ ] `yarn workspace vscode-extension-for-zowe vscode:prepublish` has been executed
- [ ] `pnpm --filter vscode-extension-for-zowe vscode:prepublish` has been executed
- [ ] All checks have passed (DCO, Jenkins and Code Coverage)
- [ ] I have added unit test and it is passing
- [ ] I have added integration test and it is passing
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
node-version: lts/*

- run: |
npm install -g yarn
yarn install --frozen-lockfile
npm install -g pnpm
pnpm install

- name: Check Vulnerabilities
run: yarn audit --production --groups dependencies
run: pnpm audit --prod
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
uses: awharn/check_changelog_action@v1
rudyflores marked this conversation as resolved.
Show resolved Hide resolved
with:
header: "## TBD Release"
yarnWorkspaces: true
lerna: true
6 changes: 3 additions & 3 deletions .github/workflows/circular-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
node-version: lts/*

- run: |
npm install -g yarn
yarn install --frozen-lockfile
npm install -g pnpm
pnpm install

- name: Run madge to check for circular dependencies
run: yarn madge
run: pnpm madge
6 changes: 3 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
with:
node-version: '16.x'

- name: Install Yarn and Lerna
run: npm install -g yarn lerna@6
- name: Install pnpm and Lerna
run: npm install -g pnpm lerna@6

- name: Build Source
run: yarn
run: pnpm

- name: Get Project Version
id: lerna
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ jobs:
node-version: lts/*

- run: |
npm install -g yarn
yarn install --frozen-lockfile
npm install -g pnpm
pnpm install

- run: |
pnpm build

- name: Lint
run: yarn lint
run: pnpm lint
15 changes: 10 additions & 5 deletions .github/workflows/theia-zowe-explorer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,20 @@ jobs:
# check out source
- uses: actions/checkout@v3

# install dependencies
- run: yarn install --frozen-lockfile
# install pnpm
- run: npm install -g pnpm

# install dependencies & build
- run: |
pnpm install
pnpm build

# copy test data file needed for build :-(
- name: Create test data file
run: cp packages/zowe-explorer/resources/testProfileData.example.ts packages/zowe-explorer/resources/testProfileData.ts

- name: Build vsix
run: yarn workspace vscode-extension-for-zowe package
run: pnpm --filter vscode-extension-for-zowe package

- name: Create extension install directory
run: mkdir -p temp/plugins && chmod -R 777 temp
Expand Down Expand Up @@ -71,9 +76,9 @@ jobs:
run: curl --fail http://localhost:3000

- name: Prep integration test files
run: yarn workspace vscode-extension-for-zowe build:integration
run: pnpm --filter vscode-extension-for-zowe build:integration

- run: yarn workspace vscode-extension-for-zowe test:theia
- run: pnpm --filter vscode-extension-for-zowe test:theia

- name: Upload test results
if: success() || failure()
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/zowe-explorer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# Continue to run tests on the other systems if one fails
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
# order operating systems from best to worst
os: [windows-latest, ubuntu-latest, macos-latest]

Expand All @@ -39,12 +39,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# install yarn
- run: npm install -g yarn
# install pnpm
- run: npm install -g pnpm

- run: yarn config set network-timeout 60000 && yarn install --frozen-lockfile
- run: pnpm config set network-timeout 60000 && pnpm install && pnpm build

- run: yarn test
- run: pnpm test
env:
CI: true
NODE_OPTIONS: --max_old_space_size=4096
Expand All @@ -70,7 +70,7 @@ jobs:

- name: Package VSIX
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
run: yarn package
run: pnpm package
working-directory: packages/zowe-explorer

- name: Archive VSIX artifact
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/zowe-explorer-ftp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# Continue to run tests on the other systems if one fails
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
# order operating systems from best to worst
os: [windows-latest, ubuntu-latest, macos-latest]

Expand All @@ -39,12 +39,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# install yarn
- run: npm install -g yarn
# install pnpm
- run: npm install -g pnpm

- run: yarn config set network-timeout 60000 && yarn install --frozen-lockfile
- run: pnpm config set network-timeout 60000 && pnpm install && pnpm build

- run: yarn workspace zowe-explorer-ftp-extension test
- run: pnpm --filter zowe-explorer-ftp-extension test
env:
CI: true
NODE_OPTIONS: --max_old_space_size=4096
Expand All @@ -65,7 +65,7 @@ jobs:

- name: Package VSIX
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '16.x'
run: yarn package
run: pnpm package
working-directory: packages/zowe-explorer-ftp-extension

- name: Archive VSIX artifact
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/zowe-explorer-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

# install yarn
- run: npm install -g yarn
# install pnpm
- run: npm install -g pnpm

- run: for dir in samples/*; do pushd $dir && yarn && yarn run compile && popd; done
- run: for dir in samples/*; do pushd $dir && pnpm --ignore-workspace i && pnpm run compile && popd; done
shell: bash
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ temp
*.tgz
.tmp
coverage/
v8-compile-cache-0/
dist/
prebuilds/
prebuilds/
samples/**/pnpm-lock.yaml
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
registry=https://registry.npmjs.org/
@zowe:registry=https://registry.npmjs.org/
t1m0thyj marked this conversation as resolved.
Show resolved Hide resolved
shamefully-hoist=true
public-hoist-pattern[]=*
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"type": "node",
"name": "Zowe Explorer Unit Tests (Jest)",
"request": "launch",
"program": "${workspaceFolder}/node_modules/yarn/bin/yarn.js",
"program": "${workspaceFolder}/node_modules/pnpm/bin/pnpm.js",
"args": ["run", "test"],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
Expand Down
6 changes: 3 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"options": {
"cwd": "${workspaceFolder}/packages/zowe-explorer"
},
"command": "yarn",
"command": "pnpm",
"args": ["watch"],
"problemMatcher": [
{
Expand Down Expand Up @@ -66,7 +66,7 @@
"options": {
"cwd": "${workspaceFolder}/packages/zowe-explorer-ftp-extension"
},
"command": "yarn",
"command": "pnpm",
"args": ["watch"],
"problemMatcher": [
{
Expand Down Expand Up @@ -117,7 +117,7 @@
"options": {
"cwd": "${workspaceFolder}/packages/zowe-explorer"
},
"command": "yarn",
"command": "pnpm",
"args": ["build:integration"],
"dependsOn": "Pretest"
},
Expand Down
1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Join our [Slack channel](https://slack.openmainframeproject.org/) to connect wit

Client-side prerequisites for development:

- Install [Node.js](https://nodejs.org/en/download/) v14.0 or later.
- Install [Yarn](https://classic.yarnpkg.com) Classic.
- Install [Node.js](https://nodejs.org/en/download/) v16.0 or later.
- Install [PNPM](https://pnpm.io/installation).

Host-side prerequisites for connection:

Expand Down Expand Up @@ -51,7 +51,7 @@ Clone the repository, build a VSIX file, and start working with the extension.
3. From your local copy of the repository, issue the following commands:

```shell
yarn install && yarn run package
pnpm install && pnpm run package
```

You can find the VSIX file in the `dist` folder.
Expand Down
32 changes: 20 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-zowe-explorer": "workspace:3.0.0-next.202309141150",
"husky": "^6.0.0",
"jest": "^29.3.1",
"jest-html-reporter": "^3.7.0",
Expand All @@ -41,24 +42,31 @@
"prettier": "2.6.0",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.3",
"ts-loader": "^8.2.0",
"typescript": "^4.5.3",
"vsce": "2.15.0",
"vscode-nls-dev": "^4.0.0",
"vscode-test": "^1.4.0",
"yarn": "1.22.19"
"vscode-test": "^1.4.0"
},
"overrides": {
"**/json5": "^2.2.2",
"**/optionator": "^0.9.3",
"**/semver": "^7.5.2"
},
"scripts": {
"clean": "yarn workspaces run clean",
"fresh-clone": "yarn workspaces run fresh-clone && rimraf node_modules",
"prepare": "husky install && yarn build",
"lint": "yarn workspaces run lint",
"lint:html": "yarn workspaces run lint:html",
"madge": "yarn workspaces run madge",
"clean": "pnpm -r run clean",
"fresh-clone": "pnpm -r --parallel fresh-clone && (rimraf node_modules || true)",
"prepare": "husky install",
"lint": "pnpm -r run lint",
"lint:html": "pnpm -r run lint:html",
"madge": "pnpm -r run madge",
"pretty": "prettier --write .",
"build": "yarn workspaces run build",
"test": "yarn workspaces run test",
"package": "yarn workspaces run package",
"build": "pnpm -r run build",
"test": "pnpm -r --reporter append-only run test",
"test:parallel": "pnpm -r --parallel run test",
"package": "pnpm run -r package",
"pretest:integration": "ts-node ./scripts/create-env.ts",
"posttest:integration": "ts-node ./scripts/clean-env.ts"
"posttest:integration": "ts-node ./scripts/clean-env.ts",
"preinstall": "npx only-allow pnpm"
}
}
1 change: 1 addition & 0 deletions packages/eslint-plugin-zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ All notable changes to the "eslint-plugin-zowe-explorer" package will be documen
### New features and enhancements

- Added placeholder `madge` script to `package.json` for workspace script to succeed.
- Migrated to new package manager PNPM from Yarn.

## `2.9.1`

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"private": true,
"scripts": {
"clean": "echo \"eslint-plugin: nothing to clean.\"",
"fresh-clone": "yarn clean && rimraf node_modules",
"fresh-clone": "pnpm clean && (rimraf node_modules || true)",
"test": "jest",
"build": "echo \"eslint-plugin: nothing to build.\"",
"lint": "echo \"eslint-plugin: nothing to lint.\"",
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t
- Removal of v1 profile support. [#2072](https://github.com/zowe/vscode-extension-for-zowe/issues/2072)
- Removal of deprecated APIs. Check the [list](https://github.com/zowe/vscode-extension-for-zowe/tree/next/docs/early-access/v3/Extenders.md) of APIs that were removed.
- Added `madge` script in `package.json` to track circular dependencies. [#2148](https://github.com/zowe/vscode-extension-for-zowe/issues/2148)
- Migrated to new package manager PNPM from Yarn.

## `2.11.0`

Expand Down
10 changes: 5 additions & 5 deletions packages/zowe-explorer-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"semver": "^7.5.3"
},
"scripts": {
"build": "yarn check-cli && yarn clean && yarn madge && tsc -p ./ && yarn license",
"build": "pnpm check-cli && pnpm clean && pnpm madge && tsc -p ./ && pnpm license",
"test:unit": "jest \".*__tests__.*\\.unit\\.test\\.ts\" --coverage",
"test": "yarn test:unit",
"lint": "concurrently -n \"_eslint_,prettier\" \"eslint .\" \"prettier --check .\"",
"test": "pnpm test:unit",
"lint": "concurrently -n \"_eslint_,prettier\" \"eslint .\" \"prettier --write . && prettier --check .\"",
"lint:html": "eslint . --format html > results/eslint.html",
"madge": "madge -c --no-color --no-spinner --exclude __mocks__ --extensions js,ts src/",
"pretty": "prettier --write .",
"check-cli": "node scripts/check-cli.js",
"clean": "rimraf lib",
"fresh-clone": "yarn clean && rimraf node_modules",
"fresh-clone": "pnpm clean && (rimraf node_modules || true)",
"license": "node ../../scripts/updateLicenses.js",
"package": "yarn build && npm pack && node ../../scripts/mv-pack.js zowe-zowe-explorer-api tgz"
"package": "pnpm build && pnpm pack && node ../../scripts/mv-pack.js zowe-zowe-explorer-api tgz"
},
"jest": {
"moduleFileExtensions": [
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer-ftp-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to the "zowe-explorer-ftp-extension" extension will be docum
- Removal of support for Zowe Explorer APIs that have been removed. Check the [list](https://github.com/zowe/vscode-extension-for-zowe/tree/next/docs/early-access/v3/Extenders.md) of APIs that were removed.
- Updated activation event to `onStartupFinished`. [#1910](https://github.com/zowe/vscode-extension-for-zowe/issues/1910)
- Added `madge` script in `package.json` to track circular dependencies. [#2148](https://github.com/zowe/vscode-extension-for-zowe/issues/2148)
- Migrated to new package manager PNPM from Yarn.

## `2.11.0`

Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer-ftp-extension/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Although currently limited to USS, the plan is to complete the implementation to

## How to build

This repo uses [Yarn](https://yarnpkg.com/) for building.
This repo uses [PNPM](https://pnpm.io/) for building.

1. Clone this `zowe-explorer` repo:

Expand All @@ -17,7 +17,7 @@ This repo uses [Yarn](https://yarnpkg.com/) for building.
1. Build the entire repo comprising of Zowe Explorer, Zowe Explorer API, and Zowe Explorer FTP with the following command:

```bash
yarn && yarn package
pnpm install && pnpm package
```

## How to run and debug
Expand Down
Loading
Loading