Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
* doc: improve developer notes for release
* chore: add script option for prerelease
* chore: update package versions to 1.0.0
  • Loading branch information
VictorVelarde authored Mar 23, 2021
1 parent ec10aa9 commit 3364007
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 69 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# CHANGELOG

## Not released

## 1.0.0 (2021-03-23)

- Fix prettier when running lint:fix [#222](https://github.com/CartoDB/carto-react-template/pull/222)
- Improve error messages on formatters and popups [#223](https://github.com/CartoDB/carto-react-template/pull/223)

Expand Down
32 changes: 11 additions & 21 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Developer notes

To develop for a template itself, you need to create a `package.json` file in the template folder and add it to the gitignore list, as this file would overwrite the one created by create-react-app when used. This is as easy as follows:
Expand Down Expand Up @@ -32,31 +31,22 @@ Follow these steps:

1. Open a new branch for the release from master, eg. `git checkout -b release-v1.0.0-rc.3`
2. For each template:
- remove the link to @carto/react-* packages with `yarn unlink-carto-react`
- ensure latest references with `yarn`. Delete previously node_modules if you feel a bit unsure :)
- launch the app, with `yarn start`
- test cypress locally, with `yarn cy:run`
- manual review from browser (see errors & warnings)
- from template root folder (eg. template-skeleton), run `yarn clean`
- copy the hygen templates, so you can test them inside the client project
- use create-react-app to build a project
- test cra project result as a user, including hygen generators
3. Bump manually package version in package.json (root level --> package.json & inside template --> package.dev.json), checking @carto/react-* package versions are also correct.
- remove the link to @carto/react-\* packages with `yarn unlink-carto-react`
- ensure latest references with `yarn`. Delete previously node_modules if you feel a bit unsure :)
- launch the app, with `yarn start`
- test cypress locally, with `yarn cy:run`
- manual review from browser (see errors & warnings)
- from template root folder (eg. template-skeleton), run `yarn clean`
- copy the hygen templates, so you can test them inside the client project
- use create-react-app to build a project
- test cra project result as a user, including hygen generators
3. Bump manually package version in package.json (root level --> package.json & inside template --> package.dev.json), checking @carto/react-\* package versions are also correct.
4. Update changelog: rename 'Unrelased' to new version, eg 1.0.0-rc.3 (2021-03-23)
5. Push branch to remote to run CI (all test green) with `git push`
6. Execute the release command, for each template, from its **base folder** (eg. template-sample-app): `yarn release`.

```bash
cd template-sample-app
yarn release
```
Before this command is executed, a prerelease hook will clean all unnecesary development files and folders and copy the latest hygen templates, before making the npm release.
6. Execute the release command, for each template, from its **base folder** (eg. template-sample-app): `yarn publish:prerelease` or `yarn publish:release`. Before the npm publication, a prepare-release script will clean all unnecesary development files and folders and copy the latest hygen templates.
7. After a succesful release, merge the PR and create a tag in github
8. Deploy the sample app template to firebase (if required)




## Deploying the sample app

