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 12 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
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 --frozen-lockfile --shamefully-hoist=true

- name: Check Vulnerabilities
run: yarn audit --production --groups dependencies
run: pnpm audit --prod
1 change: 0 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ jobs:
uses: awharn/check_changelog_action@v1
rudyflores marked this conversation as resolved.
Show resolved Hide resolved
with:
header: "## TBD Release"
yarnWorkspaces: 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 --frozen-lockfile --shamefully-hoist=true
rudyflores marked this conversation as resolved.
Show resolved Hide resolved

- 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 @@ -34,11 +34,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
6 changes: 3 additions & 3 deletions .github/workflows/lint.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 --frozen-lockfile --shamefully-hoist=true
rudyflores marked this conversation as resolved.
Show resolved Hide resolved

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

# install pnpm
- run: npm install -g pnpm

# install dependencies
- run: yarn install --frozen-lockfile
- run: pnpm install --frozen-lockfile --shamefully-hoist=true

# 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 +74,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 --frozen-lockfile --shamefully-hoist=true

- 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 --frozen-lockfile --shamefully-hoist=true

- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ temp
*.tgz
.tmp
coverage/
v8-compile-cache-0/
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 @@ -46,7 +46,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.

34 changes: 19 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"url": "https://github.com/zowe/vscode-extension-for-zowe"
},
"private": true,
"workspaces": [
"packages/*"
],
rudyflores marked this conversation as resolved.
Show resolved Hide resolved
"engines": {
"vscode": "^1.53.2"
},
Expand All @@ -28,6 +25,7 @@
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-zowe-explorer": "3.0.0-SNAPSHOT",
"husky": "^6.0.0",
"jest": "^29.3.1",
"jest-html-reporter": "^3.7.0",
Expand All @@ -40,24 +38,30 @@
"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",
"prepare": "husky install && pnpm build",
"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 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"
}
}
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",
"test": "jest",
"build": "echo \"eslint-plugin: nothing to build.\"",
"lint": "echo \"eslint-plugin: nothing to lint.\"",
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 @@ -20,18 +20,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",
"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
10 changes: 5 additions & 5 deletions packages/zowe-explorer-ftp-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@
"Zowe.vscode-extension-for-zowe"
],
"scripts": {
"build": "yarn clean && yarn madge && yarn license && webpack --mode development",
"build": "pnpm clean && pnpm madge && pnpm license && webpack --mode development",
"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 .",
"watch": "webpack --mode development --watch --info-verbosity verbose",
"clean": "rimraf out",
"fresh-clone": "yarn clean && rimraf node_modules",
"fresh-clone": "pnpm clean && rimraf node_modules",
"vscode:prepublish": "webpack --mode production",
"license": "node ../../scripts/updateLicenses.js",
"package": "vsce package --yarn && node ../../scripts/mv-pack.js zowe-explorer-ftp-extension vsix"
"package": "vsce package --no-dependencies && node ../../scripts/mv-pack.js zowe-explorer-ftp-extension vsix"
},
"engines": {
"vscode": "^1.53.2"
Expand Down
18 changes: 8 additions & 10 deletions packages/zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1913,26 +1913,26 @@
]
},
"scripts": {
"build": "gulp build && yarn madge && yarn license && webpack --mode development",
"build:integration": "yarn createTestProfileData && yarn license && tsc --pretty --project tsconfig-tests.json",
"build": "gulp build && pnpm madge && pnpm license && webpack --mode development",
"build:integration": "pnpm createTestProfileData && pnpm license && tsc --pretty --project tsconfig-tests.json",
"test:unit": "jest \".*__tests__.*\\.unit\\.test\\.ts\" --coverage",
"test:theia": "mocha ./out/__tests__/__theia__/*.theia.test.js --timeout 50000 --reporter mocha-multi-reporters --reporter-options configFile=.mocharc.json",
"test": "yarn test:unit",
"vscode:prepublish": "gulp build && webpack --mode production && yarn updateStrings && yarn run compile-web",
"test": "pnpm test:unit",
"vscode:prepublish": "gulp build && webpack --mode production && pnpm updateStrings && pnpm run compile-web",
"updateStrings": "node ../../scripts/stringUpdateScript.js && prettier --write --loglevel warn ./i18n package.nls*",
"package": "vsce package --yarn && node ../../scripts/mv-pack.js vscode-extension-for-zowe vsix",
"package": "vsce package --no-dependencies --allow-star-activation && node ../../scripts/mv-pack.js vscode-extension-for-zowe vsix",
rudyflores marked this conversation as resolved.
Show resolved Hide resolved
"license": "node ../../scripts/updateLicenses.js",
"watch": "gulp build && webpack --mode development --watch --info-verbosity verbose",
"compile": "tsc -b",
"compile-web": "webpack --target webworker --entry ./src/web/extension.ts --output-path ./out/src/web",
"markdown": "markdownlint CHANGELOG.md README.md",
"lint:pretty": "prettier --check .",
"lint": "yarn lint:src && yarn lint:tests && yarn lint:pretty && yarn markdown",
"lint:pretty": "prettier --write . && prettier --check .",
"lint": "pnpm lint:src && pnpm lint:tests && pnpm lint:pretty && pnpm markdown",
"lint:html": "eslint . --format html > results/eslint.html",
"lint:src": "eslint --format stylish src/**/*.ts",
"lint:tests": "eslint --format stylish __tests__/**/*.ts",
"clean": "gulp clean",
"fresh-clone": "yarn clean && rimraf node_modules",
"fresh-clone": "pnpm clean && rimraf node_modules",
"madge": "madge -c --no-color --no-spinner --exclude __mocks__ --extensions js,ts src/ || true",
"pretty": "prettier --write .",
"createTestProfileData": "ts-node ./scripts/createTestProfileData.ts",
Expand All @@ -1954,7 +1954,6 @@
"chalk": "^2.4.1",
"cross-env": "^5.2.0",
"del": "^4.1.1",
"eslint-plugin-zowe-explorer": "3.0.0-SNAPSHOT",
"event-stream": "^4.0.1",
"expect": "^24.8.0",
"geckodriver": "^1.19.1",
Expand All @@ -1974,7 +1973,6 @@
"run-sequence": "^2.2.1",
"selenium-webdriver": "^3.6.0",
"sinon": "^6.1.0",
"ts-loader": "^7.0.1",
"ts-node": "^8.10.1",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11"
Expand Down
Loading