mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Compare commits
1 Commits
sp/pnpm-an
...
tabs-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bcbc36be38 |
278
.github/CONTRIBUTING.md
vendored
278
.github/CONTRIBUTING.md
vendored
@@ -4,53 +4,56 @@ Thanks for your interest in contributing to the Ionic Framework! :tada:
|
||||
|
||||
- [Contributing Etiquette](#contributing-etiquette)
|
||||
- [Creating an Issue](#creating-an-issue)
|
||||
- [Creating a Good Code Reproduction](#creating-a-good-code-reproduction)
|
||||
* [Creating a Good Code Reproduction](#creating-a-good-code-reproduction)
|
||||
- [Creating a Pull Request](#creating-a-pull-request)
|
||||
- [Requirements](#requirements)
|
||||
- [Setup](#setup)
|
||||
- [Core](#core)
|
||||
- [Modifying Components](#modifying-components)
|
||||
- [Preview Changes](#preview-changes)
|
||||
- [Lint Changes](#lint-changes)
|
||||
- [Modifying Documentation](#modifying-documentation)
|
||||
- [Modifying Tests](#modifying-tests)
|
||||
* [Requirements](#requirements)
|
||||
* [Setup](#setup)
|
||||
* [Core](#core)
|
||||
+ [Modifying Components](#modifying-components)
|
||||
+ [Preview Changes](#preview-changes)
|
||||
+ [Lint Changes](#lint-changes)
|
||||
+ [Modifying Documentation](#modifying-documentation)
|
||||
+ [Modifying Tests](#modifying-tests)
|
||||
- [Screenshot Tests](#screenshot-tests)
|
||||
- [Building Changes](#building-changes)
|
||||
- [Angular, React, and Vue](#angular-react-and-vue)
|
||||
- [Modifying Files](#modifying-files)
|
||||
- [Preview Changes](#preview-changes-1)
|
||||
- [Lint Changes](#lint-changes-1)
|
||||
- [Modifying Tests](#modifying-tests-1)
|
||||
- [Building Changes](#building-changes-1)
|
||||
- [Submit Pull Request](#submit-pull-request)
|
||||
+ [Building Changes](#building-changes)
|
||||
* [Angular, React, and Vue](#angular-react-and-vue)
|
||||
+ [Modifying Files](#modifying-files)
|
||||
+ [Preview Changes](#preview-changes-1)
|
||||
+ [Lint Changes](#lint-changes-1)
|
||||
+ [Modifying Tests](#modifying-tests-1)
|
||||
+ [Building Changes](#building-changes-1)
|
||||
* [Submit Pull Request](#submit-pull-request)
|
||||
- [Commit Message Guidelines](#commit-message-guidelines)
|
||||
- [Commit Message Format](#commit-message-format)
|
||||
- [Revert](#revert)
|
||||
- [Type](#type)
|
||||
- [Scope](#scope)
|
||||
- [Subject](#subject)
|
||||
- [Body](#body)
|
||||
- [Footer](#footer)
|
||||
- [Examples](#examples)
|
||||
* [Commit Message Format](#commit-message-format)
|
||||
* [Revert](#revert)
|
||||
* [Type](#type)
|
||||
* [Scope](#scope)
|
||||
* [Subject](#subject)
|
||||
* [Body](#body)
|
||||
* [Footer](#footer)
|
||||
* [Examples](#examples)
|
||||
- [License](#license)
|
||||
|
||||
|
||||
## Contributing Etiquette
|
||||
|
||||
Please see our [Contributor Code of Conduct](https://github.com/ionic-team/ionic-framework/blob/main/CODE_OF_CONDUCT.md) for information on our rules of conduct.
|
||||
|
||||
|
||||
## Creating an Issue
|
||||
|
||||
- If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Discord](https://ionic.link/discord).
|
||||
* If you have a question about using the framework, please ask on the [Ionic Forum](http://forum.ionicframework.com/) or in the [Ionic Discord](https://ionic.link/discord).
|
||||
|
||||
- It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
|
||||
* It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Although we would love to help our users as much as possible, diagnosing issues without clear reproduction steps is extremely time-consuming and simply not sustainable.
|
||||
|
||||
- The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
|
||||
* The issue list of this repository is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.
|
||||
|
||||
- Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs: reply" and receives no further replies from the author of the issue for more than 14 days, it will be closed.
|
||||
* Issues with no clear steps to reproduce will not be triaged. If an issue is labeled with "needs: reply" and receives no further replies from the author of the issue for more than 14 days, it will be closed.
|
||||
|
||||
- If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionic-framework/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
|
||||
* If you think you have found a bug, or have a new feature idea, please start by making sure it hasn't already been [reported](https://github.com/ionic-team/ionic-framework/issues?utf8=%E2%9C%93&q=is%3Aissue). You can search through existing issues to see if there is a similar one reported. Include closed issues as it may have been closed with a solution.
|
||||
|
||||
* Next, [create a new issue](https://github.com/ionic-team/ionic-framework/issues/new/choose) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
|
||||
|
||||
- Next, [create a new issue](https://github.com/ionic-team/ionic-framework/issues/new/choose) that thoroughly explains the problem. Please fill out the populated issue form before submitting the issue.
|
||||
|
||||
## Creating a Good Code Reproduction
|
||||
|
||||
@@ -66,42 +69,42 @@ Without a reliable code reproduction, it is unlikely we will be able to resolve
|
||||
|
||||
### How to Create a Reproduction
|
||||
|
||||
- Create a new Ionic application using one of our starter templates. The `blank` starter application is a great choice for this. You can create one using the following Ionic CLI command: `ionic start myApp blank`
|
||||
- Add the minimum amount of code needed to recreate the issue you are experiencing. Do not include anything that is not required to reproduce the issue. This includes any 3rd party plugins you have installed.
|
||||
- Publish the application on GitHub and include a link to it when [creating an issue](#creating-an-issue).
|
||||
- Be sure to include steps to reproduce the issue. These steps should be clear and easy to follow.
|
||||
* Create a new Ionic application using one of our starter templates. The `blank` starter application is a great choice for this. You can create one using the following Ionic CLI command: `ionic start myApp blank`
|
||||
* Add the minimum amount of code needed to recreate the issue you are experiencing. Do not include anything that is not required to reproduce the issue. This includes any 3rd party plugins you have installed.
|
||||
* Publish the application on GitHub and include a link to it when [creating an issue](#creating-an-issue).
|
||||
* Be sure to include steps to reproduce the issue. These steps should be clear and easy to follow.
|
||||
|
||||
### Benefits of Creating a Reproduction
|
||||
|
||||
- **Uses the latest version of Ionic:** By creating a new Ionic application, you are ensuring that you are testing against the latest version of the framework. Sometimes the issues you are experiencing have already been resolved in a newer version of the framework!
|
||||
- **Minimal surface area:** By removing code that is not needed in order to reproduce the issue, it makes it easier to identify the cause of the issue.
|
||||
- **No secret code needed:** Creating a minimal reproduction of the issue prevents you from having to publish any proprietary code used in your project.
|
||||
- **Get help fixing the issue:** If we can reliably reproduce an issue, there is a good chance we will be able to address it.
|
||||
* **Uses the latest version of Ionic:** By creating a new Ionic application, you are ensuring that you are testing against the latest version of the framework. Sometimes the issues you are experiencing have already been resolved in a newer version of the framework!
|
||||
* **Minimal surface area:** By removing code that is not needed in order to reproduce the issue, it makes it easier to identify the cause of the issue.
|
||||
* **No secret code needed:** Creating a minimal reproduction of the issue prevents you from having to publish any proprietary code used in your project.
|
||||
* **Get help fixing the issue:** If we can reliably reproduce an issue, there is a good chance we will be able to address it.
|
||||
|
||||
|
||||
## Creating a Pull Request
|
||||
|
||||
Before creating a pull request, please read our requirements that explains the minimal details to have your PR considered and merged into the codebase.
|
||||
|
||||
### Requirements
|
||||
|
||||
1. PRs must reference an existing issue that describes the issue or feature being submitted.
|
||||
2. PRs must have a reproduction app or the issue must include a reproduction app to verify changes against.
|
||||
3. PRs must include tests covering the changed behavior or a description of why tests cannot be written.
|
||||
|
||||
> Note: We appreciate you taking the time to contribute! Before submitting a pull request, please take the time to comment on the issue you are wanting to resolve. This helps us prevent duplicate effort or advise if the team is already addressing the issue.
|
||||
|
||||
- Looking for an issue to fix? Look through our issues with the [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
|
||||
* Looking for an issue to fix? Look through our issues with the [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label!
|
||||
|
||||
### Setup
|
||||
|
||||
1. [Download the installer](https://nodejs.org/) for the LTS version of Node.js.
|
||||
2. Install pnpm following the [installation instructions](https://pnpm.io/installation).
|
||||
3. Fork this repository.
|
||||
4. Clone your fork.
|
||||
5. Create a new branch from main for your change.
|
||||
6. Navigate into the directory of the package you wish to modify (core, angular, etc.).
|
||||
7. Run `pnpm install` to install dependencies for this package.
|
||||
8. Follow the steps for the specific package below.
|
||||
1. [Download the installer](https://nodejs.org/) for the LTS version of Node.js. This is the best way to also [install npm](https://blog.npmjs.org/post/85484771375/how-to-install-npm#_=_).
|
||||
2. Fork this repository.
|
||||
3. Clone your fork.
|
||||
4. Create a new branch from main for your change.
|
||||
5. Navigate into the directory of the package you wish to modify (core, angular, etc.).
|
||||
6. Run `npm install` to install dependencies for this package.
|
||||
7. Follow the steps for the specific package below.
|
||||
|
||||
|
||||
### Core
|
||||
|
||||
@@ -117,11 +120,12 @@ Before creating a pull request, please read our requirements that explains the m
|
||||
8. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
|
||||
9. [Submit a Pull Request](#submit-pull-request) of your changes.
|
||||
|
||||
|
||||
#### Preview Changes
|
||||
|
||||
##### Previewing in this repository
|
||||
|
||||
1. Run `pnpm start` from within the `core` directory.
|
||||
1. Run `npm start` from within the `core` directory.
|
||||
2. A browser should open at `http://localhost:3333/`.
|
||||
3. From here, navigate to one of the component's tests to preview your changes.
|
||||
4. If a test showing your change doesn't exist, [add a new test or update an existing one](#modifying-tests).
|
||||
@@ -129,7 +133,7 @@ Before creating a pull request, please read our requirements that explains the m
|
||||
|
||||
##### Previewing in an external app
|
||||
|
||||
We can use `pnpm pack` to test Ionic Framework changes in an external app outside of this repository. Follow the below steps based on your framework.
|
||||
We can use `npm pack` to test Ionic Framework changes in an external app outside of this repository. Follow the below steps based on your framework.
|
||||
|
||||
###### JavaScript
|
||||
|
||||
@@ -137,112 +141,128 @@ Run the following commands to build the core directory and pack the changes:
|
||||
|
||||
```bash
|
||||
cd core
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
```
|
||||
|
||||
Then, in your Ionic Framework JavaScript app, run the following command to use the built package with the `.tgz` file that was created:
|
||||
|
||||
```bash
|
||||
pnpm install file:/~/ionic-core-7.0.1.tgz
|
||||
npm install file:/~/ionic-core-7.0.1.tgz
|
||||
```
|
||||
|
||||
|
||||
###### Angular
|
||||
|
||||
Run the following commands to build the core & angular directories and pack the changes:
|
||||
|
||||
```bash
|
||||
cd core
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
|
||||
cd ../packages/angular
|
||||
pnpm build
|
||||
npm i
|
||||
npm run sync
|
||||
npm run build
|
||||
cd dist/
|
||||
pnpm pack --pack-destination ~
|
||||
npm pack --pack-destination ~
|
||||
```
|
||||
|
||||
Then, in your Ionic Framework Angular app, run the following commands to use the built packages with the `.tgz` files that were created:
|
||||
|
||||
```bash
|
||||
rm -rf .angular/
|
||||
pnpm install file:/~/ionic-core-7.0.1.tgz
|
||||
pnpm install file:/~/ionic-angular-7.0.1.tgz
|
||||
npm install file:/~/ionic-core-7.0.1.tgz
|
||||
npm install file:/~/ionic-angular-7.0.1.tgz
|
||||
```
|
||||
|
||||
|
||||
###### React
|
||||
|
||||
Run the following commands to build the core & react directories and pack the changes:
|
||||
|
||||
```bash
|
||||
cd core
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
|
||||
cd ../packages/react
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run sync
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
|
||||
cd ../react-router
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run sync
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
```
|
||||
|
||||
Then, in your Ionic Framework React app, run the following commands to use the built packages with the `.tgz` files that were created:
|
||||
|
||||
```bash
|
||||
pnpm install file:/~/ionic-core-7.0.1.tgz
|
||||
pnpm install file:/~/ionic-react-7.0.1.tgz
|
||||
pnpm install file:/~/ionic-react-router-7.0.1.tgz
|
||||
npm install file:/~/ionic-core-7.0.1.tgz
|
||||
npm install file:/~/ionic-react-7.0.1.tgz
|
||||
npm install file:/~/ionic-react-router-7.0.1.tgz
|
||||
```
|
||||
|
||||
|
||||
##### Vue
|
||||
|
||||
Run the following commands to build the core & vue directories and pack the changes:
|
||||
|
||||
```bash
|
||||
cd core
|
||||
pnpm install
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
|
||||
cd ../packages/vue
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run sync
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
|
||||
cd ../vue-router
|
||||
pnpm build
|
||||
pnpm pack --pack-destination ~
|
||||
npm i
|
||||
npm run sync
|
||||
npm run build
|
||||
npm pack --pack-destination ~
|
||||
```
|
||||
|
||||
Then, in your Ionic Framework Vue app, run the following commands to use the built packages with the `.tgz` files that were created:
|
||||
|
||||
```bash
|
||||
pnpm install file:/~/ionic-core-7.0.1.tgz
|
||||
pnpm install file:/~/ionic-vue-7.0.1.tgz
|
||||
pnpm install file:/~/ionic-vue-router-7.0.1.tgz
|
||||
npm install file:/~/ionic-core-7.0.1.tgz
|
||||
npm install file:/~/ionic-vue-7.0.1.tgz
|
||||
npm install file:/~/ionic-vue-router-7.0.1.tgz
|
||||
```
|
||||
|
||||
|
||||
#### Lint Changes
|
||||
|
||||
1. Run `pnpm lint` to lint the TypeScript and Sass.
|
||||
2. If there are lint errors, run `pnpm lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
|
||||
3. To lint and fix only TypeScript errors, run `pnpm lint.ts` and `pnpm lint.ts.fix`, respectively.
|
||||
4. To lint and fix only Sass errors, run `pnpm lint.sass` and `pnpm lint.sass.fix`, respectively.
|
||||
1. Run `npm run lint` to lint the TypeScript and Sass.
|
||||
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
|
||||
3. To lint and fix only TypeScript errors, run `npm run lint.ts` and `npm run lint.ts.fix`, respectively.
|
||||
4. To lint and fix only Sass errors, run `npm run lint.sass` and `npm run lint.sass.fix`, respectively.
|
||||
|
||||
|
||||
#### Modifying Documentation
|
||||
|
||||
- Changes to manually written documentation should be made in the `ionic-docs` repo: https://github.com/ionic-team/ionic-docs/tree/main/docs
|
||||
- In your `ionic-docs` PR, please add a link back to the related `ionic-framework` PR.
|
||||
- Changes to auto generated documentation should be made in the `ionic-framework` repo. These can be done in the same PR as your fix or feature.
|
||||
- Run `pnpm build` and commit all updates to ensure your changes make it into the generated documentation.
|
||||
- Run `npm run build` and commit all updates to ensure your changes make it into the generated documentation.
|
||||
- `Usage`: update the component's usage examples in the component's `usage/` directory.
|
||||
- `Properties`, `Events`, or `Methods`: update the component's TypeScript file (`*.tsx`).
|
||||
- `CSS Custom Properties`: update the component's main Sass file (`*.scss`).
|
||||
|
||||
|
||||
#### Modifying Tests
|
||||
|
||||
1. Locate the test to modify inside the `test/` folder in the component's directory.
|
||||
@@ -257,14 +277,15 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
|
||||
1. If the test exists in screenshot, there will be a file named `e2e.ts` in the directory of the test.
|
||||
2. A screenshot test can be added by including this file and adding one or more `test()` calls that include a call to `page.compareScreenshot()`. See [Stencil end-to-end testing](https://stenciljs.com/docs/end-to-end-testing) and existing tests in `core/` for examples.
|
||||
3. **Important:** each `test()` should have only one screenshot (`page.compareScreenshot()`) call **or** it should check the expect at the end of each test. If there is a mismatch it will fail the test which will prevent the rest of the test from running, i.e. if the first screenshot fails the remaining screenshot calls would not be called _unless_ they are in a separate test or all of the expects are called at the end.
|
||||
4. To run screenshot locally, use the following command: `pnpm test.screenshot`.
|
||||
- To run screenshot for a specific test, pass the path to the test or a string to search for.
|
||||
- For example, running all `alert` tests: `pnpm test.screenshot alert`.
|
||||
- Or, running the basic `alert` tests: `pnpm test.screenshot src/components/alert/test/basic/e2e.ts`.
|
||||
4. To run screenshot locally, use the following command: `npm run test.screenshot`.
|
||||
- To run screenshot for a specific test, pass the path to the test or a string to search for.
|
||||
- For example, running all `alert` tests: `npm run test.screenshot alert`.
|
||||
- Or, running the basic `alert` tests: `npm run test.screenshot src/components/alert/test/basic/e2e.ts`.
|
||||
|
||||
|
||||
#### Building Changes
|
||||
|
||||
1. Once all changes have been made and the documentation has been updated, run `pnpm build` inside of the `core` directory. This will add your changes to any auto-generated files, if necessary.
|
||||
1. Once all changes have been made and the documentation has been updated, run `npm run build` inside of the `core` directory. This will add your changes to any auto-generated files, if necessary.
|
||||
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
|
||||
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
|
||||
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).
|
||||
@@ -274,26 +295,25 @@ See [Ionic's E2E testing guide](../core/src/utils/test/playwright/docs/README.md
|
||||
#### Modifying Files
|
||||
|
||||
1. Locate the files inside the relevant root directory:
|
||||
|
||||
- Angular: [`/packages/angular/src`](/packages/angular/src)
|
||||
- React: [`/packages/react/src`](/packages/react/src)
|
||||
- Vue: [`/packages/vue/src`](/packages/vue/src)
|
||||
|
||||
- Angular: [`/packages/angular/src`](/packages/angular/src)
|
||||
- React: [`/packages/react/src`](/packages/react/src)
|
||||
- Vue: [`/packages/vue/src`](/packages/vue/src)
|
||||
2. Make your changes to the files. If the change is overly complex or out of the ordinary, add comments so we can understand the changes.
|
||||
3. Run lint on the directory and make sure there are no errors.
|
||||
4. Build the project.
|
||||
5. After the build is finished, commit the changes. Please follow the [commit message format](#commit-message-format) for every commit.
|
||||
6. [Submit a Pull Request](#submit-pull-request) of your changes.
|
||||
|
||||
|
||||
|
||||
#### Preview Changes
|
||||
|
||||
##### Previewing in this repository
|
||||
|
||||
Follow the steps in the test directory for each framework:
|
||||
|
||||
- Angular: [`/packages/angular/test`](/packages/angular/test/README.md)
|
||||
- React: [`/packages/react/test`](/packages/react/test/README.md)
|
||||
- Vue: [`/packages/vue/test`](/packages/vue/test/README.md)
|
||||
- Angular: [`/packages/angular/test`](/packages/angular/test/README.md)
|
||||
- React: [`/packages/react/test`](/packages/react/test/README.md)
|
||||
- Vue: [`/packages/vue/test`](/packages/vue/test/README.md)
|
||||
|
||||
##### Previewing in an external app
|
||||
|
||||
@@ -301,29 +321,25 @@ Follow the steps to [preview changes in core](#preview-changes).
|
||||
|
||||
#### Lint Changes
|
||||
|
||||
1. Run `pnpm lint` to lint the TypeScript in the relevant directory:
|
||||
|
||||
- Angular: [`/packages/angular/src`](/packages/angular/src)
|
||||
- React: [`/packages/react/src`](/packages/react/src)
|
||||
- Vue: [`/packages/vue/src`](/packages/vue/src)
|
||||
|
||||
2. If there are lint errors, run `pnpm lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
|
||||
1. Run `npm run lint` to lint the TypeScript in the relevant directory:
|
||||
- Angular: [`/packages/angular/src`](/packages/angular/src)
|
||||
- React: [`/packages/react/src`](/packages/react/src)
|
||||
- Vue: [`/packages/vue/src`](/packages/vue/src)
|
||||
2. If there are lint errors, run `npm run lint.fix` to automatically fix any errors. Repeat step 1 to ensure the errors have been fixed, and manually fix them if not.
|
||||
|
||||
#### Modifying Tests
|
||||
|
||||
1. Locate the e2e test to modify inside the relevant test app directory:
|
||||
|
||||
- Angular: [`/packages/angular/test/base/e2e/src`](/packages/angular/test/base/e2e/src)
|
||||
- React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs)
|
||||
- Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs)
|
||||
|
||||
- Angular: [`/packages/angular/test/base/e2e/src`](/packages/angular/test/base/e2e/src)
|
||||
- React: [`/packages/react/test/base/tests/e2e/specs`](/packages/react/test/base/tests/e2e/specs)
|
||||
- Vue: [`/packages/vue/test/base/tests/e2e/specs`](/packages/vue/test/base/tests/e2e/specs)
|
||||
2. If a test exists, modify the test by adding an example to reproduce the problem fixed or feature added.
|
||||
3. If a new test is needed, copy an existing test, rename it, and edit the content in the test file.
|
||||
4. Run `pnpm test` to run your tests.
|
||||
4. Run `npm run test` to run your tests.
|
||||
|
||||
#### Building Changes
|
||||
|
||||
1. Once all changes have been made, run `pnpm build` inside of the package's root directory. This will add your changes to any auto-generated files, if necessary.
|
||||
1. Once all changes have been made, run `npm run build` inside of the package's root directory. This will add your changes to any auto-generated files, if necessary.
|
||||
2. Review the changes and, if everything looks correct, [commit](#commit-message-format) the changes.
|
||||
3. Make sure the build has finished before committing. If you made changes to the documentation, properties, methods, or anything else that requires an update to a generate file, this needs to be committed.
|
||||
4. After the changes have been pushed, publish the branch and [create a pull request](#creating-a-pull-request).
|
||||
@@ -340,13 +356,14 @@ The team has an internal design process for new Ionic features, which must be co
|
||||
|
||||
To expedite the process, please ensure that all feature PRs have an associated issue created, with a clear use case for why the feature should be added to Ionic.
|
||||
|
||||
|
||||
## Commit Message Guidelines
|
||||
|
||||
We have very precise rules over how our git commit messages should be formatted. This leads to readable messages that are easy to follow when looking through the project history. We also use the git commit messages to generate our [changelog](https://github.com/ionic-team/ionic-framework/blob/main/CHANGELOG.md). Our format closely resembles Angular's [commit message guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit).
|
||||
|
||||
### Commit Message Format
|
||||
|
||||
We follow the [Conventional Commits specification](https://www.conventionalcommits.org/). A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
|
||||
We follow the [Conventional Commits specification](https://www.conventionalcommits.org/). A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
|
||||
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
@@ -368,14 +385,14 @@ If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. Howev
|
||||
|
||||
Must be one of the following:
|
||||
|
||||
- **feat**: A new feature
|
||||
- **fix**: A bug fix
|
||||
- **docs**: Documentation only changes
|
||||
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
- **perf**: A code change that improves performance
|
||||
- **test**: Adding missing tests
|
||||
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
|
||||
* **feat**: A new feature
|
||||
* **fix**: A bug fix
|
||||
* **docs**: Documentation only changes
|
||||
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
* **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
* **perf**: A code change that improves performance
|
||||
* **test**: Adding missing tests
|
||||
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
|
||||
|
||||
### Scope
|
||||
|
||||
@@ -385,12 +402,12 @@ The scope can be anything specifying place of the commit change. Usually it will
|
||||
|
||||
The subject contains succinct description of the change:
|
||||
|
||||
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
- do not capitalize first letter
|
||||
- do not place a period `.` at the end
|
||||
- entire length of the commit message must not go over 50 characters
|
||||
- describe what the commit does, not what issue it relates to or fixes
|
||||
- **be brief, yet descriptive** - we should have a good understanding of what the commit does by reading the subject
|
||||
* use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
* do not capitalize first letter
|
||||
* do not place a period `.` at the end
|
||||
* entire length of the commit message must not go over 50 characters
|
||||
* describe what the commit does, not what issue it relates to or fixes
|
||||
* **be brief, yet descriptive** - we should have a good understanding of what the commit does by reading the subject
|
||||
|
||||
### Body
|
||||
|
||||
@@ -452,6 +469,7 @@ revert: feat(skeleton-text): add animated property
|
||||
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
By contributing your code to the ionic-team/ionic GitHub Repository, you agree to license your contribution under the MIT license.
|
||||
|
||||
@@ -6,20 +6,13 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
|
||||
- name: Install Angular Server Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/angular-server
|
||||
- name: Build
|
||||
run: pnpm run build.prod
|
||||
run: npm run build.prod
|
||||
shell: bash
|
||||
working-directory: ./packages/angular-server
|
||||
- uses: ./.github/workflows/actions/upload-archive
|
||||
|
||||
@@ -6,24 +6,25 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Install Angular Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/angular
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/angular
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./packages/angular
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/angular
|
||||
- name: Check Diff
|
||||
|
||||
@@ -12,19 +12,17 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- name: Install Stencil ${{ inputs.stencil-version }}
|
||||
working-directory: ./core
|
||||
run: pnpm i @stencil/core@${{ inputs.stencil-version }}
|
||||
run: npm i @stencil/core@${{ inputs.stencil-version }}
|
||||
shell: bash
|
||||
- name: Build Core
|
||||
run: pnpm run build --ci
|
||||
run: npm run build -- --ci
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- uses: ./.github/workflows/actions/upload-archive
|
||||
|
||||
@@ -12,22 +12,19 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
# If an Ionicons version was specified install that.
|
||||
# Otherwise just use the version defined in the package.json.
|
||||
- name: Install Ionicons Version
|
||||
if: inputs.ionicons-version != ''
|
||||
run: pnpm install ionicons@${{ inputs.ionicons-version }}
|
||||
run: npm install ionicons@${{ inputs.ionicons-version }}
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- name: Build Core
|
||||
run: pnpm run build --ci
|
||||
run: npm run build -- --ci
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- uses: ./.github/workflows/actions/upload-archive
|
||||
|
||||
@@ -6,9 +6,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -20,15 +17,19 @@ runs:
|
||||
path: ./packages/react
|
||||
filename: ReactBuild.zip
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router
|
||||
- uses: ./.github/workflows/actions/upload-archive
|
||||
|
||||
15
.github/workflows/actions/build-react/action.yml
vendored
15
.github/workflows/actions/build-react/action.yml
vendored
@@ -6,28 +6,29 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Install React Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/react
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/react
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./packages/react
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/react
|
||||
- name: Test Spec
|
||||
run: pnpm run test.spec
|
||||
run: npm run test.spec
|
||||
shell: bash
|
||||
working-directory: ./packages/react
|
||||
- name: Check Diff
|
||||
|
||||
@@ -6,9 +6,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -20,19 +17,23 @@ runs:
|
||||
path: ./packages/vue
|
||||
filename: VueBuild.zip
|
||||
- name: Install Vue Router Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/vue-router
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/vue-router
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./packages/vue-router
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/vue-router
|
||||
- name: Test Spec
|
||||
run: pnpm run test.spec
|
||||
run: npm run test.spec
|
||||
shell: bash
|
||||
working-directory: ./packages/vue-router
|
||||
- uses: ./.github/workflows/actions/upload-archive
|
||||
|
||||
13
.github/workflows/actions/build-vue/action.yml
vendored
13
.github/workflows/actions/build-vue/action.yml
vendored
@@ -6,24 +6,25 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Install Vue Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
working-directory: ./packages/vue
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/vue
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./packages/vue
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/vue
|
||||
- name: Check Diff
|
||||
|
||||
18
.github/workflows/actions/publish-npm/action.yml
vendored
18
.github/workflows/actions/publish-npm/action.yml
vendored
@@ -22,9 +22,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
# Provenance requires npm 9.5.0+
|
||||
- name: Install latest npm
|
||||
run: npm install -g npm@latest
|
||||
@@ -32,26 +29,27 @@ runs:
|
||||
# This ensures the local version of Lerna is installed
|
||||
# and that we do not use the global Lerna version
|
||||
- name: Install root dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
- name: Install project dependencies
|
||||
run: pnpm install
|
||||
- name: Install Dependencies
|
||||
run: npx lerna bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
- name: Update Version
|
||||
run: pnpm exec lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
|
||||
run: npx lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }}
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
- name: Run Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
- name: Prepare NPM Token
|
||||
run: pnpm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
||||
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
shell: bash
|
||||
env:
|
||||
NPM_TOKEN: ${{ inputs.token }}
|
||||
- name: Publish to NPM
|
||||
run: pnpm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance --no-git-checks
|
||||
run: npm publish ${{ inputs.folder }} --tag ${{ inputs.tag }} --provenance
|
||||
shell: bash
|
||||
working-directory: ${{ inputs.working-directory }}
|
||||
|
||||
@@ -9,9 +9,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -32,10 +29,14 @@ runs:
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test/build/${{ inputs.app }}
|
||||
- name: Sync Built Changes
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test/build/${{ inputs.app }}
|
||||
- name: Run Tests
|
||||
run: pnpm run test
|
||||
run: npm run test
|
||||
shell: bash
|
||||
working-directory: ./packages/angular/test/build/${{ inputs.app }}
|
||||
|
||||
@@ -6,15 +6,12 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
run: npm run lint
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
# Lint changes should be pushed
|
||||
|
||||
@@ -16,16 +16,13 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Install Playwright Dependencies
|
||||
run: pnpm install && pnpm exec playwright install && pnpm exec playwright install-deps
|
||||
run: npm install && npx playwright install && npx playwright install-deps
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
- id: clean-component-name
|
||||
@@ -50,7 +47,7 @@ runs:
|
||||
shell: bash
|
||||
- name: Test
|
||||
if: inputs.update != 'true'
|
||||
run: pnpm run test.e2e ${{ steps.set-test-file.outputs.testFile }} --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
||||
run: npm run test.e2e ${{ steps.set-test-file.outputs.testFile }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }}
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
- name: Test and Update
|
||||
@@ -72,7 +69,7 @@ runs:
|
||||
# which is why we not using the upload-archive
|
||||
# composite step here.
|
||||
run: |
|
||||
pnpm run test.e2e ${{ steps.set-test-file.outputs.testFile }} --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
|
||||
npm run test.e2e ${{ steps.set-test-file.outputs.testFile }} -- --shard=${{ inputs.shard }}/${{ inputs.totalShards }} --update-snapshots
|
||||
git add src/\*.png --force
|
||||
mkdir updated-screenshots
|
||||
cd ../ && rsync -R --progress $(git diff --name-only --cached) core/updated-screenshots
|
||||
|
||||
@@ -9,15 +9,12 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
working-directory: ./core
|
||||
shell: bash
|
||||
- name: Install Stencil ${{ inputs.stencil-version }}
|
||||
run: pnpm install @stencil/core@${{ inputs.stencil-version }}
|
||||
run: npm install @stencil/core@${{ inputs.stencil-version }}
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
if: ${{ inputs.stencil-version != '' }}
|
||||
@@ -27,6 +24,6 @@ runs:
|
||||
path: ./core
|
||||
filename: CoreBuild.zip
|
||||
- name: Test
|
||||
run: pnpm run test.spec --ci
|
||||
run: npm run test.spec -- --ci
|
||||
shell: bash
|
||||
working-directory: ./core
|
||||
|
||||
@@ -9,9 +9,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -32,15 +29,19 @@ runs:
|
||||
shell: bash
|
||||
working-directory: ./packages/react/test
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
shell: bash
|
||||
working-directory: ./packages/react/test/build/${{ inputs.app }}
|
||||
- name: Sync Built Changes
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/react/test/build/${{ inputs.app }}
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/react/test/build/${{ inputs.app }}
|
||||
- name: Run Tests
|
||||
run: pnpm run e2e
|
||||
run: npm run e2e
|
||||
shell: bash
|
||||
working-directory: ./packages/react/test/build/${{ inputs.app }}
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -32,14 +29,18 @@ runs:
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router/test
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
|
||||
- name: Sync Built Changes
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
run: npm run build
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
|
||||
- name: Run Tests
|
||||
run: pnpm run e2e
|
||||
run: npm run e2e
|
||||
shell: bash
|
||||
working-directory: ./packages/react-router/test/build/${{ inputs.app }}
|
||||
|
||||
@@ -9,9 +9,6 @@ runs:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
@@ -32,14 +29,18 @@ runs:
|
||||
shell: bash
|
||||
working-directory: ./packages/vue/test
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm install
|
||||
shell: bash
|
||||
working-directory: ./packages/vue/test/build/${{ inputs.app }}
|
||||
- name: Sync
|
||||
run: npm run sync
|
||||
shell: bash
|
||||
working-directory: ./packages/vue/test/build/${{ inputs.app }}
|
||||
- name: Run Spec Tests
|
||||
run: pnpm run test:unit
|
||||
run: npm run test:unit
|
||||
shell: bash
|
||||
working-directory: ./packages/vue/test/build/${{ inputs.app }}
|
||||
- name: Run E2E Tests
|
||||
run: pnpm run test:e2e
|
||||
run: npm run test:e2e
|
||||
shell: bash
|
||||
working-directory: ./packages/vue/test/build/${{ inputs.app }}
|
||||
|
||||
5
.github/workflows/dev-build.yml
vendored
5
.github/workflows/dev-build.yml
vendored
@@ -10,14 +10,11 @@ jobs:
|
||||
dev-hash: ${{ steps.create-dev-hash.outputs.DEV_HASH }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
# A 1 is required before the timestamp
|
||||
# as lerna will fail when there is a leading 0
|
||||
# See https://github.com/lerna/lerna/issues/2840
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
- id: create-dev-hash
|
||||
name: Create Dev Hash
|
||||
|
||||
5
.github/workflows/nightly.yml
vendored
5
.github/workflows/nightly.yml
vendored
@@ -13,14 +13,11 @@ jobs:
|
||||
nightly-hash: ${{ steps.create-nightly-hash.outputs.NIGHTLY_HASH }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
# A 1 is required before the timestamp
|
||||
# as lerna will fail when there is a leading 0
|
||||
# See https://github.com/lerna/lerna/issues/2840
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
run: npm ci
|
||||
shell: bash
|
||||
- id: create-nightly-hash
|
||||
name: Create Nightly Hash
|
||||
|
||||
1
.github/workflows/release-ionic.yml
vendored
1
.github/workflows/release-ionic.yml
vendored
@@ -161,6 +161,7 @@ jobs:
|
||||
version: ${{ inputs.version }}
|
||||
preid: ${{ inputs.preid }}
|
||||
working-directory: 'packages/angular-server'
|
||||
folder: './dist'
|
||||
token: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
release-react-router:
|
||||
|
||||
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -54,9 +54,6 @@ jobs:
|
||||
with:
|
||||
token: ${{ secrets.IONITRON_TOKEN }}
|
||||
fetch-depth: 0
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Configure Identity
|
||||
# Commits from github-actions do not
|
||||
# trigger other GitHub Actions. As a result,
|
||||
@@ -104,7 +101,7 @@ jobs:
|
||||
# so we do that here.
|
||||
- name: Bump Package Lock
|
||||
run: |
|
||||
pnpm install --lockfile-only
|
||||
lerna exec "npm install --package-lock-only"
|
||||
git add .
|
||||
git commit -m "chore(): update package lock files"
|
||||
git push
|
||||
|
||||
@@ -1362,8 +1362,8 @@ ion-tabs,shadow
|
||||
ion-tabs,method,getSelected,getSelected() => Promise<string | undefined>
|
||||
ion-tabs,method,getTab,getTab(tab: string | HTMLIonTabElement) => Promise<HTMLIonTabElement | undefined>
|
||||
ion-tabs,method,select,select(tab: string | HTMLIonTabElement) => Promise<boolean>
|
||||
ion-tabs,event,ionTabsDidChange,{ tab: string; },false
|
||||
ion-tabs,event,ionTabsWillChange,{ tab: string; },false
|
||||
ion-tabs,event,ionTabsDidChange,TabsEventDetail,false
|
||||
ion-tabs,event,ionTabsWillChange,TabsEventDetail,false
|
||||
|
||||
ion-text,shadow
|
||||
ion-text,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
|
||||
|
||||
18826
core/package-lock.json
generated
Normal file
18826
core/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,6 @@
|
||||
"@capacitor/status-bar": "^5.0.6",
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@jest/core": "^27.5.1",
|
||||
"@playwright/test": "^1.39.0",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@rollup/plugin-virtual": "^2.0.3",
|
||||
@@ -51,7 +50,7 @@
|
||||
"@stencil/react-output-target": "^0.5.3",
|
||||
"@stencil/sass": "^3.0.8",
|
||||
"@stencil/vue-output-target": "^0.8.7",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/jest": "^29.5.6",
|
||||
"@types/node": "^14.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
||||
"@typescript-eslint/parser": "^6.7.2",
|
||||
@@ -61,10 +60,9 @@
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-custom-rules": "file:custom-rules",
|
||||
"execa": "^5.0.0",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^27.5.1",
|
||||
"jest-cli": "^27.5.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-cli": "^29.7.0",
|
||||
"prettier": "^2.6.1",
|
||||
"puppeteer": "21.1.1",
|
||||
"rollup": "^2.26.4",
|
||||
@@ -74,30 +72,30 @@
|
||||
"stylelint-order": "^4.1.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run clean && pnpm run build.css && stencil build --es5 --docs-json dist/docs.json",
|
||||
"build.css": "pnpm run css.sass && pnpm run css.minify",
|
||||
"build.debug": "pnpm run clean && stencil build --debug",
|
||||
"build": "npm run clean && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
|
||||
"build.css": "npm run css.sass && npm run css.minify",
|
||||
"build.debug": "npm run clean && stencil build --debug",
|
||||
"build.docs.json": "stencil build --docs-json dist/docs.json",
|
||||
"clean": "node scripts/clean.js",
|
||||
"css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css",
|
||||
"css.sass": "sass --embed-sources src/css:./css",
|
||||
"eslint": "eslint src",
|
||||
"lint": "pnpm run lint.ts && pnpm run lint.sass && pnpm run prettier --write --cache",
|
||||
"lint.fix": "pnpm run lint.ts.fix && pnpm run lint.sass.fix && pnpm run prettier --write --cache",
|
||||
"lint": "npm run lint.ts && npm run lint.sass && npm run prettier -- --write --cache",
|
||||
"lint.fix": "npm run lint.ts.fix && npm run lint.sass.fix && npm run prettier -- --write --cache",
|
||||
"lint.sass": "stylelint \"src/**/*.scss\"",
|
||||
"lint.sass.fix": "pnpm run lint.sass --fix",
|
||||
"lint.ts": "pnpm run eslint",
|
||||
"lint.ts.fix": "pnpm run eslint --fix",
|
||||
"lint.sass.fix": "npm run lint.sass -- --fix",
|
||||
"lint.ts": "npm run eslint",
|
||||
"lint.ts.fix": "npm run eslint -- --fix",
|
||||
"prerender.e2e": "node scripts/testing/prerender.js",
|
||||
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
|
||||
"start": "pnpm run build.css && stencil build --dev --watch --serve",
|
||||
"test": "pnpm run test.spec && pnpm run test.e2e",
|
||||
"start": "npm run build.css && stencil build --dev --watch --serve",
|
||||
"test": "npm run test.spec && npm run test.e2e",
|
||||
"test.spec": "stencil test --spec --max-workers=2",
|
||||
"test.e2e": "pnpm exec playwright test",
|
||||
"test.e2e.update-snapshots": "pnpm run test.e2e --update-snapshots",
|
||||
"test.e2e": "npx playwright test",
|
||||
"test.e2e.update-snapshots": "npm run test.e2e -- --update-snapshots",
|
||||
"test.watch": "jest --watch --no-cache",
|
||||
"test.treeshake": "node scripts/treeshaking.js dist/index.js",
|
||||
"validate": "pnpm run lint && pnpm run test && pnpm run build && pnpm run test.treeshake"
|
||||
"validate": "npm run lint && npm run test && npm run build && npm run test.treeshake"
|
||||
},
|
||||
"author": "Ionic Team",
|
||||
"license": "MIT",
|
||||
|
||||
10
core/src/components.d.ts
vendored
10
core/src/components.d.ts
vendored
@@ -38,6 +38,7 @@ import { SegmentButtonLayout } from "./components/segment-button/segment-button-
|
||||
import { SelectChangeEventDetail, SelectCompareFn, SelectInterface } from "./components/select/select-interface";
|
||||
import { SelectPopoverOption } from "./components/select-popover/select-popover-interface";
|
||||
import { TabBarChangedEventDetail, TabButtonClickEventDetail, TabButtonLayout } from "./components/tab-bar/tab-bar-interface";
|
||||
import { TabsEventDetail } from "./components/tabs/tabs-interface";
|
||||
import { TextareaChangeEventDetail, TextareaInputEventDetail } from "./components/textarea/textarea-interface";
|
||||
import { ToastButton, ToastDismissOptions, ToastLayout, ToastPosition, ToastPresentOptions, ToastSwipeGestureDirection } from "./components/toast/toast-interface";
|
||||
import { ToggleChangeEventDetail } from "./components/toggle/toggle-interface";
|
||||
@@ -74,6 +75,7 @@ export { SegmentButtonLayout } from "./components/segment-button/segment-button-
|
||||
export { SelectChangeEventDetail, SelectCompareFn, SelectInterface } from "./components/select/select-interface";
|
||||
export { SelectPopoverOption } from "./components/select-popover/select-popover-interface";
|
||||
export { TabBarChangedEventDetail, TabButtonClickEventDetail, TabButtonLayout } from "./components/tab-bar/tab-bar-interface";
|
||||
export { TabsEventDetail } from "./components/tabs/tabs-interface";
|
||||
export { TextareaChangeEventDetail, TextareaInputEventDetail } from "./components/textarea/textarea-interface";
|
||||
export { ToastButton, ToastDismissOptions, ToastLayout, ToastPosition, ToastPresentOptions, ToastSwipeGestureDirection } from "./components/toast/toast-interface";
|
||||
export { ToggleChangeEventDetail } from "./components/toggle/toggle-interface";
|
||||
@@ -4503,8 +4505,8 @@ declare global {
|
||||
};
|
||||
interface HTMLIonTabsElementEventMap {
|
||||
"ionNavWillLoad": void;
|
||||
"ionTabsWillChange": { tab: string };
|
||||
"ionTabsDidChange": { tab: string };
|
||||
"ionTabsWillChange": TabsEventDetail;
|
||||
"ionTabsDidChange": TabsEventDetail;
|
||||
}
|
||||
interface HTMLIonTabsElement extends Components.IonTabs, HTMLStencilElement {
|
||||
addEventListener<K extends keyof HTMLIonTabsElementEventMap>(type: K, listener: (this: HTMLIonTabsElement, ev: IonTabsCustomEvent<HTMLIonTabsElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
@@ -7711,11 +7713,11 @@ declare namespace LocalJSX {
|
||||
/**
|
||||
* Emitted when the navigation has finished transitioning to a new component.
|
||||
*/
|
||||
"onIonTabsDidChange"?: (event: IonTabsCustomEvent<{ tab: string }>) => void;
|
||||
"onIonTabsDidChange"?: (event: IonTabsCustomEvent<TabsEventDetail>) => void;
|
||||
/**
|
||||
* Emitted when the navigation is about to transition to a new component.
|
||||
*/
|
||||
"onIonTabsWillChange"?: (event: IonTabsCustomEvent<{ tab: string }>) => void;
|
||||
"onIonTabsWillChange"?: (event: IonTabsCustomEvent<TabsEventDetail>) => void;
|
||||
"useRouter"?: boolean;
|
||||
}
|
||||
interface IonText {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export interface TabsEventDetail {
|
||||
tab: string;
|
||||
}
|
||||
|
||||
export interface TabsCustomEvent extends CustomEvent {
|
||||
detail: { tab: string };
|
||||
detail: TabsEventDetail;
|
||||
target: HTMLIonTabsElement;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@ import { Component, Element, Event, Host, Method, Prop, State, h } from '@stenci
|
||||
import type { NavOutlet, RouteID, RouteWrite } from '../router/utils/interface';
|
||||
import type { TabButtonClickEventDetail } from '../tab-bar/tab-bar-interface';
|
||||
|
||||
import type { TabsEventDetail } from './tabs-interface';
|
||||
|
||||
/**
|
||||
* @slot - Content is placed between the named slots if provided without a slot.
|
||||
* @slot top - Content is placed at the top of the screen.
|
||||
@@ -34,12 +36,12 @@ export class Tabs implements NavOutlet {
|
||||
/**
|
||||
* Emitted when the navigation is about to transition to a new component.
|
||||
*/
|
||||
@Event({ bubbles: false }) ionTabsWillChange!: EventEmitter<{ tab: string }>;
|
||||
@Event({ bubbles: false }) ionTabsWillChange!: EventEmitter<TabsEventDetail>;
|
||||
|
||||
/**
|
||||
* Emitted when the navigation has finished transitioning to a new component.
|
||||
*/
|
||||
@Event({ bubbles: false }) ionTabsDidChange!: EventEmitter<{ tab: string }>;
|
||||
@Event({ bubbles: false }) ionTabsDidChange!: EventEmitter<TabsEventDetail>;
|
||||
|
||||
async componentWillLoad() {
|
||||
if (!this.useRouter) {
|
||||
|
||||
@@ -258,13 +258,4 @@ export const config: Config = {
|
||||
globalScript: 'src/global/ionic-global.ts',
|
||||
enableCache: true,
|
||||
transformAliasedImportPaths: true,
|
||||
/**
|
||||
* Creates the `dist` directory and runs the output targets
|
||||
* when the Stencil dev server rebuilds.
|
||||
*
|
||||
* This option adds ~20s to the dev server startup time.
|
||||
* You can disable it locally if you are not testing the
|
||||
* custom elements output in the framework projects.
|
||||
*/
|
||||
buildDist: true
|
||||
};
|
||||
|
||||
13850
package-lock.json
generated
Normal file
13850
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,9 +7,5 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
"build": "echo noop"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/index.ts"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"name": "angular-schematics",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"description": "Schematics for Angular",
|
||||
"scripts": {
|
||||
"copy": "node scripts/copy.js",
|
||||
"build": "tsc -p tsconfig.json && pnpm copy"
|
||||
},
|
||||
"dependencies": {
|
||||
"@schematics/angular": "^17.0.0",
|
||||
"jsonc-parser": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular/cli": "^17.0.7",
|
||||
"@angular-devkit/core": "^17.0.0",
|
||||
"@angular-devkit/schematics": "^17.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
"typescript": "~4.7.2"
|
||||
}
|
||||
}
|
||||
19
packages/angular-schematics/scripts/copy.js
vendored
19
packages/angular-schematics/scripts/copy.js
vendored
@@ -1,19 +0,0 @@
|
||||
const fs = require("fs-extra");
|
||||
const path = require("path");
|
||||
|
||||
function copySchematicsJson() {
|
||||
const src = path.join(__dirname, "..", "src", "collection.json");
|
||||
const fileSrc = path.join(__dirname, "..", "src", "add", "files");
|
||||
const dst = path.join(__dirname, "..", "dist", "collection.json");
|
||||
const fileDst = path.join(__dirname, "..", "dist", "add", "files");
|
||||
const schemaSrc = path.join(__dirname, "..", "src", "add", "schema.json");
|
||||
const schemaDst = path.join(__dirname, "..", "dist", "add", "schema.json");
|
||||
|
||||
fs.removeSync(dst);
|
||||
fs.removeSync(fileDst);
|
||||
fs.copySync(src, dst);
|
||||
fs.copySync(fileSrc, fileDst);
|
||||
fs.copySync(schemaSrc, schemaDst);
|
||||
}
|
||||
|
||||
copySchematicsJson();
|
||||
@@ -1 +0,0 @@
|
||||
export * from './add';
|
||||
10855
packages/angular-server/package-lock.json
generated
Normal file
10855
packages/angular-server/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,11 +26,11 @@
|
||||
"scripts": {
|
||||
"test": "echo 'angular no tests yet'",
|
||||
"build": "ng-packagr -p ng-package.json -c tsconfig.json",
|
||||
"build.prod": "pnpm run clean && pnpm run build",
|
||||
"build.watch": "pnpm run build --watch",
|
||||
"build.prod": "npm run clean && npm run build",
|
||||
"build.watch": "npm run build -- --watch",
|
||||
"clean": "rm -rf ./dist",
|
||||
"lint": "eslint . --ext .ts && pnpm run prettier",
|
||||
"lint.fix": "eslint . --ext .ts --fix && pnpm run prettier.fix",
|
||||
"lint": "eslint . --ext .ts && npm run prettier",
|
||||
"lint.fix": "eslint . --ext .ts --fix && npm run prettier.fix",
|
||||
"prettier": "prettier \"**/*.ts\" --check",
|
||||
"prettier.fix": "prettier \"**/*.ts\" --write"
|
||||
},
|
||||
@@ -62,6 +62,6 @@
|
||||
},
|
||||
"prettier": "@ionic/prettier-config",
|
||||
"dependencies": {
|
||||
"@ionic/core": "workspace:*"
|
||||
"@ionic/core": "^7.6.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["test/**/*", "src/schematics/**/*"],
|
||||
"ignorePatterns": ["test/**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/index.ts"
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
14529
packages/angular/package-lock.json
generated
Normal file
14529
packages/angular/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -24,24 +24,22 @@
|
||||
},
|
||||
"homepage": "https://ionicframework.com/",
|
||||
"scripts": {
|
||||
"build": "pnpm clean && pnpm build.ng && pnpm build.schematics && pnpm copy && pnpm clean-generated",
|
||||
"build.schematics": "cd ../angular-schematics && pnpm build",
|
||||
"build": "npm run clean && npm run build.ng && npm run build.core && npm run clean-generated",
|
||||
"build.core": "node scripts/build-core.js",
|
||||
"build.ng": "ng-packagr -p ng-package.json -c tsconfig.json",
|
||||
"build.watch": "pnpm copy.css && pnpm build.ng --watch",
|
||||
"copy": "pnpm copy.css && pnpm copy.schematics",
|
||||
"copy.css": "node scripts/copy-css.js",
|
||||
"copy.schematics": "cp -r ../angular-schematics/dist/ ./dist/schematics",
|
||||
"build.watch": "npm run build.ng -- --watch",
|
||||
"clean": "node scripts/clean.js",
|
||||
"clean-generated": "node ./scripts/clean-generated.js",
|
||||
"lint": "pnpm run eslint && pnpm run prettier --write --cache",
|
||||
"lint.fix": "pnpm run eslint --fix",
|
||||
"fmt": "pnpm run eslint --fix && pnpm run prettier --write --cache",
|
||||
"lint": "npm run eslint && npm run prettier -- --write --cache",
|
||||
"lint.fix": "npm run eslint -- --fix",
|
||||
"fmt": "npm run eslint -- --fix && npm run prettier -- --write --cache",
|
||||
"prettier": "prettier \"**/*.ts\"",
|
||||
"eslint": "eslint . --ext .ts",
|
||||
"prerelease": "pnpm run validate && np prerelease --yolo --any-branch --tag next",
|
||||
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
|
||||
"sync": "./scripts/sync.sh",
|
||||
"test": "echo 'angular no tests yet'",
|
||||
"tsc": "tsc -p .",
|
||||
"validate": "pnpm i && pnpm run lint && pnpm run test && pnpm run build"
|
||||
"validate": "npm i && npm run lint && npm run test && npm run build"
|
||||
},
|
||||
"exports": {
|
||||
"./css/*": {
|
||||
@@ -49,8 +47,9 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@ionic/core": "workspace:*",
|
||||
"@ionic/core": "^7.6.6",
|
||||
"ionicons": "^7.0.0",
|
||||
"jsonc-parser": "^3.0.0",
|
||||
"tslib": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -66,25 +65,25 @@
|
||||
"@angular-eslint/eslint-plugin": "^14.0.0",
|
||||
"@angular-eslint/eslint-plugin-template": "^14.0.0",
|
||||
"@angular-eslint/template-parser": "^14.0.0",
|
||||
"@angular/cli": "^17.0.7",
|
||||
"@angular/common": "^14.3.0",
|
||||
"@angular/compiler": "^14.3.0",
|
||||
"@angular/compiler-cli": "^14.3.0",
|
||||
"@angular/core": "^14.3.0",
|
||||
"@angular/forms": "^14.3.0",
|
||||
"@angular/platform-browser": "^14.3.0",
|
||||
"@angular/platform-browser-dynamic": "^14.3.0",
|
||||
"@angular/router": "^14.3.0",
|
||||
"@angular/cli": "^14.0.0",
|
||||
"@angular/common": "^14.0.0",
|
||||
"@angular/compiler": "^14.0.0",
|
||||
"@angular/compiler-cli": "^14.0.0",
|
||||
"@angular/core": "^14.0.0",
|
||||
"@angular/forms": "^14.0.0",
|
||||
"@angular/platform-browser": "^14.0.0",
|
||||
"@angular/platform-browser-dynamic": "^14.0.0",
|
||||
"@angular/router": "^14.0.0",
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@schematics/angular": "^17.0.0",
|
||||
"@types/node": "12.12.5",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-import": "^2.25.2",
|
||||
"fs-extra": "^7.0.0",
|
||||
"glob": "^10.3.10",
|
||||
"ng-packagr": "^15.2.0",
|
||||
"ng-packagr": "^14.0.0",
|
||||
"prettier": "^2.4.1",
|
||||
"rxjs": "~7.5.0",
|
||||
"typescript": "~4.7.2",
|
||||
|
||||
53
packages/angular/scripts/build-core.js
vendored
Normal file
53
packages/angular/scripts/build-core.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const spawn = require('child_process').spawn;
|
||||
|
||||
const typescriptPath = path.join(__dirname, '..', 'node_modules', '.bin');
|
||||
|
||||
function copyCSS() {
|
||||
const src = path.join(__dirname, '..', '..', '..', 'core', 'css');
|
||||
const dst = path.join(__dirname, '..','dist', 'css');
|
||||
|
||||
fs.removeSync(dst);
|
||||
fs.copySync(src, dst);
|
||||
}
|
||||
|
||||
function buildSchematics(){
|
||||
return new Promise((resolve, reject) => {
|
||||
const cmd = 'tsc';
|
||||
const args = [
|
||||
'--project',
|
||||
path.join(__dirname, '..', 'tsconfig.schematics.json'),
|
||||
];
|
||||
|
||||
const p = spawn(cmd, args, { cwd: typescriptPath, stdio: 'inherit', shell: true });
|
||||
p.on('close', (code) => {
|
||||
if (code > 0) {
|
||||
console.log(`ng-add build exited with ${code}`);
|
||||
reject();
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function copySchematicsJson(){
|
||||
const src = path.join(__dirname, '..', 'src', 'schematics', 'collection.json');
|
||||
const fileSrc = path.join(__dirname, '..', 'src', 'schematics', 'add', 'files');
|
||||
const dst = path.join(__dirname, '..', 'dist','schematics', 'collection.json');
|
||||
const fileDst = path.join(__dirname, '..', 'dist', 'schematics', 'add', 'files');
|
||||
const schemaSrc = path.join(__dirname, '..', 'src', 'schematics', 'add', 'schema.json');
|
||||
const schemaDst = path.join(__dirname, '..', 'dist', 'schematics', 'add', 'schema.json');
|
||||
|
||||
fs.removeSync(dst);
|
||||
fs.removeSync(fileDst);
|
||||
fs.copySync(src, dst);
|
||||
fs.copySync(fileSrc,fileDst);
|
||||
fs.copySync(schemaSrc, schemaDst);
|
||||
|
||||
}
|
||||
|
||||
copyCSS();
|
||||
buildSchematics();
|
||||
copySchematicsJson()
|
||||
2
packages/angular/scripts/clean-generated.js
vendored
2
packages/angular/scripts/clean-generated.js
vendored
@@ -10,7 +10,7 @@ const distGeneratedNodeModules = path.join(distDir, 'node_modules');
|
||||
|
||||
function doGlob(globString) {
|
||||
return new Promise((resolve, reject) => {
|
||||
glob.glob(globString, (err, matches) => {
|
||||
glob(globString, (err, matches) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
18
packages/angular/scripts/copy-css.js
vendored
18
packages/angular/scripts/copy-css.js
vendored
@@ -1,18 +0,0 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
/**
|
||||
* Copy the CSS from the core package to the angular package.
|
||||
*
|
||||
* This allows developers to import the global stylesheets
|
||||
* from the @ionic/angular package instead of @ionic/core.
|
||||
*/
|
||||
function copyCSS() {
|
||||
const src = path.join(__dirname, '..', '..', '..', 'core', 'css');
|
||||
const dst = path.join(__dirname, '..', 'dist', 'css');
|
||||
|
||||
fs.removeSync(dst);
|
||||
fs.copySync(src, dst);
|
||||
}
|
||||
|
||||
copyCSS();
|
||||
12
packages/angular/scripts/sync.sh
Executable file
12
packages/angular/scripts/sync.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Delete old packages
|
||||
rm -f *.tgz
|
||||
|
||||
# Pack @ionic/core
|
||||
npm pack ../../core
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
21
packages/angular/src/ionic-core.ts
Normal file
21
packages/angular/src/ionic-core.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
// Re-exports from ionic/core
|
||||
|
||||
// UTILS
|
||||
export { IonicSafeString, getPlatforms, isPlatform, createAnimation } from '@ionic/core';
|
||||
|
||||
// CORE TYPES
|
||||
export {
|
||||
Animation,
|
||||
AnimationBuilder,
|
||||
AnimationCallbackOptions,
|
||||
AnimationDirection,
|
||||
AnimationFill,
|
||||
AnimationKeyFrames,
|
||||
AnimationLifecycle,
|
||||
Gesture,
|
||||
GestureConfig,
|
||||
GestureDetail,
|
||||
mdTransitionAnimation,
|
||||
iosTransitionAnimation,
|
||||
NavComponentWithProps,
|
||||
} from '@ionic/core';
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { SchematicOptions } from '@angular/cli/lib/config/workspace-schema';
|
||||
import type { JsonObject } from '@angular-devkit/core';
|
||||
import { WorkspaceDefinition } from '@angular-devkit/core/src/workspace';
|
||||
import { Tree, SchematicsException } from '@angular-devkit/schematics';
|
||||
import type { SchematicOptions } from '@angular/cli/lib/config/workspace-schema';
|
||||
import { parse } from 'jsonc-parser';
|
||||
|
||||
const ANGULAR_JSON_PATH = 'angular.json';
|
||||
@@ -6,18 +6,16 @@ import { Tree } from '@angular-devkit/schematics';
|
||||
export function addPackageToPackageJson(host: Tree, type: string, pkg: string, version: string): Tree {
|
||||
if (host.exists('package.json')) {
|
||||
const sourceText = host.read('package.json')?.toString('utf-8');
|
||||
if (sourceText) {
|
||||
const json = JSON.parse(sourceText);
|
||||
if (!json[type]) {
|
||||
json[type] = {};
|
||||
}
|
||||
|
||||
if (!json[type][pkg]) {
|
||||
json[type][pkg] = version;
|
||||
}
|
||||
|
||||
host.overwrite('package.json', JSON.stringify(json, null, 2));
|
||||
const json = JSON.parse(sourceText);
|
||||
if (!json[type]) {
|
||||
json[type] = {};
|
||||
}
|
||||
|
||||
if (!json[type][pkg]) {
|
||||
json[type][pkg] = version;
|
||||
}
|
||||
|
||||
host.overwrite('package.json', JSON.stringify(json, null, 2));
|
||||
}
|
||||
|
||||
return host;
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/index.ts"
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
28670
packages/angular/test/apps/ng14/package-lock.json
generated
Normal file
28670
packages/angular/test/apps/ng14/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"sync:build": "sh scripts/build-ionic.sh",
|
||||
"sync": "sh scripts/sync.sh",
|
||||
"build": "ng build --configuration production --no-progress",
|
||||
"lint": "ng lint",
|
||||
"postinstall": "ngcc",
|
||||
@@ -15,8 +16,8 @@
|
||||
"prerender": "ng run test-app:prerender",
|
||||
"cy.open": "cypress open",
|
||||
"cy.run": "cypress run",
|
||||
"test": "concurrently \"pnpm run start --configuration production\" \"wait-on http-get://localhost:4200 && pnpm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"pnpm run start\" \"wait-on http-get://localhost:4200 && pnpm run cy.open\" --kill-others --success first"
|
||||
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"npm run start\" \"wait-on http-get://localhost:4200 && npm run cy.open\" --kill-others --success first"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^14.1.0",
|
||||
@@ -28,8 +29,8 @@
|
||||
"@angular/platform-browser-dynamic": "^14.1.0",
|
||||
"@angular/platform-server": "^14.1.0",
|
||||
"@angular/router": "^14.1.0",
|
||||
"@ionic/angular": "file:../../../dist",
|
||||
"@ionic/angular-server": "file:../../../../angular-server/dist",
|
||||
"@ionic/angular": "^6.1.15",
|
||||
"@ionic/angular-server": "^6.1.15",
|
||||
"core-js": "^2.6.11",
|
||||
"express": "^4.15.2",
|
||||
"ionicons": "^7.2.0",
|
||||
|
||||
15641
packages/angular/test/apps/ng14/pnpm-lock.yaml
generated
15641
packages/angular/test/apps/ng14/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
- ../../../../angular
|
||||
- ../../../../angular-server
|
||||
- ../../../../../core
|
||||
27278
packages/angular/test/apps/ng15/package-lock.json
generated
Normal file
27278
packages/angular/test/apps/ng15/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"sync:build": "sh scripts/build-ionic.sh",
|
||||
"sync": "sh scripts/sync.sh",
|
||||
"build": "ng build --configuration production --no-progress",
|
||||
"lint": "ng lint",
|
||||
"postinstall": "ngcc",
|
||||
@@ -15,8 +16,8 @@
|
||||
"prerender": "ng run test-app:prerender",
|
||||
"cy.open": "cypress open",
|
||||
"cy.run": "cypress run",
|
||||
"test": "concurrently \"pnpm run start --configuration production\" \"wait-on http-get://localhost:4200 && pnpm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"pnpm run start\" \"wait-on http-get://localhost:4200 && pnpm run cy.open\" --kill-others --success first"
|
||||
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"npm run start\" \"wait-on http-get://localhost:4200 && npm run cy.open\" --kill-others --success first"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^15.0.0",
|
||||
@@ -28,8 +29,8 @@
|
||||
"@angular/platform-browser-dynamic": "^15.0.0",
|
||||
"@angular/platform-server": "^15.0.0",
|
||||
"@angular/router": "^15.0.0",
|
||||
"@ionic/angular": "file:../../../dist",
|
||||
"@ionic/angular-server": "file:../../../../angular-server/dist",
|
||||
"@ionic/angular": "^6.1.15",
|
||||
"@ionic/angular-server": "^6.1.15",
|
||||
"@nguniversal/express-engine": "^15.0.0",
|
||||
"core-js": "^2.6.11",
|
||||
"express": "^4.15.2",
|
||||
|
||||
15668
packages/angular/test/apps/ng15/pnpm-lock.yaml
generated
15668
packages/angular/test/apps/ng15/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
- ../../../../angular
|
||||
- ../../../../angular-server
|
||||
- ../../../../../core
|
||||
29448
packages/angular/test/apps/ng16/package-lock.json
generated
Normal file
29448
packages/angular/test/apps/ng16/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"sync:build": "sh scripts/build-ionic.sh",
|
||||
"sync": "sh scripts/sync.sh",
|
||||
"build": "ng build --configuration production --no-progress",
|
||||
"lint": "ng lint",
|
||||
"serve:ssr": "node dist/test-app/server/main.js",
|
||||
@@ -14,8 +15,8 @@
|
||||
"prerender": "ng run test-app:prerender",
|
||||
"cy.open": "cypress open",
|
||||
"cy.run": "cypress run",
|
||||
"test": "concurrently \"pnpm run start --configuration production\" \"wait-on http-get://localhost:4200 && pnpm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"pnpm run start\" \"wait-on http-get://localhost:4200 && pnpm run cy.open\" --kill-others --success first"
|
||||
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"npm run start\" \"wait-on http-get://localhost:4200 && npm run cy.open\" --kill-others --success first"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.0.0",
|
||||
@@ -27,8 +28,8 @@
|
||||
"@angular/platform-browser-dynamic": "^16.0.0",
|
||||
"@angular/platform-server": "^16.0.0",
|
||||
"@angular/router": "^16.0.0",
|
||||
"@ionic/angular": "file:../../../dist",
|
||||
"@ionic/angular-server": "file:../../../../angular-server/dist",
|
||||
"@ionic/angular": "^7.0.0",
|
||||
"@ionic/angular-server": "^7.0.0",
|
||||
"@nguniversal/express-engine": "^16.0.0",
|
||||
"core-js": "^2.6.11",
|
||||
"express": "^4.15.2",
|
||||
|
||||
16370
packages/angular/test/apps/ng16/pnpm-lock.yaml
generated
16370
packages/angular/test/apps/ng16/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
- ../../../../angular
|
||||
- ../../../../angular-server
|
||||
- ../../../../../core
|
||||
16223
packages/angular/test/apps/ng17/package-lock.json
generated
Normal file
16223
packages/angular/test/apps/ng17/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"sync:build": "sh scripts/build-ionic.sh",
|
||||
"sync": "sh scripts/sync.sh",
|
||||
"build": "ng build --configuration production --no-progress",
|
||||
"lint": "ng lint",
|
||||
"serve:ssr": "node dist/test-app/server/main.js",
|
||||
@@ -14,8 +15,8 @@
|
||||
"prerender": "ng run test-app:prerender",
|
||||
"cy.open": "cypress open",
|
||||
"cy.run": "cypress run",
|
||||
"test": "concurrently \"pnpm run start --configuration production\" \"wait-on http-get://localhost:4200 && pnpm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"pnpm run start\" \"wait-on http-get://localhost:4200 && pnpm run cy.open\" --kill-others --success first"
|
||||
"test": "concurrently \"npm run start -- --configuration production\" \"wait-on http-get://localhost:4200 && npm run cy.run\" --kill-others --success first",
|
||||
"test.watch": "concurrently \"npm run start\" \"wait-on http-get://localhost:4200 && npm run cy.open\" --kill-others --success first"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "^17.0.2",
|
||||
@@ -28,8 +29,8 @@
|
||||
"@angular/platform-server": "^17.0.2",
|
||||
"@angular/router": "^17.0.2",
|
||||
"@angular/ssr": "^17.0.0",
|
||||
"@ionic/angular": "file:../../../dist",
|
||||
"@ionic/angular-server": "file:../../../../angular-server/dist",
|
||||
"@ionic/angular": "^7.0.0",
|
||||
"@ionic/angular-server": "^7.0.0",
|
||||
"core-js": "^3.33.2",
|
||||
"express": "^4.15.2",
|
||||
"ionicons": "^7.2.0",
|
||||
|
||||
15222
packages/angular/test/apps/ng17/pnpm-lock.yaml
generated
15222
packages/angular/test/apps/ng17/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
- ../../../../angular
|
||||
- ../../../../angular-server
|
||||
- ../../../../../core
|
||||
@@ -32,12 +32,4 @@ cp -R $FULL_BASE_DIR $BUILD_APP_DIR
|
||||
# will override any files in the base application.
|
||||
cp -R $FULL_APP_DIR $BUILD_APP_DIR
|
||||
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Print a message with instructions for developers.
|
||||
echo -e "\n${GREEN}Successfully generated test app at: $BUILD_APP_DIR \n${NC}"
|
||||
echo -e "Please follow these steps:"
|
||||
echo -e " 1. cd $BUILD_APP_DIR"
|
||||
echo -e " 2. Install dependencies with: pnpm install"
|
||||
echo -e " 3. Run the dev server with: pnpm start\n"
|
||||
echo "Copied test app files for ${APP_DIR}"
|
||||
|
||||
@@ -40,6 +40,6 @@
|
||||
"@ionic/angular/common": ["common/src/index.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"exclude": ["node_modules", "src/schematics"],
|
||||
"files": ["src/index.ts", "common/src/index.ts", "standalone/src/index.ts"]
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": false,
|
||||
"pretty": true,
|
||||
"rootDir": "src",
|
||||
"rootDir": "src/schematics",
|
||||
"target": "es2017",
|
||||
"outDir": "dist"
|
||||
"outDir": "dist/schematics"
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"include": ["src/**/*.ts"]
|
||||
"include": ["src/schematics/**/*.ts"]
|
||||
}
|
||||
6655
packages/react-router/package-lock.json
generated
Normal file
6655
packages/react-router/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,14 +20,15 @@
|
||||
"url": "git+https://github.com/ionic-team/ionic-framework.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run clean && pnpm run compile",
|
||||
"build.watch": "pnpm run compile --watch",
|
||||
"build": "npm run clean && npm run compile",
|
||||
"build.watch": "npm run compile -- --watch",
|
||||
"clean": "rimraf dist",
|
||||
"compile": "rollup -c",
|
||||
"eslint": "eslint src",
|
||||
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
|
||||
"lint": "pnpm run eslint && pnpm run prettier --write --cache",
|
||||
"lint.fix": "pnpm run eslint --fix && pnpm run prettier --write --cache"
|
||||
"lint": "npm run eslint && npm run prettier -- --write --cache",
|
||||
"lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
|
||||
"sync": "sh ./scripts/sync.sh"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/types/index.d.ts",
|
||||
@@ -35,8 +36,7 @@
|
||||
"dist/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ionic/react": "workspace:*",
|
||||
"history": "^4.9.0",
|
||||
"@ionic/react": "^7.6.6",
|
||||
"tslib": "*"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -49,7 +49,6 @@
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@rollup/plugin-typescript": "^11.1.5",
|
||||
"@types/history": "4",
|
||||
"@types/node": "^14.0.14",
|
||||
"@types/react": "16.14.0",
|
||||
"@types/react-dom": "^16.9.0",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
const external = ['react', 'react-dom', 'react-router', 'react-router-dom', 'history', 'tslib'];
|
||||
|
||||
export default {
|
||||
input: 'src/index.ts',
|
||||
@@ -10,8 +9,8 @@ export default {
|
||||
sourcemap: true,
|
||||
}
|
||||
],
|
||||
external: (id) => !/^(\.|\/)/.test(id),
|
||||
plugins: [
|
||||
typescript(),
|
||||
],
|
||||
external: id => external.includes(id) || id.startsWith('@ionic/core') || id.startsWith('ionicons') || id.startsWith('@ionic/react'),
|
||||
};
|
||||
|
||||
15
packages/react-router/scripts/sync.sh
Normal file
15
packages/react-router/scripts/sync.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Copy ionic react dist
|
||||
rm -rf node_modules/@ionic/react/dist node_modules/@ionic/react/css
|
||||
cp -a ../react/dist node_modules/@ionic/react/dist
|
||||
cp -a ../react/css node_modules/@ionic/react/css
|
||||
cp -a ../react/package.json node_modules/@ionic/react/package.json
|
||||
|
||||
# Copy core dist
|
||||
rm -rf node_modules/@ionic/core/dist node_modules/@ionic/core/components
|
||||
cp -a ../../core/dist node_modules/@ionic/core/dist
|
||||
cp -a ../../core/components node_modules/@ionic/core/components
|
||||
cp -a ../../core/package.json node_modules/@ionic/core/package.json
|
||||
38480
packages/react-router/test/apps/reactrouter5/package-lock.json
generated
Normal file
38480
packages/react-router/test/apps/reactrouter5/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,18 +3,15 @@
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ionic/react": "workspace:*",
|
||||
"@ionic/react-router": "workspace:*",
|
||||
"@ionic/react": "^6.6.1",
|
||||
"@ionic/react-router": "^6.6.1",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/history": "4",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"@types/react": "^18.0.28",
|
||||
"@types/react-dom": "^18.0.11",
|
||||
"@types/react-router": "^5.1.20",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"history": "^4.9.0",
|
||||
"ionicons": "^6.0.4",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
@@ -31,7 +28,8 @@
|
||||
"test": "cypress open",
|
||||
"cypress": "node_modules/.bin/cypress run --headless --browser chrome",
|
||||
"cypress.open": "cypress open",
|
||||
"e2e": "concurrently \"serve -s build -l 3000\" \"wait-on http-get://localhost:3000 && pnpm run cypress\" --kill-others --success first"
|
||||
"e2e": "concurrently \"serve -s build -l 3000\" \"wait-on http-get://localhost:3000 && npm run cypress\" --kill-others --success first",
|
||||
"sync": "sh ./scripts/sync.sh"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
@@ -61,9 +59,5 @@
|
||||
"description": "An Ionic project",
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "^18.0.27",
|
||||
"react": "^18.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
15924
packages/react-router/test/apps/reactrouter5/pnpm-lock.yaml
generated
15924
packages/react-router/test/apps/reactrouter5/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
||||
packages:
|
||||
- ../../../../react
|
||||
- ../../../../react-router
|
||||
- ../../../../../core
|
||||
18
packages/react-router/test/base/scripts/sync.sh
Normal file
18
packages/react-router/test/base/scripts/sync.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Delete old packages
|
||||
rm -f *.tgz
|
||||
|
||||
# Pack @ionic/core
|
||||
npm pack ../../../../../core
|
||||
|
||||
# Pack @ionic/react
|
||||
npm pack ../../../../react
|
||||
|
||||
# Pack @ionic/react-router
|
||||
npm pack ../../../
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
21519
packages/react/package-lock.json
generated
Normal file
21519
packages/react/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -20,16 +20,17 @@
|
||||
"url": "git+https://github.com/ionic-team/ionic-framework.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm run clean && pnpm run copy && pnpm run compile",
|
||||
"build.watch": "pnpm copy && pnpm compile --watch",
|
||||
"build": "npm run clean && npm run copy && npm run compile",
|
||||
"build.watch": "npm run compile -- --watch",
|
||||
"clean": "rimraf dist && rimraf routing",
|
||||
"compile": "rollup -c",
|
||||
"eslint": "eslint src",
|
||||
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
|
||||
"lint": "pnpm run eslint && pnpm run prettier --write --cache",
|
||||
"lint.fix": "pnpm run eslint --fix && pnpm run prettier --write --cache",
|
||||
"lint": "npm run eslint && npm run prettier -- --write --cache",
|
||||
"lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
|
||||
"copy": "node scripts/copy.js",
|
||||
"test.spec": "jest --ci"
|
||||
"test.spec": "jest --ci",
|
||||
"sync": "sh ./scripts/sync.sh"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/types/index.d.ts",
|
||||
@@ -38,7 +39,7 @@
|
||||
"css/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@ionic/core": "workspace:*",
|
||||
"@ionic/core": "^7.6.6",
|
||||
"ionicons": "^7.0.0",
|
||||
"tslib": "*"
|
||||
},
|
||||
@@ -50,7 +51,7 @@
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@rollup/plugin-typescript": "^11.1.5",
|
||||
"@testing-library/jest-dom": "^6.1.5",
|
||||
"@testing-library/jest-dom": "^5.11.6",
|
||||
"@testing-library/react": "^11.2.2",
|
||||
"@testing-library/react-hooks": "^7.0.1",
|
||||
"@types/jest": "^26.0.15",
|
||||
@@ -62,7 +63,6 @@
|
||||
"eslint": "^7.32.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^26.6.3",
|
||||
"jest-environment-jsdom": "^26.6.0",
|
||||
"np": "^6.4.0",
|
||||
"prettier": "^2.8.3",
|
||||
"react": "^16.9.0",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
const external = ['react', 'react-dom', 'react-router', 'react-router-dom', 'history', 'tslib'];
|
||||
|
||||
export default {
|
||||
input: 'src/index.ts',
|
||||
@@ -12,8 +11,8 @@ export default {
|
||||
sourcemap: true,
|
||||
}
|
||||
],
|
||||
external: (id) => !/^(\.|\/)/.test(id),
|
||||
plugins: [
|
||||
typescript(),
|
||||
],
|
||||
external: id => external.includes(id) || id.startsWith('@ionic/core') || id.startsWith('ionicons'),
|
||||
};
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
/**
|
||||
* Copy the CSS from the core package to the react package.
|
||||
*
|
||||
* This allows developers to import the global stylesheets
|
||||
* from the @ionic/react package instead of @ionic/core.
|
||||
*/
|
||||
|
||||
function copyCSS() {
|
||||
const src = path.join(__dirname, '..', '..', '..', 'core', 'css');
|
||||
const dst = path.join(__dirname, '..', 'css');
|
||||
|
||||
12
packages/react/scripts/sync.sh
Normal file
12
packages/react/scripts/sync.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Delete old packages
|
||||
rm -f *.tgz
|
||||
|
||||
# Pack @ionic/core
|
||||
npm pack ../../core
|
||||
|
||||
# Install Dependencies
|
||||
npm install *.tgz --no-save
|
||||
@@ -12,8 +12,6 @@ import { IonAppInner } from './inner-proxies';
|
||||
type Props = LocalJSX.IonApp &
|
||||
IonicReactProps & {
|
||||
ref?: React.Ref<HTMLIonAppElement>;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const IonApp = /*@__PURE__*/ (() =>
|
||||
|
||||
@@ -21,8 +21,6 @@ interface IonIconProps {
|
||||
|
||||
type InternalProps = IonIconProps & {
|
||||
forwardedRef?: React.ForwardedRef<HTMLIonIconElement>;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
class IonIconContainer extends React.PureComponent<InternalProps> {
|
||||
|
||||
@@ -6,10 +6,8 @@ import PageManager from '../routing/PageManager';
|
||||
import type { IonicReactProps } from './IonicReactProps';
|
||||
import { createForwardRef } from './utils';
|
||||
|
||||
interface IonPageProps extends IonicReactProps {
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface IonPageProps extends IonicReactProps {}
|
||||
|
||||
interface IonPageInternalProps extends IonPageProps {
|
||||
forwardedRef?: React.ForwardedRef<HTMLDivElement>;
|
||||
|
||||
@@ -12,8 +12,6 @@ type Props = LocalJSX.IonRouterOutlet & {
|
||||
basePath?: string;
|
||||
ref?: React.Ref<any>;
|
||||
ionPage?: boolean;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
interface InternalProps extends Props {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as utils from '../react-component-lib/utils';
|
||||
import '@testing-library/jest-dom';
|
||||
import '@testing-library/jest-dom/extend-expect';
|
||||
|
||||
describe('isCoveredByReact', () => {
|
||||
it('should identify standard events as covered by React', () => {
|
||||
|
||||
@@ -15,8 +15,6 @@ const IonNavInner = createReactComponent<JSX.IonNav & { delegate: FrameworkDeleg
|
||||
|
||||
type IonNavProps = JSX.IonNav & {
|
||||
forwardedRef?: React.ForwardedRef<HTMLIonNavElement>;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
||||
@@ -15,8 +15,6 @@ type IonTabBarProps = LocalJSX.IonTabBar &
|
||||
onIonTabsWillChange?: (event: CustomEvent<{ tab: string }>) => void;
|
||||
slot?: 'bottom' | 'top';
|
||||
style?: { [key: string]: string };
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
interface InternalProps extends IonTabBarProps {
|
||||
|
||||
@@ -10,8 +10,6 @@ type Props = LocalJSX.IonTabButton &
|
||||
routerOptions?: RouterOptions;
|
||||
ref?: React.Ref<HTMLIonTabButtonElement>;
|
||||
onClick?: (e: CustomEvent) => void;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export const IonTabButton = /*@__PURE__*/ (() =>
|
||||
|
||||
@@ -34,8 +34,6 @@ interface NavManagerProps {
|
||||
ionRoute: any;
|
||||
stackManager: any;
|
||||
locationHistory: LocationHistory;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export class NavManager extends React.PureComponent<NavManagerProps, NavContextState> {
|
||||
|
||||
@@ -12,8 +12,6 @@ interface OutletPageManagerProps {
|
||||
forwardedRef?: React.ForwardedRef<HTMLIonRouterOutletElement>;
|
||||
routeInfo?: RouteInfo;
|
||||
StackManager: any; // TODO(FW-2959): type
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export class OutletPageManager extends React.Component<OutletPageManagerProps> {
|
||||
|
||||
@@ -10,8 +10,6 @@ interface PageManagerProps {
|
||||
className?: string;
|
||||
forwardedRef?: React.ForwardedRef<HTMLDivElement>;
|
||||
routeInfo?: RouteInfo;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export class PageManager extends React.PureComponent<PageManagerProps> {
|
||||
|
||||
@@ -5,8 +5,6 @@ import { DefaultIonLifeCycleContext, IonLifeCycleContext } from '../contexts/Ion
|
||||
interface ViewTransitionManagerProps {
|
||||
removeView: () => void;
|
||||
mount: boolean;
|
||||
// TODO: Refactor type with PropsWithChildren when moving to React v18
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
interface ViewTransitionManagerState {
|
||||
|
||||
@@ -39,12 +39,6 @@ To add new tests, components, or pages, modify the `base` project. This ensures
|
||||
|
||||
If you want to add a version-specific change, add the change inside of the appropriate projects in `apps`. Be sure to replicate the directory structure. For example, if you are adding a new E2E test file called `test.e2e.ts` in `apps/react17`, make sure you place the file in `apps/react17/tests/e2e/test.e2e.ts`.
|
||||
|
||||
If you are updating dependencies in the `base` project, you can update the lock file without installing dependencies by running the following command:
|
||||
|
||||
```
|
||||
pnpm install --lockfile-only
|
||||
```
|
||||
|
||||
### Version-specific tests
|
||||
|
||||
If you need to add E2E tests that are only run on a specific version of the JS Framework, replicate the `VersionTest` component on each partial application. This ensures that tests for framework version X do not get run for framework version Y.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user