Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 3364007

Browse files
v1.0.0
* doc: improve developer notes for release * chore: add script option for prerelease * chore: update package versions to 1.0.0
1 parent ec10aa9 commit 3364007

File tree

8 files changed

+58
-69
lines changed

8 files changed

+58
-69
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# CHANGELOG
22

33
## Not released
4+
5+
## 1.0.0 (2021-03-23)
6+
47
- Fix prettier when running lint:fix [#222](https://github.com/CartoDB/carto-react-template/pull/222)
58
- Improve error messages on formatters and popups [#223](https://github.com/CartoDB/carto-react-template/pull/223)
69

DEVELOPERS.md

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Developer notes
32

43
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:
@@ -32,31 +31,22 @@ Follow these steps:
3231

3332
1. Open a new branch for the release from master, eg. `git checkout -b release-v1.0.0-rc.3`
3433
2. For each template:
35-
- remove the link to @carto/react-* packages with `yarn unlink-carto-react`
36-
- ensure latest references with `yarn`. Delete previously node_modules if you feel a bit unsure :)
37-
- launch the app, with `yarn start`
38-
- test cypress locally, with `yarn cy:run`
39-
- manual review from browser (see errors & warnings)
40-
- from template root folder (eg. template-skeleton), run `yarn clean`
41-
- copy the hygen templates, so you can test them inside the client project
42-
- use create-react-app to build a project
43-
- test cra project result as a user, including hygen generators
44-
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.
34+
- remove the link to @carto/react-\* packages with `yarn unlink-carto-react`
35+
- ensure latest references with `yarn`. Delete previously node_modules if you feel a bit unsure :)
36+
- launch the app, with `yarn start`
37+
- test cypress locally, with `yarn cy:run`
38+
- manual review from browser (see errors & warnings)
39+
- from template root folder (eg. template-skeleton), run `yarn clean`
40+
- copy the hygen templates, so you can test them inside the client project
41+
- use create-react-app to build a project
42+
- test cra project result as a user, including hygen generators
43+
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.
4544
4. Update changelog: rename 'Unrelased' to new version, eg 1.0.0-rc.3 (2021-03-23)
4645
5. Push branch to remote to run CI (all test green) with `git push`
47-
6. Execute the release command, for each template, from its **base folder** (eg. template-sample-app): `yarn release`.
48-
49-
```bash
50-
cd template-sample-app
51-
yarn release
52-
```
53-
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.
46+
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.
5447
7. After a succesful release, merge the PR and create a tag in github
5548
8. Deploy the sample app template to firebase (if required)
5649

57-
58-
59-
6050
## Deploying the sample app
6151

6252
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:

