Skip to content

Commit

Permalink
Issue #905: Switch codebase to Monorepo (#981)
Browse files Browse the repository at this point in the history
* Created packages. Fixed building.

Signed-off-by: Peter Haumer <[email protected]>

* VSIX patch script. Fixed launches.

Signed-off-by: Peter Haumer <[email protected]>

* Added vscode-nls to webpack

Signed-off-by: Peter Haumer <[email protected]>

* Simplified webpack config

* Move eslint plugin devDependency

* Switch github actions to yarn

* Switch theia github action to yarn

* Use yarn for installs and script running

* Extracted explorer-api and refactored

Signed-off-by: Peter Haumer <[email protected]>

* Added prettier

Signed-off-by: Peter Haumer <[email protected]>

* Renamed pub folder to dist

Signed-off-by: Peter Haumer <[email protected]>

* add/update scripts for pre/posttest:integration

Signed-off-by: Billie Simmons <[email protected]>

* Added ftp package files

Signed-off-by: Peter Haumer <[email protected]>

* Enabling webpack for FTP

Signed-off-by: Peter Haumer <[email protected]>

* Fixed eslint for ftp

Signed-off-by: Peter Haumer <[email protected]>

* Added FTP launch

Signed-off-by: Peter Haumer <[email protected]>

* Add DCO signoff for past commits

* Pretty 120 zowe explorer

Signed-off-by: Peter Haumer <[email protected]>

* Pretty 120 api

Signed-off-by: Peter Haumer <[email protected]>

* Pretty 120 ftp

Signed-off-by: Peter Haumer <[email protected]>

* Prettier top level

Signed-off-by: Peter Haumer <[email protected]>

* Merging 1.10 master branch

Signed-off-by: Peter Haumer <[email protected]>

* Prettier 120/4

Signed-off-by: Peter Haumer <[email protected]>

* Removed test profile

Signed-off-by: Peter Haumer <[email protected]>

* Updated gitignore

Signed-off-by: Peter Haumer <[email protected]>

* Add missing messages

Signed-off-by: zFernand0 <[email protected]>

* yarn package fixes

Signed-off-by: Peter Haumer <[email protected]>

* Move testProfileData.ts file creation to a script in zowe-explorer.
Remove it from workflow.
Trigger workflow only on changes to the zowe-explorer package

Signed-off-by: zFernand0 <[email protected]>

* Quick fix for uploading test results

Signed-off-by: zFernand0 <[email protected]>

* yarn and vsce devDeps

Signed-off-by: Peter Haumer <[email protected]>

* Profiles split

Signed-off-by: Peter Haumer <[email protected]>

* add yarnrc file

Signed-off-by: zFernand0 <[email protected]>

* Fixed imports

Signed-off-by: Peter Haumer <[email protected]>

* String updates

Signed-off-by: Peter Haumer <[email protected]>

* Moved another UI method

Signed-off-by: Peter Haumer <[email protected]>

* Update filepaths for monorepo

Signed-off-by: Lauren Li <[email protected]>

Co-authored-by: Vit Gottwald <[email protected]>
Co-authored-by: Billie Simmons <[email protected]>
Co-authored-by: zFernand0 <[email protected]>
Co-authored-by: Lauren Li <[email protected]>

Signed-off-by: zFernand0 <[email protected]>
  • Loading branch information
phaumer authored and zFernand0 committed Nov 19, 2020
1 parent 54ac4b5 commit db2f9d1
Show file tree
Hide file tree
Showing 357 changed files with 27,070 additions and 30,614 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ coverage:
if_no_uploads: success
if_not_found: success
if_ci_failed: error
changes: no
changes: no
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]
insert_final_newline = true
end_of_line = lf
indent_style = space
max_line_length = 120

[*.{js,ts,css}]
indent_size = 4

[*.{json,yml,md}]
indent_size = 2
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Set default behavior to automatically normalize line endings.
* text=auto

* text=auto eol=lf
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Steps to reproduce the behavior:

**Desktop (please complete the following information):**

- OS:
- Zowe Explorer Version:
- (Optional) Zowe CLI Version:
- (Optional) Are you using Secure Credential Store?
- OS:
- Zowe Explorer Version:
- (Optional) Zowe CLI Version:
- (Optional) Are you using Secure Credential Store?
<!-- If you have SCS installed, please read the documentation for Integrating SCS within Zowe Explorer: https://github.com/zowe/vscode-extension-for-zowe/blob/master/docs/README-Security.md -->

**Additional context**

<!-- Add any other context about the problem here. -->
<!-- Add any other context about the problem here. -->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ labels: enhancement

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->
<!-- Add any other context or screenshots about the feature request here. -->
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. -->

## Release Notes

<!-- Include the Milestone Number and a small description of your change that will be added to the changelog -->
<!-- If there is a linked issue, it should have the same milestone as this PR -->

Expand Down Expand Up @@ -39,4 +40,4 @@ _Put an `x` in the boxes that apply. You can also fill these out after creating

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
14 changes: 6 additions & 8 deletions .github/workflows/theia-zowe-explorer-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@ name: Theia Zowe Explorer CI
on: [push, pull_request]

jobs:

theia-build:

runs-on: ubuntu-latest

steps:
# check out source
- uses: actions/checkout@v2

# install yarn
- run: npm install -g yarn

# install dependencies
# equivalent to `npm ci`
# - run: yarn install --frozen-lockfile
- run: npm ci
- run: yarn install --frozen-lockfile

# copy test data file needed for build :-(
- name: Create test data file
Expand All @@ -33,7 +32,7 @@ jobs:

