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

Publish to NPM and export ComponentRouter with presets/plugins props #138

Merged
merged 87 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 85 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
1fb7c4b
feat: Allow passing additional presets/plugins to ComponentRouter
travisstebbins Jan 10, 2025
a51afdb
feat: Update package.json name and include exports, module, and types
travisstebbins Jan 10, 2025
9194c6e
feat: Add .npmignore file
travisstebbins Jan 10, 2025
3a6f66b
feat: Add src/index.ts file to export only ComponentRouter
travisstebbins Jan 10, 2025
d5c0620
feat: Add publish to NPM step to manual__release action
travisstebbins Jan 10, 2025
0f36c15
fix: Fix copyright
travisstebbins Jan 10, 2025
bb325ef
feat: Add /src/extension and /lib/extension to .npmignore
travisstebbins Jan 10, 2025
4614f0b
refactor: Reorganize code into separate packages
travisstebbins Jan 10, 2025
6f86637
feat: Update .gitignore
travisstebbins Jan 10, 2025
d02392e
feat: Remove unused dependencies from child packages
travisstebbins Jan 10, 2025
c5f1a7c
fix: Fix broken style import
travisstebbins Jan 10, 2025
3ddb205
fix: Fix webpack config
travisstebbins Jan 10, 2025
d377db1
feat: Use * for workspace dependency version
travisstebbins Jan 13, 2025
7968a18
feat: Add scripts to root package.json
travisstebbins Jan 13, 2025
ba9c36f
feat: Move scripts to extension folder and update package.json and ts…
travisstebbins Jan 13, 2025
99451f4
feat: Update .gitignore
travisstebbins Jan 13, 2025
a94c717
feat: Add launch.json for debugging extension
travisstebbins Jan 13, 2025
b8a8285
feat: Remove accidentally included lib files
travisstebbins Jan 13, 2025
a95db25
feat: Remove accidentally included lib files
travisstebbins Jan 13, 2025
7051c58
feat: Update package commands
travisstebbins Jan 13, 2025
93db588
feat: Remove .js from exports
travisstebbins Jan 13, 2025
af42705
feat: use bundler and adjust webpack configs
travisstebbins Jan 13, 2025
f2e07d1
feat: Update package-lock.json
travisstebbins Jan 14, 2025
c04a6bd
feat: Remove vscode specifics from TextLocation and TextInterval
travisstebbins Jan 14, 2025
a626da5
feat: Remove unnecessary configs from rollup config
travisstebbins Jan 14, 2025
8b85b03
refactor: Remove tsconfig.tsbuildinfo file
travisstebbins Jan 14, 2025
28dd628
feat: Set tsBuildInfoFile in tsconfig.json files
travisstebbins Jan 14, 2025
44dc978
feat: Remove unused externals from rollup config
travisstebbins Jan 14, 2025
4997fd8
feat: Update bundle command in root package.json
travisstebbins Jan 14, 2025
3cafa3d
feat: Remove sass-loader from webpack config
travisstebbins Jan 14, 2025
b68a886
feat: Move extension config into root package.json
travisstebbins Jan 14, 2025
5679096
refactor: Fix rollup config formatting
travisstebbins Jan 14, 2025
0f086d1
fix: Update webpack config to include all entries
travisstebbins Jan 14, 2025
7a23633
feat: Update launch.json to use root directory
travisstebbins Jan 14, 2025
367a344
feat: Re-add sass-loader to webpack webviewConfig
travisstebbins Jan 14, 2025
d9aeaaf
fix: Fix paths to dist js files
travisstebbins Jan 14, 2025
8efed24
feat: Re-add sass-loader to webpack webviewConfig
travisstebbins Jan 14, 2025
e8729de
refactor: Remove commented lines from webpack config
travisstebbins Jan 14, 2025
22164a5
refactor: Reformat tsconfig files
travisstebbins Jan 14, 2025
67dc851
feat: Switch from npm to yarn
travisstebbins Jan 15, 2025
73cd8ba
feat: Update @finos/legend-vscode-extension-dependencies version
travisstebbins Jan 15, 2025
5a5c2b7
feaet: Set hoistingLimits on extension package.json
travisstebbins Jan 15, 2025
224b4d8
feat: Add shared dependencies to shared package.json and update scrip…
travisstebbins Jan 15, 2025
3c80bb1
feat: Update client package.json to use yarn in scripts
travisstebbins Jan 15, 2025
879090c
refactor: Move extension config back to extension package.json
travisstebbins Jan 15, 2025
6402c5c
feat: Add version command to sub packages
travisstebbins Jan 15, 2025
fe4408d
feat: Update manual release workflow to use yarn and new package stru…
travisstebbins Jan 15, 2025
b4a1995
feat: Fix commands/config for packaging extension
travisstebbins Jan 15, 2025
9c9a461
feat: Add dry-run scripts and fix webpack:package script
travisstebbins Jan 15, 2025
6bf689a
feat: Update manual__release flow to do dry runs
travisstebbins Jan 15, 2025
5729f03
feat: Update check-build job to use yarn
travisstebbins Jan 15, 2025
d9aff6b
feat: Update check-code job to use yarn
travisstebbins Jan 15, 2025
7eb432d
feat: Update cve-scanning job to use yarn
travisstebbins Jan 15, 2025
46bcbcb
feat: Update license-scanning job to use yarn
travisstebbins Jan 15, 2025
038da2a
refactor: Update comment in manual__release job"
travisstebbins Jan 15, 2025
b2b0ce9
fix: Fix bug with test script
travisstebbins Jan 15, 2025
0883305
feat: Update test workflow to use yarn
travisstebbins Jan 15, 2025
d80c41c
fix: Fix lint:ci script
travisstebbins Jan 15, 2025
f12d263
feat: Simplify package.json scripts using yarn workspaces
travisstebbins Jan 15, 2025
9d75663
feat: Run lint:ci in parallel
travisstebbins Jan 15, 2025
b2b9078
fix: Fix formatting
travisstebbins Jan 15, 2025
4590b9b
fix: Add missing copyright
travisstebbins Jan 15, 2025
eb82104
fix: Fix issues with check:format/check:copyright scripts
travisstebbins Jan 15, 2025
796fb23
fix: Fix error with license-scanning command
travisstebbins Jan 15, 2025
d21f1b3
fix: Add corepack enable step to all github workflows
travisstebbins Jan 15, 2025
7ae5b6e
fix: Try adding run before test command
travisstebbins Jan 15, 2025
8a04380
fix: Fix cp path when copying generated vsix artifact
travisstebbins Jan 15, 2025
595c7f9
fix: Bundle code before running test
travisstebbins Jan 15, 2025
34cb66a
fix: run yarn install before bumping versions in manual__release flow
travisstebbins Jan 16, 2025
6b0a04a
feat: Remove unnecessary lines from launch.json
travisstebbins Jan 16, 2025
d5d8c9c
refactor: Update node_modules path in webpack config
travisstebbins Jan 16, 2025
fc93523
feat: Make shared package private
travisstebbins Jan 16, 2025
f0fa9ac
fix: use upload-artifact@v4
travisstebbins Jan 16, 2025
8608150
fix: Add temp changesetBaseRefs to .yarnrc.yml
travisstebbins Jan 16, 2025
14e247b
feat: Update upload-artifacts version in cve-scanning
travisstebbins Jan 16, 2025
b343da6
feat: Update lsp version
travisstebbins Jan 16, 2025
4994d75
feat: Update lsp to 0.15.3
travisstebbins Jan 16, 2025
5e9897a
fix: Fix release:client command
travisstebbins Jan 17, 2025
c2e999c
feat: Try doing real npm publish in release workflow
travisstebbins Jan 17, 2025
5d06796
feat: Update manual__release runs-on
travisstebbins Jan 17, 2025
6e25c5a
feat: Set npmAuthToken before running npm publish
travisstebbins Jan 17, 2025
e602922
feat: Manually update client/shared versions
travisstebbins Jan 21, 2025
045dec2
feat: Re-add release to VS Code marketplace
travisstebbins Jan 21, 2025
faf482a
fix: Remove temp changesetBaseRefs from .yarnrc.yml
travisstebbins Jan 21, 2025
8513f69
feat: Manually update extension version to match current version
travisstebbins Jan 21, 2025
ec85445
fix: Remove comment from json
travisstebbins Jan 21, 2025
28980bd
fix: Update year in copyright headers
travisstebbins Jan 21, 2025
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
14 changes: 8 additions & 6 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,23 @@ jobs:
distribution: 'temurin'
java-version: 21
java-package: jdk

