-
Notifications
You must be signed in to change notification settings - Fork 35
feat: add experimental support for HarmonyOS platform #600
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
Merged
Merged
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
00ef024
wip: initial harmony support
thymikee 284f095
make run and build work; remove signing for now
thymikee aa94b62
add template
thymikee eaeadc0
fixups
thymikee 67c43e1
fingerprints
thymikee aa631f7
add missing files and deps; change js entrypoint
thymikee 8826c50
Skip copying metro.config.js for Harmony platform
thymikee 46991bb
fixup template
thymikee 647dd88
update fs-fingerprint, platform config, tests, validation
thymikee 91aa9e5
add basic dependency config
thymikee 7f93f94
fix hvigor-plugin dep
thymikee 209a258
use React 18
thymikee 1713ef0
resolve @ohos from harmonyos registry; pnpm hoisted; community cli
thymikee d04df75
fix: use PascalCase
thymikee 7715ae8
versions and fixups
thymikee 5b5a157
add display name; update tests
thymikee 8c36f69
fixup nits from cursor review
thymikee d3c33da
add/remove todos
thymikee e1ecf00
docs: add docs
thymikee 4e95021
update docs
thymikee 542d5cf
moar docs updates
thymikee e680981
fix linter
thymikee da16c3a
changeset
thymikee 6df62b2
add harmony to supported types in fingerprint
thymikee 6555636
fix tests
thymikee 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
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
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 |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ test('resolveTemplateName with built-in templates', () => { | |
| expect(resolveTemplate(TEMPLATES, 'default')).toEqual({ | ||
| type: 'npm', | ||
| name: 'default', | ||
| displayName: 'default', | ||
| packageName: '@rock-js/template-default', | ||
| version: 'latest', | ||
| directory: '.', | ||
|
|
@@ -16,6 +17,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, './directory/template-1')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-1', | ||
| displayName: 'template-1', | ||
| localPath: path.resolve('./directory/template-1'), | ||
| directory: '.', | ||
| packageName: 'template-1', | ||
|
|
@@ -24,6 +26,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, '../../up/up/away/template-2')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-2', | ||
| displayName: 'template-2', | ||
| localPath: path.resolve('../../up/up/away/template-2'), | ||
| directory: '.', | ||
| packageName: 'template-2', | ||
|
|
@@ -32,6 +35,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, '/absolute/path/template-3')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-3', | ||
| displayName: 'template-3', | ||
| localPath: '/absolute/path/template-3', | ||
| directory: '.', | ||
| packageName: 'template-3', | ||
|
|
@@ -42,6 +46,7 @@ test('resolveTemplateName with local paths', () => { | |
| ).toEqual({ | ||
| type: 'local', | ||
| name: 'template-4', | ||
| displayName: 'template-4', | ||
| localPath: '/url-based/path/template-4', | ||
| directory: '.', | ||
| packageName: 'template-4', | ||
|
|
@@ -50,6 +55,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, './directory/template-5.tgz')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-5', | ||
| displayName: 'template-5', | ||
| localPath: path.resolve('./directory/template-5.tgz'), | ||
| directory: '.', | ||
| packageName: 'template-5', | ||
|
|
@@ -58,6 +64,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, '../up/template-6.tar')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-6', | ||
| displayName: 'template-6', | ||
| localPath: path.resolve('../up/template-6.tar'), | ||
| directory: '.', | ||
| packageName: 'template-6', | ||
|
|
@@ -66,6 +73,7 @@ test('resolveTemplateName with local paths', () => { | |
| expect(resolveTemplate(TEMPLATES, '/root/directory/template-7.tgz')).toEqual({ | ||
| type: 'local', | ||
| name: 'template-7', | ||
| displayName: 'template-7', | ||
| localPath: '/root/directory/template-7.tgz', | ||
| directory: '.', | ||
| packageName: 'template-7', | ||
|
|
@@ -76,20 +84,23 @@ test('resolveTemplateName with npm packages', () => { | |
| expect(resolveTemplate(TEMPLATES, 'package-name')).toEqual({ | ||
| type: 'npm', | ||
| name: 'package-name', | ||
| displayName: 'package-name', | ||
| directory: '.', | ||
| packageName: 'package-name', | ||
| version: 'latest', | ||
| }); | ||
| expect(resolveTemplate(TEMPLATES, '[email protected]')).toEqual({ | ||
| type: 'npm', | ||
| name: 'package-name', | ||
| displayName: 'package-name', | ||
| directory: '.', | ||
| packageName: 'package-name', | ||
| version: '1.2.3', | ||
| }); | ||
| expect(resolveTemplate(TEMPLATES, '@scoped/[email protected]')).toEqual({ | ||
| type: 'npm', | ||
| name: '@scoped/package-name', | ||
| displayName: '@scoped/package-name', | ||
| directory: '.', | ||
| packageName: '@scoped/package-name', | ||
| version: '1.2.3', | ||
|
|
||
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
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
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
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
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| node-linker=hoisted |
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # @rock-js/platform-harmony |
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 |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # @rock-js/platform-harmony | ||
|
|
||
| HarmonyOS Next platform integration for Rock. This package is part of the Rock ecosystem and provides HarmonyOS-specific build and development tools. | ||
|
|
||
| ## Documentation | ||
|
|
||
| For detailed documentation about Rock and its tools, visit [Rock Documentation](https://rockjs.dev) |
Oops, something went wrong.
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.