- name: Start Theia
run: docker run --name theia --init -d -p 3000:3000 -v "${PWD}/temp:/home/theia/.theia" theiaide/theia
# NOTE(Kelosky): alternatively, we could run docker via something like this; however, we cannot hot reload
# NOTE(Kelosky): alternatively, we could run docker via something like this; however, we cannot hot reload
# hosted VS Code extensions after theia is started (at least at the time this was written).
# services:
# theia:
Expand All @@ -42,7 +41,7 @@ jobs:
# - 3000:3000
# volumes:
# - temp:/home/theia/.theia
# # --health-cmd "curl --fail http://localhost:3000 || exit 1" --health-interval=5s --health-timeout=5s --health-retries 60
# # --health-cmd "curl --fail http://localhost:3000 || exit 1" --health-interval=5s --health-timeout=5s --health-retries 60
# options: --init

- run: yarn lint
Expand All @@ -63,4 +62,3 @@ jobs:
run: yarn build:integration

- run: yarn test:theia

80 changes: 40 additions & 40 deletions .github/workflows/zowe-exlorer-ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Zowe Explorer CI

on: [push]
on:
push:
paths:
- packages/zowe-explorer/*

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -16,41 +18,39 @@ jobs:
os: [windows-latest, ubuntu-latest, macos-latest]

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- run: npm install

# run audit on 1 system to avoid overloading the audit API
- name: Audit from Windows / Node 12.x
run: npm audit --production --audit-level=moderate
if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'

- name: Create test data file
run: cp resources/testProfileData.example.ts resources/testProfileData.ts

- run: npm run build --if-present

- run: npm test
env:
CI: true
NODE_OPTIONS: --max_old_space_size=4096

- name: Upload test results
uses: actions/upload-artifact@v1
# if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'
with:
name: results
path: results/

# Run codecov upload for only one run
- name: Upload Results to Codecov from Windows / Node 12.x
if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'
uses: codecov/[email protected]
with:
env_vars: OS,NODE
- name: Check out code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

# install yarn
- run: npm install -g yarn

- run: yarn install --frozen-lockfile

# run audit on 1 system to avoid overloading the audit API
- name: Audit from Windows / Node 12.x
run: yarn audit --production --level=moderate
if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'

- run: yarn test
env:
CI: true
NODE_OPTIONS: --max_old_space_size=4096

- name: Upload test results
uses: actions/upload-artifact@v1
# if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'
with:
name: zowe-explorer-results
path: package/zowe-explorer/results/

# Run codecov upload for only one run
- name: Upload Results to Codecov from Windows / Node 12.x
if: matrix.os == 'windows-latest' && matrix.node-version == '12.x'
uses: codecov/[email protected]
with:
env_vars: OS,NODE
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
node_modules
out
lib
logs
resources/temp
resources/Favorites.txt
resources/testProfileData.ts
testProfileData.ts
results
debug.log
npm-shrinkwrap.json
Expand All @@ -12,6 +11,8 @@ vscode-extension-for-zowe*.vsix
.history
.DS_Store
.idea

# used as workspace for theia test
temp
*.zip
*.vsix
*.tgz
.tmp
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
out
lib
results
node_modules
1 change: 1 addition & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
printWidth: 120
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["esbenp.prettier-vscode"]
}
89 changes: 45 additions & 44 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,49 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"name": "Unit Tests (Jest)",
"request": "launch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": [
"--runInBand"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--verbose"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "build dev watch",
"smartStep": true
},
{
"name": "Integration Tests (Mocha)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/__tests__/__integration__"
],
"outFiles": [
"${workspaceFolder}/out/__tests__/**/*.js"
],
"preLaunchTask": "Pretest"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Zowe Explorer VS Code Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/zowe-explorer", "--verbose"],
"outFiles": ["${workspaceFolder}/packages/zowe-explorer/out/**/*.js"],
"preLaunchTask": "build dev watch",
"smartStep": true
},
{
"name": "Run Zowe Explorer FTP VS Code Extensionn",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/packages/zowe-explorer-ftp-extension", "--verbose"],
"outFiles": ["${workspaceFolder}/packages/zowe-explorer-ftp-extension/out/**/*.js"],
"preLaunchTask": "build dev watch",
"smartStep": true
},
{
"type": "node",
"name": "Zowe Explorer Unit Tests (Jest)",
"request": "launch",
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
"args": ["--runInBand"],
"cwd": "${workspaceFolder}/packages/zowe-explorer",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
},
{
"name": "Zowe Explorer Integration Tests (Mocha)",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/zowe-explorer",
"--extensionTestsPath=${workspaceFolder}/packages/zowe-explorer/out/__tests__/__integration__"
],
"outFiles": ["${workspaceFolder}/out/__tests__/**/*.js"],
"preLaunchTask": "Pretest"
}
]
}
41 changes: 25 additions & 16 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
// Make sure people do not accidentally forget to sign
"git.alwaysSignOff": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
"files.exclude": {
"out": false,
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},

// Make sure people do not accidentally forget to sign
"git.alwaysSignOff": true,

"typescript.tsdk": "node_modules/typescript/lib",
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
// Standardize on the Prettier formatter
"editor.defaultFormatter": "esbenp.prettier-vscode",
// Enforce prettier on save
"editor.formatOnSave": true,
"npm.packageManager": "yarn",
"eslint.packageManager": "yarn",
"eslint.workingDirectories": [{ "directory": "packages/zowe-explorer-ftp-extension", "changeProcessCWD": true }]
}
Loading

0 comments on commit db2f9d1

Please sign in to comment.