From 94c13c29944e9dbc0dd97bba5f57e4c56d94febb Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 11 Oct 2019 12:59:08 -0400 Subject: [PATCH 1/5] chore(scripts): update release script to include tag for rc - adds support for changing the tag from `latest` to `next` - checks the user's confirmation on the prepare and tag to end the script if the user selects no - adds support for passing --dry-run to see what the publish will be --- .github/PROCESS.md | 2 ++ .scripts/common.js | 30 ++++++++++++++++++++++++++++++ .scripts/prepare.js | 10 +++++++--- .scripts/release.js | 28 +++++++++++++++++++++++----- 4 files changed, 62 insertions(+), 8 deletions(-) diff --git a/.github/PROCESS.md b/.github/PROCESS.md index 515cac91cc..1bba4c4107 100644 --- a/.github/PROCESS.md +++ b/.github/PROCESS.md @@ -240,6 +240,8 @@ Hotfixes bypass `master` and should only be used for urgent fixes that can't wai - For major or minor releases, ensure that the version number has an associated title (for example: `4.5.0 Boron`) - Commit these changes with the version number as the message, e.g. `git commit -m "4.5.0"` +1. *(Optional)* Run `npm run release -- --dry-run` to run the release without publishing and verify the version. + 1. Run `npm run release` 1. Click **Merge pull request**. Use the dropdown to select this option if necessary. diff --git a/.scripts/common.js b/.scripts/common.js index 03996cac99..7e07d80d2a 100644 --- a/.scripts/common.js +++ b/.scripts/common.js @@ -1,6 +1,7 @@ const fs = require('fs-extra'); const path = require('path'); const execa = require('execa'); +const inquirer = require('inquirer'); const Listr = require('listr'); const semver = require('semver'); const tc = require('turbocolor'); @@ -34,6 +35,34 @@ function projectPath(project) { return path.join(rootDir, project); } +async function askTag() { + const prompts = [ + { + type: 'list', + name: 'tag', + message: 'Select npm tag or specify a new tag', + choices: ['latest', 'next'] + .concat([ + new inquirer.Separator(), + { + name: 'Other (specify)', + value: null + } + ]) + }, + { + type: 'confirm', + name: 'confirm', + message: answers => { + return `Will publish to ${tc.cyan(answers.tag)}. Continue?`; + } + } + ]; + + const { tag, confirm } = await inquirer.prompt(prompts); + return { tag, confirm }; +} + function checkGit(tasks) { tasks.push( { @@ -300,6 +329,7 @@ function copyCDNLoader(tasks, version) { module.exports = { checkTestDist, checkGit, + askTag, isValidVersion, isVersionGreater, copyCDNLoader, diff --git a/.scripts/prepare.js b/.scripts/prepare.js index 0c47bd4864..0d37e4bbce 100644 --- a/.scripts/prepare.js +++ b/.scripts/prepare.js @@ -17,9 +17,13 @@ async function main() { throw new Error('env.GH_TOKEN is undefined'); } - const version = await askVersion(); + const { version, confirm } = await askVersion(); const install = process.argv.indexOf('--no-install') < 0; + if (!confirm) { + return; + } + // compile and verify packages await preparePackages(common.packages, version, install); @@ -85,8 +89,8 @@ async function askVersion() { } ]; - const {version} = await inquirer.prompt(prompts); - return version; + const { version, confirm } = await inquirer.prompt(prompts); + return { version, confirm }; } diff --git a/.scripts/release.js b/.scripts/release.js index 97c69b66fa..4c49149518 100644 --- a/.scripts/release.js +++ b/.scripts/release.js @@ -13,6 +13,8 @@ const fs = require('fs-extra'); async function main() { try { + const dryRun = process.argv.indexOf('--dry-run') > -1; + if (!process.env.GH_TOKEN) { throw new Error('env.GH_TOKEN is undefined'); } @@ -26,15 +28,31 @@ async function main() { // repo must be clean common.checkGit(tasks); - // publish each package in NPM - common.publishPackages(tasks, common.packages, version); + const { tag, confirm } = await common.askTag(); - // push tag to git remote - publishGit(tasks, version, changelog); + if (!confirm) { + return; + } + + if(!dryRun) { + // publish each package in NPM + common.publishPackages(tasks, common.packages, version, tag); + + // push tag to git remote + publishGit(tasks, version, changelog); + } const listr = new Listr(tasks); await listr.run(); - console.log(`\nionic ${version} published!! 🎉\n`); + + // Dry run doesn't publish to npm or git + if (dryRun) { + console.log(` + \n${tc.yellow('Did not publish. Remove the "--dry-run" flag to publish:')}\n${tc.green(version)} to ${tc.cyan(tag)}\n + `); + } else { + console.log(`\nionic ${version} published to ${tag}!! 🎉\n`); + } } catch (err) { console.log('\n', tc.red(err), '\n'); From b3e035085c4c7a4b9b25e3a7e455193ca6392f8f Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 11 Oct 2019 17:56:55 -0400 Subject: [PATCH 2/5] chore: increase timeout --- angular/test/test-app/e2e/protractor.conf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular/test/test-app/e2e/protractor.conf.js b/angular/test/test-app/e2e/protractor.conf.js index 238cc05d29..7e68f9da19 100644 --- a/angular/test/test-app/e2e/protractor.conf.js +++ b/angular/test/test-app/e2e/protractor.conf.js @@ -23,7 +23,7 @@ exports.config = { framework: 'jasmine', jasmineNodeOpts: { showColors: true, - defaultTimeoutInterval: 50000, + defaultTimeoutInterval: 70000, print: function() {} }, onPrepare() { From ce0bed4cf3ad6574346621cb98e488d7ec29bccb Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Mon, 14 Oct 2019 14:00:18 -0400 Subject: [PATCH 3/5] chore(release): update release script to move the npm link --- .scripts/common.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.scripts/common.js b/.scripts/common.js index 7e07d80d2a..09240d0d5f 100644 --- a/.scripts/common.js +++ b/.scripts/common.js @@ -156,13 +156,6 @@ function preparePackage(tasks, package, version, install) { title: `${pkg.name}: lint`, task: () => execa('npm', ['run', 'lint'], { cwd: projectRoot }) }); - projectTasks.push({ - title: `${pkg.name}: update ionic/core dep to ${version}`, - task: () => { - updateDependency(pkg, '@ionic/core', version); - writePkg(package, pkg); - } - }); projectTasks.push({ title: `${pkg.name}: test`, task: () => execa('npm', ['test'], { cwd: projectRoot }) @@ -179,6 +172,16 @@ function preparePackage(tasks, package, version, install) { task: () => execa('npm', ['link'], { cwd: projectRoot }) }); } + + if (version) { + projectTasks.push({ + title: `${pkg.name}: update ionic/core dep to ${version}`, + task: () => { + updateDependency(pkg, '@ionic/core', version); + writePkg(package, pkg); + } + }); + } } // Add project tasks @@ -215,7 +218,7 @@ function prepareDevPackage(tasks, package, version) { task: () => execa('npm', ['run', 'build'], { cwd: projectRoot }) }); - if (package === 'core') { + if (package === 'core' || package === 'packages/react') { projectTasks.push({ title: `${pkg.name}: npm link`, task: () => execa('npm', ['link'], { cwd: projectRoot }) From 43ecf6ce5f759b2e71a40dd001fd4324860ae2e6 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Mon, 14 Oct 2019 18:52:24 -0400 Subject: [PATCH 4/5] chore(release): update target branch to current branch for release tag --- .scripts/release.js | 8 +++++++- core/package.json | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.scripts/release.js b/.scripts/release.js index 4c49149518..105c277eff 100644 --- a/.scripts/release.js +++ b/.scripts/release.js @@ -122,10 +122,16 @@ async function publishGithub(version, tag, changelog) { token: process.env.GH_TOKEN }); + let branch = await execa.stdout('git', ['symbolic-ref', '--short', 'HEAD']); + + if (!branch) { + branch = 'master'; + } + await octokit.repos.createRelease({ owner: 'ionic-team', repo: 'ionic', - target_commitish: 'master', + target_commitish: branch, tag_name: tag, name: version, body: changelog, diff --git a/core/package.json b/core/package.json index b394e2f008..5cba279ea8 100644 --- a/core/package.json +++ b/core/package.json @@ -66,7 +66,6 @@ "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", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "clean": "node scripts/clean.js", "cdnloader": "node scripts/copy-cdn-loader.js", "css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css", From cbf30ea9b708d7f770508d956a947d8f97f4b503 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 15 Oct 2019 11:29:02 -0400 Subject: [PATCH 5/5] 5.0.0-beta.0 --- CHANGELOG.md | 105 ++++++++++++++++++++++++++++- angular/package.json | 4 +- core/package.json | 2 +- docs/package.json | 2 +- packages/react-router/package.json | 10 +-- packages/react/package.json | 4 +- 6 files changed, 115 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd92e7f6a..d844ad4c39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,106 @@ +# [5.0.0-beta.0](https://github.com/ionic-team/ionic/compare/v4.11.1...v5.0.0-beta.0) (2019-10-15) + + +### Bug Fixes + +* **animations:** ensure all elements are cleaned up when calling .destroy() ([#19654](https://github.com/ionic-team/ionic/issues/19654)) ([2f88237](https://github.com/ionic-team/ionic/commit/2f882373bf08ce6ff7ec2ffb36b73e94c20881ca)) +* **content:** set overscroll only on iOS ([#19470](https://github.com/ionic-team/ionic/issues/19470)) ([63c2008](https://github.com/ionic-team/ionic/commit/63c2008a86de19847677fda7b9fedce73ed7669f)), closes [#19465](https://github.com/ionic-team/ionic/issues/19465) +* **css:** update responsive display media queries ([#18601](https://github.com/ionic-team/ionic/issues/18601)) ([5d6e077](https://github.com/ionic-team/ionic/commit/5d6e077067c269d1589e7432e5074af6fc64b2fb)), closes [#18600](https://github.com/ionic-team/ionic/issues/18600) +* **grid:** remove padding on children columns when grid has ion-no-padding ([#19592](https://github.com/ionic-team/ionic/issues/19592)) ([17119f5](https://github.com/ionic-team/ionic/commit/17119f59cf525b90b966e99117137512dbd397b4)), closes [#17459](https://github.com/ionic-team/ionic/issues/17459) +* **searchbar:** update alignment of chips and other elements in toolbar ([#19596](https://github.com/ionic-team/ionic/issues/19596)) ([637f26b](https://github.com/ionic-team/ionic/commit/637f26b3642a266b6ef3b9d3d71b7327a5d3cc37)), closes [#19495](https://github.com/ionic-team/ionic/issues/19495) [#19502](https://github.com/ionic-team/ionic/issues/19502) +* **toast:** inherit height in container to center align content ([#19409](https://github.com/ionic-team/ionic/issues/19409)) ([250718a](https://github.com/ionic-team/ionic/commit/250718a40f159fbd99f96d54c11e9a6aea080f04)) + + +### Features + +* **components:** cascade mode from parent to child components ([#19369](https://github.com/ionic-team/ionic/issues/19369)) ([3dd5f05](https://github.com/ionic-team/ionic/commit/3dd5f057604dcae7b017accdd37f4f3518a1f113)), closes [#18285](https://github.com/ionic-team/ionic/issues/18285) +* **menu:** default to overlay for ios menu ([#19063](https://github.com/ionic-team/ionic/issues/19063)) ([dbf6a44](https://github.com/ionic-team/ionic/commit/dbf6a448ff3539fda2f182e00fa21435fcd60493)), closes [#18662](https://github.com/ionic-team/ionic/issues/18662) +* **overlays:** add global backdrop opacity variable for animations ([#19533](https://github.com/ionic-team/ionic/issues/19533)) ([bd22926](https://github.com/ionic-team/ionic/commit/bd22926c4995b2d953a08aac7125241929f78f9e)), closes [#16446](https://github.com/ionic-team/ionic/issues/16446) + + +### Performance Improvements + +* **animations:** do not create setTimeout if infinite iterations ([#19632](https://github.com/ionic-team/ionic/issues/19632)) ([0d699fb](https://github.com/ionic-team/ionic/commit/0d699fb2e40b1481d8a63457dce3c58fa45976a3)), closes [#19627](https://github.com/ionic-team/ionic/issues/19627) +* **animations:** wrap loops in requestAnimationFrame call ([#19630](https://github.com/ionic-team/ionic/issues/19630)) ([589e67e](https://github.com/ionic-team/ionic/commit/589e67e4af3c2c5e42984f82cbd83d0246029535)), closes [#19629](https://github.com/ionic-team/ionic/issues/19629) + + +### Breaking Changes + +> We recommend updating to the latest version of 4.x before trying out version 5 in order to see deprecation warnings related to your app in the console. + +* **all:** mode is now cascaded from parent to child component. If this is not desired set a different mode on the child component. ([#19369](https://github.com/ionic-team/ionic/issues/19369)) ([55462d7](https://github.com/ionic-team/ionic/commit/55462d7a0935f57b6855f9bd1bf788bfcf532bc3)) +* **anchor:** remove `ion-anchor`, use `ion-router-link` instead. ([#18935](https://github.com/ionic-team/ionic/issues/18935)) ([e7cd197](https://github.com/ionic-team/ionic/commit/e7cd197af79cdf87f04bc769e0367c7e93c0aa0b)) +* **card:** convert card to shadow. ([#19395](https://github.com/ionic-team/ionic/issues/19395)) ([08bb60d](https://github.com/ionic-team/ionic/commit/08bb60dcbba3140bb2da64bb74217af8a36a266d)) +* **css:** responsive display media queries in the display CSS file have been updated. Instead of using the maximum value of that breakpoint (for `.ion-hide-{breakpoint}-down` classes) the maximum of the media query will be the minimum of that breakpoint. ([#18601](https://github.com/ionic-team/ionic/issues/18601)) ([40a8bff](https://github.com/ionic-team/ionic/commit/40a8bffcd54882300906243781abc12776c61ca6)) +* **css:** remove all CSS utility attributes. Use CSS classes instead. See the documentation for the correct class names: https://ionicframework.com/docs/layout/css-utilities ([#18956](https://github.com/ionic-team/ionic/issues/18956)) ([04862df](https://github.com/ionic-team/ionic/commit/04862df7e1029a4e6c188536cb573ddfd57e9c85)) + + BEFORE: + + ```html + + + + + ``` + + AFTER: + + ```html + + + + + ``` +* **events:** remove the Events service. ([#19600](https://github.com/ionic-team/ionic/issues/19600)) ([8d4a721](https://github.com/ionic-team/ionic/commit/8d4a721c6675c13d1f84c455bb222af60be34312)) + - Use "Observables" for a similar pub/sub architecture: https://angular.io/guide/observables + - Use "Redux" for advanced state management: https://ngrx.io +* **header/footer:** remove `no-border` attribute from header/footer, use `ion-no-border` class instead. ([#18954](https://github.com/ionic-team/ionic/issues/18954)) ([d9f6119](https://github.com/ionic-team/ionic/commit/d9f61197ffc62af10243a6719cc08200fd57ff8b)) +* **menu:** iOS menu now defaults to overlay, set `type` to `"reveal"` to get the old behavior. ([#19063](https://github.com/ionic-team/ionic/issues/19063)) ([ccb54a1](https://github.com/ionic-team/ionic/commit/ccb54a1255ca2a303c27e5a0cf68f4e3fb86a2fb)) +* **menu-controller:** remove `swipeEnable()`, use `swipeGesture()` instead. ([#19526](https://github.com/ionic-team/ionic/issues/19526)) ([30bd8fd](https://github.com/ionic-team/ionic/commit/30bd8fd739974926f0eaadddc33c50b546be4887)) +* **nav:** remove `ion-nav-pop`, `ion-nav-push` and `ion-nav-set-root`. Use `ion-nav-link` with `routerDirection` instead. ([#19240](https://github.com/ionic-team/ionic/issues/19240)) ([e334d73](https://github.com/ionic-team/ionic/commit/e334d73e544efddf7335c4ce9a5382f8a34d013e)) +* **searchbar:** remove boolean values from `showCancelButton`, use string values: `"always"`, `"focus"`, `"never"`. ([#18953](https://github.com/ionic-team/ionic/issues/18953)) ([508e186](https://github.com/ionic-team/ionic/commit/508e1868ad672ded49ddababd7a506ff1721534d)) + + BEFORE: + + ```html + + + + ``` + + AFTER: + + ```html + + + + ``` +* **scss:** remove `scss` files from `dist/`, use CSS variables to theme instead. ([#19292](https://github.com/ionic-team/ionic/issues/19292)) ([6450aff](https://github.com/ionic-team/ionic/commit/6450aff080c561c60c140000b89ff340edeeaeca)) +* **skeleton-text:** remove `width` property. Use CSS instead. ([#18936](https://github.com/ionic-team/ionic/issues/18936)) ([7c3db79](https://github.com/ionic-team/ionic/commit/7c3db79c23dac599aa8131753b33b1ed3487d776)) +* **split-pane:** remove `main` attribute. Use `contentId` instead. ([#19511](https://github.com/ionic-team/ionic/issues/19511)) ([02d7841](https://github.com/ionic-team/ionic/commit/02d784140ce0fc75718781454e8dd8a2f621ee0d)) + + BEFORE: + + ```html + + ... +
...
+
+ ``` + + AFTER: + + ```html + + ... +
...
+
+ ``` +* **theming:** ionic default colors have been updated. ([#19279](https://github.com/ionic-team/ionic/issues/19279)) ([7f4cf08](https://github.com/ionic-team/ionic/commit/7f4cf08d996f90ae90064a351f8e373ce7a16799)) +* **toast:** remove `showCloseButton` and `closeButtonText`, add a button using the `buttons` property with `role: 'cancel'` instead. ([#18957](https://github.com/ionic-team/ionic/issues/18957)) ([ad7f112](https://github.com/ionic-team/ionic/commit/ad7f112e1eb04e41e697936454e63977d1bde34b)) + + + ## [4.11.1](https://github.com/ionic-team/ionic/compare/v4.11.0...v4.11.1) (2019-10-14) @@ -12,7 +115,7 @@ # [4.11.0 Sodium](https://github.com/ionic-team/ionic/compare/v4.10.3...v4.11.0) (2019-10-09) -Ionic React! Enjoy! 🧂 🌊 🐼 +Ionic React! Enjoy! 🧂 🌊 🐼 ## [4.10.3](https://github.com/ionic-team/ionic/compare/v4.10.2...v4.10.3) (2019-10-09) diff --git a/angular/package.json b/angular/package.json index 5d91ceec4c..af6bcb7df7 100644 --- a/angular/package.json +++ b/angular/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/angular", - "version": "4.11.1", + "version": "5.0.0-beta.0", "description": "Angular specific wrappers for @ionic/core", "keywords": [ "ionic", @@ -49,7 +49,7 @@ "css/" ], "dependencies": { - "@ionic/core": "4.11.1", + "@ionic/core": "5.0.0-beta.0", "tslib": "^1.9.3" }, "peerDependencies": { diff --git a/core/package.json b/core/package.json index 5cba279ea8..346414d83e 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/core", - "version": "4.11.1", + "version": "5.0.0-beta.0", "description": "Base components for Ionic", "keywords": [ "ionic", diff --git a/docs/package.json b/docs/package.json index 1c43e35c71..c7dc9be30d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/docs", - "version": "4.11.1", + "version": "5.0.0-beta.0", "description": "Pre-packaged API documentation for the Ionic docs.", "main": "core.json", "types": "core.d.ts", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 892a2e4e48..c53685501b 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react-router", - "version": "4.11.1", + "version": "5.0.0-beta.0", "description": "React Router wrapper for @ionic/react", "keywords": [ "ionic", @@ -39,16 +39,16 @@ "tslib": "*" }, "peerDependencies": { - "@ionic/core": "4.11.1", - "@ionic/react": "4.11.1", + "@ionic/core": "5.0.0-beta.0", + "@ionic/react": "5.0.0-beta.0", "react": "^16.8.6", "react-dom": "^16.8.6", "react-router": "^5.0.1", "react-router-dom": "^5.0.1" }, "devDependencies": { - "@ionic/core": "4.11.1", - "@ionic/react": "4.11.1", + "@ionic/core": "5.0.0-beta.0", + "@ionic/react": "5.0.0-beta.0", "@types/jest": "^23.3.9", "@types/node": "12.6.9", "@types/react": "^16.9.2", diff --git a/packages/react/package.json b/packages/react/package.json index 8322e12224..5e8ffbecf4 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@ionic/react", - "version": "4.11.1", + "version": "5.0.0-beta.0", "description": "React specific wrapper for @ionic/core", "keywords": [ "ionic", @@ -39,7 +39,7 @@ "css/" ], "dependencies": { - "@ionic/core": "4.11.1", + "@ionic/core": "5.0.0-beta.0", "tslib": "*" }, "peerDependencies": {