-
Notifications
You must be signed in to change notification settings - Fork 17
Feature/update cli to bun and update depedencies phoen 147 #492
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
Closed
jrquak
wants to merge
71
commits into
master
from
feature/update-cli-to-bun-and-update-depedencies-PHOEN-147
Closed
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
229b0bc
feat: use bun and update typescript
emielwit 7213350
refactor: migrate from commander default import to named import
emielwit 6b58157
fix: component build working with bun
jrquak 4ace3f4
chore: fix type errors
jrquak 4a5ca63
chore: updates arguments
jrquak 7b44bf1
refactor: replace ava tests with bun
jrquak f6cbcf7
chore: migrates CI/CD pipeline to Bun
jrquak d78af08
chore: update eslint
jrquak eeaa4c9
chore: update prettier scripts
jrquak cb7d2c5
chore: updates prettier execution command
jrquak 14434b5
chore: update eslint config
jrquak ffcccd6
chore: run auto fix lint
jrquak e7d7c4b
chore: fix sort-key errors
jrquak adddbb4
chore: improved null handling
jrquak d481256
chore: validation to accept options object
jrquak 5f8a2c1
Chore: updates linting and formatting
jrquak 700d5f4
chore: updates node-fetch to the latest version
jrquak 6e829ff
chore: use objects in the validate functions
jrquak 6d54d1d
chore: updates dependencies
jrquak 08145cc
chore: update dependencies
jrquak fc45b47
chore: updates dependencies and refactors eslint
jrquak dd9bfae
chore: refactors and improves code validation
jrquak 3285075
chore: fixes prefab validation test errors
jrquak c64a23c
chore: only run tests in test folder in the runner
jrquak 61e9add
chore: updates dependencies and test timeout
jrquak 6dc1313
Chore: Improves error handling and testing
jrquak 4d56b62
chore: refactors block creation to use 'case' package
jrquak eb947ef
fix: refactors and corrects test assertions
jrquak 6113bb4
chore: remove interaction command
jrquak cf7b7ef
feat: remove deprecated cli command and update deps /n/n BREAKING CHA…
680956c
feat: remove deprecated cli command and update deps /n/n BREAKING CHA…
51db858
feat: remove deprecated cli command and update deps
5c7296e
fix: set entry point to js file
57c1cf7
chore: resolve sonarqube issues
173e0d3
chore: syncs typescript version between dev and prod
jrquak 8c66b57
fix: trigger changelog
jrquak b27a80c
fix: add types from nodemodules
e9ec1cf
fix: include type deps in deps
fb73c52
fix: resolve linter
3725898
fix: revert last change
9abfcb9
fix: include types in deps
5ef170c
chore: revert last change
902e1f7
fix: change shebang from bun to node
jrquak 8265209
chore: revert last change
jrquak 77d1e0a
fix: set deps
41cb981
fix: use old tsconfig and transpile
a05e4db
fix: set source code in build directory
223def3
fix: set types deps in dev deps
2a1e791
fix: add tsnode as dependency
1d4ef0a
fix: set type deps as deps
a2abb2a
fix: use updated tsconfig settings
jrquak f6946c2
fix: add tsconfig build
jrquak 6e54f67
fix: updates shebang to node
jrquak dd1f9ab
fix: revert shebang change
jrquak 159e827
feat: remove custom functions from cli
0c225c6
chore: remove custom functions code
4df3712
feat: add wasm functions template
1dfc54f
chore: remove unused files and functions
bc2f90c
chore: init wasm files
7becd9b
feat: can init, add new and bump wasm functions
235aa5b
chore: correct typing and remove isolatedvm test
9c1dd61
feat: publish wasm functions to blockstore
482e44d
chore: move wasm functions structure function to functiondef
9e8f9e3
test: select js-template in test
35163cd
chore: use case lib
ebd9d07
chore: update deps
02fca16
fix: split up validation function
57c9dae
chore: do not retry login for native publish
6847ade
chore: resolve feedback
d9c328d
test: use absolute path for block def
0131ca2
chore: return empty list if dir not exists
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| { | ||
| "extends": [ | ||
| "@commitlint/config-angular" | ||
| ] | ||
| "extends": ["@commitlint/config-angular"] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,28 @@ | ||
| name: Release | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| branches: | ||
| - master | ||
| - beta | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.GH_TOKEN }} | ||
| - name: Use Node.js 14.18.2 | ||
| uses: actions/setup-node@v1 | ||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| node-version: '14.18.2' | ||
| - run: npm install -g yarn | ||
| - run: yarn install --frozen-lockfile | ||
| - name: Run build | ||
| run: yarn build | ||
| bun-version: 1.2.19 | ||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
| - name: Build CLI | ||
| run: bun run build | ||
| - name: Run tests | ||
| run: bun run test | ||
| - name: Release notes | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| run: yarn semantic-release | ||
| run: bun semantic-release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| # Build files | ||
| build/ | ||
| node_modules/ | ||
| bun.lock | ||
| CHANGELOG.md | ||
| coverage | ||
| README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,3 @@ | ||
| function unknownEvent({ | ||
| event, | ||
| }: { | ||
| event: unknown; | ||
| }): number { | ||
| return 1; | ||
| function unknownEvent({ event }: { event: unknown }): number { | ||
| return 1; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,61 @@ | ||
| import { afterEach, expect, test } from 'bun:test'; | ||
| import fs from 'fs-extra'; | ||
| import test, { ExecutionContext } from 'ava'; | ||
| import path from 'path'; | ||
|
|
||
| import { | ||
| blockDefinitionPath, | ||
| blockDefinitions, | ||
| createPackageJson, | ||
| newBlockDefinition, | ||
| } from '../../src/blocks/blockDefinitions'; | ||
|
|
||
| type Context = ExecutionContext<unknown>; | ||
|
|
||
| console.log(process.cwd()); | ||
|
|
||
| const supportDir = path.join(process.cwd(), '__tests__/support/blocks/'); | ||
|
|
||
| test.afterEach(() => { | ||
| afterEach(() => { | ||
| fs.emptyDirSync(supportDir); | ||
| }); | ||
|
|
||
| test('blockDefinitionPath', async (t: Context): Promise<void> => { | ||
| t.is(blockDefinitionPath('/blocks', 'test'), '/blocks/test.json'); | ||
| test('blockDefinitionPath', async (): Promise<void> => { | ||
| expect(blockDefinitionPath('/blocks', 'test')).toBe('/blocks/test.json'); | ||
| }); | ||
|
|
||
| test('creating a new blockDefinition', async (t: Context): Promise<void> => { | ||
| test('creating a new blockDefinition', async (): Promise<void> => { | ||
| const blockName = `block${Math.random().toString()}`; | ||
|
|
||
| t.is( | ||
| newBlockDefinition(supportDir, blockName), | ||
| expect(newBlockDefinition(supportDir, blockName)).toBe( | ||
| `blocks/${blockName}.json created`, | ||
| ); | ||
| }); | ||
|
|
||
| test('returns 2 blocks', async (t: Context): Promise<void> => { | ||
| test('returns 2 blocks', async (): Promise<void> => { | ||
| fs.emptyDirSync(supportDir); | ||
| const newBlocks = ['test', 'block']; | ||
|
|
||
| newBlocks.map((block) => newBlockDefinition(supportDir, block)); | ||
| newBlocks.forEach((block) => newBlockDefinition(supportDir, block)); | ||
|
|
||
| const blocks = blockDefinitions(supportDir); | ||
| const blocks = await blockDefinitions(supportDir); | ||
| const numberOfBlocks = blocks.length; | ||
|
|
||
| t.assert(numberOfBlocks === 2); | ||
| expect(numberOfBlocks).toBe(2); | ||
| }); | ||
|
|
||
| test('creating a package.json', async (t: Context): Promise<void> => { | ||
| test('creating a package.json', async (): Promise<void> => { | ||
| const packageJson = JSON.stringify( | ||
| { | ||
| name: 'test', | ||
| version: '1.0.0', | ||
| private: 'true', | ||
| dependencies: { | ||
| lodash: '^4.17.21', | ||
| case: '^1.6.3', | ||
| }, | ||
| name: 'test', | ||
| private: 'true', | ||
| version: '1.0.0', | ||
| }, | ||
| null, | ||
| 2, | ||
| ); | ||
|
|
||
| t.assert( | ||
| createPackageJson('test', '__tests__/blocks/rootPackage.json', [ | ||
| 'lodash', | ||
| ]) === packageJson, | ||
| ); | ||
| expect( | ||
| createPackageJson('test', '__tests__/blocks/rootPackage.json', ['case']), | ||
| ).toBe(packageJson); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,6 @@ | |
| "version": "1.0.0", | ||
| "private": "true", | ||
| "dependencies": { | ||
| "lodash": "^4.17.21" | ||
| "case": "^1.6.3" | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.