template-sample-app/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@carto/cra-template-sample-app",
3-
"version": "1.0.0-rc.3",
3+
"version": "1.0.0",
44
"keywords": [
55
"react",
66
"create-react-app",
@@ -24,8 +24,9 @@
2424
"build": "cd template && react-scripts build",
2525
"test": "cd template && react-scripts test",
2626
"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",
27-
"prerelease": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
28-
"release": "yarn publish --access public --non-interactive"
27+
"prepare-release": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
28+
"publish:prerelease": "yarn run prepare-release && yarn publish --access public --non-interactive --dist-tag prerelease",
29+
"publish:release": "yarn run prepare-release && yarn publish --access public --non-interactive"
2930
},
3031
"husky": {
3132
"hooks": {

template-sample-app/template.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@carto/react-api": "1.0.0-rc.3",
5-
"@carto/react-auth": "1.0.0-rc.3",
6-
"@carto/react-basemaps": "1.0.0-rc.3",
7-
"@carto/react-core": "1.0.0-rc.3",
8-
"@carto/react-redux": "1.0.0-rc.3",
9-
"@carto/react-ui": "1.0.0-rc.3",
10-
"@carto/react-widgets": "1.0.0-rc.3",
11-
"@carto/react-workers": "1.0.0-rc.3",
4+
"@carto/react-api": "1.0.0",
5+
"@carto/react-auth": "1.0.0",
6+
"@carto/react-basemaps": "1.0.0",
7+
"@carto/react-core": "1.0.0",
8+
"@carto/react-redux": "1.0.0",
9+
"@carto/react-ui": "1.0.0",
10+
"@carto/react-widgets": "1.0.0",
11+
"@carto/react-workers": "1.0.0",
1212
"@formatjs/intl-getcanonicallocales": "^1.5.3",
1313
"@formatjs/intl-locale": "^2.4.14",
1414
"@formatjs/intl-numberformat": "^6.1.4",

template-sample-app/template/package.dev.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "carto-for-react",
3-
"version": "1.0.0-rc.3",
3+
"version": "1.0.0",
44
"private": true,
55
"dependencies": {
6-
"@carto/react-api": "1.0.0-rc.3",
7-
"@carto/react-auth": "1.0.0-rc.3",
8-
"@carto/react-basemaps": "1.0.0-rc.3",
9-
"@carto/react-core": "1.0.0-rc.3",
10-
"@carto/react-redux": "1.0.0-rc.3",
11-
"@carto/react-ui": "1.0.0-rc.3",
12-
"@carto/react-widgets": "1.0.0-rc.3",
13-
"@carto/react-workers": "1.0.0-rc.3",
6+
"@carto/react-api": "1.0.0",
7+
"@carto/react-auth": "1.0.0",
8+
"@carto/react-basemaps": "1.0.0",
9+
"@carto/react-core": "1.0.0",
10+
"@carto/react-redux": "1.0.0",
11+
"@carto/react-ui": "1.0.0",
12+
"@carto/react-widgets": "1.0.0",
13+
"@carto/react-workers": "1.0.0",
1414
"@formatjs/intl-getcanonicallocales": "^1.5.3",
1515
"@formatjs/intl-locale": "^2.4.14",
1616
"@formatjs/intl-numberformat": "^6.1.4",

template-skeleton/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@carto/cra-template",
3-
"version": "1.0.0-rc.3",
3+
"version": "1.0.0",
44
"keywords": [
55
"react",
66
"create-react-app",
@@ -24,8 +24,9 @@
2424
"build": "cd template && react-scripts build",
2525
"test": "cd template && react-scripts test",
2626
"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",
27-
"prerelease": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
28-
"release": "yarn publish --access public --non-interactive"
27+
"prepare-release": "yarn clean && cp template/README.md README.md && cp -r ../hygen/_templates template/_templates && sync",
28+
"publish:prerelease": "yarn run prepare-release && yarn publish --access public --non-interactive --dist-tag prerelease",
29+
"publish:release": "yarn run prepare-release && yarn publish --access public --non-interactive"
2930
},
3031
"husky": {
3132
"hooks": {

template-skeleton/template.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@carto/react-api": "1.0.0-rc.3",
5-
"@carto/react-auth": "1.0.0-rc.3",
6-
"@carto/react-basemaps": "1.0.0-rc.3",
7-
"@carto/react-core": "1.0.0-rc.3",
8-
"@carto/react-redux": "1.0.0-rc.3",
9-
"@carto/react-ui": "1.0.0-rc.3",
10-
"@carto/react-widgets": "1.0.0-rc.3",
11-
"@carto/react-workers": "1.0.0-rc.3",
4+
"@carto/react-api": "1.0.0",
5+
"@carto/react-auth": "1.0.0",
6+
"@carto/react-basemaps": "1.0.0",
7+
"@carto/react-core": "1.0.0",
8+
"@carto/react-redux": "1.0.0",
9+
"@carto/react-ui": "1.0.0",
10+
"@carto/react-widgets": "1.0.0",
11+
"@carto/react-workers": "1.0.0",
1212
"@formatjs/intl-getcanonicallocales": "^1.5.3",
1313
"@formatjs/intl-locale": "^2.4.14",
1414
"@formatjs/intl-numberformat": "^6.1.4",

template-skeleton/template/package.dev.json

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "carto-for-react",
3-
"version": "1.0.0-rc.3",
3+
"version": "1.0.0",
44
"private": true,
55
"dependencies": {
6-
"@carto/react-api": "1.0.0-rc.3",
7-
"@carto/react-auth": "1.0.0-rc.3",
8-
"@carto/react-basemaps": "1.0.0-rc.3",
9-
"@carto/react-core": "1.0.0-rc.3",
10-
"@carto/react-redux": "1.0.0-rc.3",
11-
"@carto/react-ui": "1.0.0-rc.3",
12-
"@carto/react-widgets": "1.0.0-rc.3",
13-
"@carto/react-workers": "1.0.0-rc.3",
6+
"@carto/react-api": "1.0.0",
7+
"@carto/react-auth": "1.0.0",
8+
"@carto/react-basemaps": "1.0.0",
9+
"@carto/react-core": "1.0.0",
10+
"@carto/react-redux": "1.0.0",
11+
"@carto/react-ui": "1.0.0",
12+
"@carto/react-widgets": "1.0.0",
13+
"@carto/react-workers": "1.0.0",
1414
"@formatjs/intl-getcanonicallocales": "^1.5.3",
1515
"@formatjs/intl-locale": "^2.4.14",
1616
"@formatjs/intl-numberformat": "^6.1.4",
@@ -67,14 +67,8 @@
6767
"updateSupportedBrowsers": "echo \"var browserRegex = $(npx browserslist-useragent-regexp --allowHigherVersions);\" > public/supportedBrowsers.js"
6868
},
6969
"eslintConfig": {
70-
"extends": [
71-
"react-app",
72-
"prettier",
73-
"prettier/react"
74-
],
75-
"plugins": [
76-
"prettier"
77-
],
70+
"extends": ["react-app", "prettier", "prettier/react"],
71+
"plugins": ["prettier"],
7872
"rules": {
7973
"prettier/prettier": "error"
8074
}

0 commit comments

Comments
 (0)