- name: Set up yarn
run: |
corepack enable

- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
npm install -g ovsx
yarn install

- name: Package
run: |
npm run release:prepare
yarn release:prepare
mkdir artifacts
cp legend-engine-ide-client-vscode.vsix artifacts/legend-engine-ide-client-vscode.vsix
cp ./packages/extension/legend-engine-ide-client-vscode.vsix artifacts/legend-engine-ide-client-vscode.vsix

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: legend-engine-ide-client-vscode.vsix
path: artifacts/legend-engine-ide-client-vscode.vsix
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ jobs:
with:
node-version: 20

- name: Set up yarn
run: |
corepack enable

- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
yarn install

- name: Run lint
run: npm run lint:ci
run: yarn lint:ci

check-codebase-maintenance:
name: Run Codebase Maintenance Checks
Expand All @@ -55,13 +58,16 @@ jobs:
with:
node-version: 20

- name: Set up yarn
run: |
corepack enable

- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
yarn install

- name: Check code formatting
run: npm run check:format
run: yarn check:format

- name: Check copyright headers
run: npm run check:copyright
run: yarn check:copyright
9 changes: 6 additions & 3 deletions .github/workflows/cve-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
- name: Build project with NPM
run: npm install --omit=dev
- name: Set up yarn
run: |
corepack enable
- name: Build project with yarn
run: yarn workspaces focus --all --production
working-directory: .
- name: Depcheck
uses: dependency-check/Dependency-Check_Action@1b5d19fd4a32ff0ff982e8c9d8e27dbf7ac8a46c
Expand All @@ -31,7 +34,7 @@ jobs:
--enableRetired
- name: Upload Test results
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Depcheck report
path: ${{ github.workspace }}/reports
7 changes: 5 additions & 2 deletions .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci --prod
- name: Set up yarn
run: |
corepack enable
- run: yarn install --immutable
working-directory: .
- run: npx --yes node-license-validator . --allow-licenses Apache Apache-2.0 MIT BSD-2-Clause BSD BSD-3-Clause Unlicense
- run: yarn dlx node-license-validator . --allow-licenses Apache Apache-2.0 MIT BSD-2-Clause BSD BSD-3-Clause Unlicense
working-directory: .
36 changes: 24 additions & 12 deletions .github/workflows/manual__release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-latest-4-cores
runs-on: ubuntu-latest
if: github.repository == 'finos/legend-engine-ide-client-vscode' # prevent running this action in forks
steps:
- name: Checkout code
Expand All @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]
with:
node-version: 20
# The registry URL and `NODE_AUTH_TOKEN` are needed for `npm publish` to work properly
# The registry URL and `NODE_AUTH_TOKEN` are needed for `yarn npm publish` to work properly
# See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm
registry-url: 'https://registry.npmjs.org'
- name: Set up JDK
Expand All @@ -35,21 +35,33 @@ jobs:
distribution: 'temurin'
java-version: 21
java-package: jdk
- name: Prepare for new release
- name: Set up yarn
run: |
npm version ${{ github.event.inputs.bump_type }} -m "bump version to %s"
git push origin main
- name: Install dependencies and build project
corepack enable
- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
npm install -g ovsx
npm run release:prepare
yarn install
- name: Bump versions
run: |
yarn workspaces foreach --all run version ${{ github.event.inputs.bump_type }}
git add packages/**/package.json
git commit -m "${{ github.event.inputs.bump_type }}: bump versions and release"
git push origin feature-publish-npm
- name: Build project and prepare release
run: |
yarn release:prepare
- name: Publish to VS Code Marketplace
run: npm run release:marketPlace
run: yarn release:marketPlace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
# - name: Publish to OpenVSX Marketplace
# run: npm run release:openvsx -- -p ${{ secrets.OVSX_TOKEN }}
# run: yarn dlx -p ovsx release:openvsx -- -p ${{ secrets.OVSX_TOKEN }}
- name: Publish to NPM
run: |
yarn config set npmAuthToken $NODE_AUTH_TOKEN
yarn release:client
env:
GITHUB_TOKEN: ${{ secrets.FINOS_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}


13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,19 @@ jobs:
java-version: 21
java-package: jdk

- name: Set up yarn
run: |
corepack enable

- name: Install dependencies
run: |
npm install
npm install -g @vscode/vsce
yarn install

- name: Compile and bundle code
run: |
yarn bundle

- name: Run tests
run: |
xvfb-run -a npm run test
xvfb-run -a yarn run test

20 changes: 15 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,28 @@ Thumbs.db
# Build
npm-debug.log
npm-debug.log*
/build/
/lib
/dist
**/build/
**/lib
**/dist

# Dependencies
**/node_modules

# Development
/temp
*.vsix
/server/*.jar
**/server/*.jar
/server/legend_extension_pom*.xml

# Test
/.vscode-test/
**/.vscode-test/

# Yarn
# See https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
!.yarn/constraints.pro
.pnp.*
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
travisstebbins marked this conversation as resolved.
Show resolved Hide resolved
"version": "0.2.0",
"configurations": [
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/extension"
],
"name": "Launch Legend Extension",
"outFiles": [
"${workspaceFolder}/packages/extension/dist/**/*.js"
],
"request": "launch",
"type": "extensionHost"
}
]
}
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

npmPublishAccess: public
2 changes: 1 addition & 1 deletion license-check-and-add-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignore": ["*.json", "icons/*.svg", "build", ".vscode-test", "lib", ".github", "*.vsix", "server", "*"],
"license": "./scripts/copyright/COPYRIGHT_HEADER.txt",
"license": "../../scripts/copyright/COPYRIGHT_HEADER.txt",
"licenseFormats": {
"ts": {
"prepend": "/**",
Expand Down
Loading
Loading