The sample app corresponding to https://sample-app-react.carto.com/ is hosted in Firebase, so before deploying it you'll need to log into Firebase using:
Expand Down
7 changes: 4 additions & 3 deletions template-sample-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carto/cra-template-sample-app",
"version": "1.0.0-rc.3",
"version": "1.0.0",
"keywords": [
"react",
"create-react-app",
Expand All @@ -24,8 +24,9 @@
"build": "cd template && react-scripts build",
"test": "cd template && react-scripts test",
"clean": "cd template && rm -rf build && rm -rf _templates && rm -rf node_modules && rm -f package.json && rm -f yarn.lock && rm -f package-lock.json",
"prerelease": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
"release": "yarn publish --access public --non-interactive"
"prepare-release": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
"publish:prerelease": "yarn run prepare-release && yarn publish --access public --non-interactive --dist-tag prerelease",
"publish:release": "yarn run prepare-release && yarn publish --access public --non-interactive"
},
"husky": {
"hooks": {
Expand Down
16 changes: 8 additions & 8 deletions template-sample-app/template.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"package": {
"dependencies": {
"@carto/react-api": "1.0.0-rc.3",
"@carto/react-auth": "1.0.0-rc.3",
"@carto/react-basemaps": "1.0.0-rc.3",
"@carto/react-core": "1.0.0-rc.3",
"@carto/react-redux": "1.0.0-rc.3",
"@carto/react-ui": "1.0.0-rc.3",
"@carto/react-widgets": "1.0.0-rc.3",
"@carto/react-workers": "1.0.0-rc.3",
"@carto/react-api": "1.0.0",
"@carto/react-auth": "1.0.0",
"@carto/react-basemaps": "1.0.0",
"@carto/react-core": "1.0.0",
"@carto/react-redux": "1.0.0",
"@carto/react-ui": "1.0.0",
"@carto/react-widgets": "1.0.0",
"@carto/react-workers": "1.0.0",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down
18 changes: 9 additions & 9 deletions template-sample-app/template/package.dev.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "carto-for-react",
"version": "1.0.0-rc.3",
"version": "1.0.0",
"private": true,
"dependencies": {
"@carto/react-api": "1.0.0-rc.3",
"@carto/react-auth": "1.0.0-rc.3",
"@carto/react-basemaps": "1.0.0-rc.3",
"@carto/react-core": "1.0.0-rc.3",
"@carto/react-redux": "1.0.0-rc.3",
"@carto/react-ui": "1.0.0-rc.3",
"@carto/react-widgets": "1.0.0-rc.3",
"@carto/react-workers": "1.0.0-rc.3",
"@carto/react-api": "1.0.0",
"@carto/react-auth": "1.0.0",
"@carto/react-basemaps": "1.0.0",
"@carto/react-core": "1.0.0",
"@carto/react-redux": "1.0.0",
"@carto/react-ui": "1.0.0",
"@carto/react-widgets": "1.0.0",
"@carto/react-workers": "1.0.0",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down
7 changes: 4 additions & 3 deletions template-skeleton/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@carto/cra-template",
"version": "1.0.0-rc.3",
"version": "1.0.0",
"keywords": [
"react",
"create-react-app",
Expand All @@ -24,8 +24,9 @@
"build": "cd template && react-scripts build",
"test": "cd template && react-scripts test",
"clean": "cd template && rm -rf build && rm -rf _templates && rm -rf node_modules && rm -f package.json && rm -f yarn.lock && rm -f package-lock.json",
"prerelease": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
"release": "yarn publish --access public --non-interactive"
"prepare-release": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
"publish:prerelease": "yarn run prepare-release && yarn publish --access public --non-interactive --dist-tag prerelease",
"publish:release": "yarn run prepare-release && yarn publish --access public --non-interactive"
},
"husky": {
"hooks": {
Expand Down
16 changes: 8 additions & 8 deletions template-skeleton/template.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"package": {
"dependencies": {
"@carto/react-api": "1.0.0-rc.3",
"@carto/react-auth": "1.0.0-rc.3",
"@carto/react-basemaps": "1.0.0-rc.3",
"@carto/react-core": "1.0.0-rc.3",
"@carto/react-redux": "1.0.0-rc.3",
"@carto/react-ui": "1.0.0-rc.3",
"@carto/react-widgets": "1.0.0-rc.3",
"@carto/react-workers": "1.0.0-rc.3",
"@carto/react-api": "1.0.0",
"@carto/react-auth": "1.0.0",
"@carto/react-basemaps": "1.0.0",
"@carto/react-core": "1.0.0",
"@carto/react-redux": "1.0.0",
"@carto/react-ui": "1.0.0",
"@carto/react-widgets": "1.0.0",
"@carto/react-workers": "1.0.0",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down
28 changes: 11 additions & 17 deletions template-skeleton/template/package.dev.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "carto-for-react",
"version": "1.0.0-rc.3",
"version": "1.0.0",
"private": true,
"dependencies": {
"@carto/react-api": "1.0.0-rc.3",
"@carto/react-auth": "1.0.0-rc.3",
"@carto/react-basemaps": "1.0.0-rc.3",
"@carto/react-core": "1.0.0-rc.3",
"@carto/react-redux": "1.0.0-rc.3",
"@carto/react-ui": "1.0.0-rc.3",
"@carto/react-widgets": "1.0.0-rc.3",
"@carto/react-workers": "1.0.0-rc.3",
"@carto/react-api": "1.0.0",
"@carto/react-auth": "1.0.0",
"@carto/react-basemaps": "1.0.0",
"@carto/react-core": "1.0.0",
"@carto/react-redux": "1.0.0",
"@carto/react-ui": "1.0.0",
"@carto/react-widgets": "1.0.0",
"@carto/react-workers": "1.0.0",
"@formatjs/intl-getcanonicallocales": "^1.5.3",
"@formatjs/intl-locale": "^2.4.14",
"@formatjs/intl-numberformat": "^6.1.4",
Expand Down Expand Up @@ -67,14 +67,8 @@
"updateSupportedBrowsers": "echo \"var browserRegex = $(npx browserslist-useragent-regexp --allowHigherVersions);\" > public/supportedBrowsers.js"
},
"eslintConfig": {
"extends": [
"react-app",
"prettier",
"prettier/react"
],
"plugins": [
"prettier"
],
"extends": ["react-app", "prettier", "prettier/react"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
Expand Down

1 comment on commit 3364007

@vercel
Copy link

@vercel vercel bot commented on 3364007 Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.