Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

semantic-release-expo

bycedric3.6kMIT2.2.3TypeScript support: included

An Expo implementation for semantic release, so you don't have to bother

expo, react, native, semantic, release, bycedric

readme

Expo - Semantic Release

Latest Release Build Status Codecov coverage Code Climate grade

An Expo implementation for semantic release, so you don't have to bother.

Example

How it works

Semantic release will first determine a new version based on your likings. This plugin will then search for your Expo manifest(s) and update it accordingly. Not only will this update the version property within the manifest. It will also update the Android versionCode and iOS buildNumber platform too, based on the configuration.

Verify Conditions

Before such a smooth, carefree release can take place, the plugin must validate the existence of a manifest. This check takes place in the verify condition step of semantic release. The name of the Expo app, defined in the name property, is dumped to console to provide some feedback for successful validation.

Prepare

This plugin writes the actual changes to the manifest during preparation. After this step, you can publish to Expo, create a new build or add the changes in a release commit. The version property within the manifest is always updated. All of the platform specific changes are only applied when the platform is enabled.

It is highly recommended to add the Expo manifest (app.json) to the list of assets to include in the release commit.

Usage

Here is an example configuration with automated changelogs, package.json versions, Expo and git release commits.

{
    "verifyConditions": [
        "semantic-release-expo",
        "@semantic-release/changelog",
        "@semantic-release/git",
        "@semantic-release/npm"
    ],
    "prepare": [
        "semantic-release-expo",
        "@semantic-release/changelog",
        "@semantic-release/npm",
        {
            "path": "@semantic-release/git",
            "assets": [
                "CHANGELOG.md",
                "package.json",
                "package-lock.json",
                "app.json"
            ]
        }
    ],
    "publish": false,
    "success": false,
    "fail": false
}

Configuration

By default this plugin uses configuration that should work straight out of the box. Unfortunately, all apps are different and sometimes requires a specific release flow. To satisfy these needs, you can customize some of these settings below.

Multiple manifests

Normally, an Expo app should have a single manifest located at /app.json. But you might have good reasons to use non-standard or multiple manifests. For example, if you need to create multiple versions/flavours and allow then to work side-by-side, you need multiple manifests. To configure this plugin, you can provide a list of manifests to update.

{
    "prepare": [
        {
            "path": "semantic-release-expo",
            "manifests": [
                "app.test.json",
                "app.staging.json",
                "app.production.json",
            ]
        }
    ]
}

manifests accepts either a single string, or a list of strings.

Version templates

Unfortunately, right now there is no "universal" versioning which can be used across all platforms. For exmaple, iOS can simply use the exact semantic version (e.g. 2.5.1) but Android can't. To allow multiple "tactics" or personal favorites, you can change the so called "versioning templates". These templates uses lodash template to build new versions. Every version string, version, Android versionCode and iOS buildNumber can be modified independently.

{
    "prepare": [
        {
            "path": "semantic-release-expo",
            "versions": {
                "version": "${next.raw}",
                "android": "${code}",
                "ios": "${next.raw}"
            }
        }
    ]
}

versions accepts either a single string for all versions, or a (partial) object with templates. By default the ${recommended} template is used.

Version templates variables

Currently the following variables are available within the templates.

name type description
expo SemVer The semver-coerced Expo SDK version
last SemVer The semver-coerced last release version
next SemVer The semver coerced next release version
code Number The (Android) version code, using the versioning approach by Maxi Rosson
increment Number An incremented number of the previous version, discouraged because of non-deterministic behaviour.
recommended String or Number differs per versioning/platform, listed below
version example description
version 1.2.3 The "raw" next release version (also available in ${next.raw})
Android versionCode 290010203 The versioning approach by Maxi Rosson (same as ${code})
iOS buildNumber 1.2.3 The "raw" next release version (also available in ${next.raw})

In these examples Expo SDK 29.x.x and SemVer 1.2.3 is used.

License

The MIT License (MIT). Please see License File for more information.


with :heart: byCedric & Contributors

changelog

2.2.3 (2019-10-18)

Other chores

Pipeline changes

  • only audit production dependencies (4f8ee8a)

2.2.2 (2019-07-27)

Code refactors

  • update dependencies and node lts for releases (#140) (ba6a878)

2.2.1 (2019-07-13)

Bug fixes

  • only add built source files to packed tarball (#139) (5a71fe2)

2.2.0 (2019-07-13)

Code refactors

  • lower the dependabot pr intensity (#122) (e157739)
  • move types dependencies to dev dependencies (#134) (9dae0e7)
  • update dependencies and fix all audit issues (#133) (64ca7fd)

New features

  • replace tslint with eslint for improved linting (#138) (fafa74a)

Other chores

Pipeline changes

  • remove audit step to ease up on travis (#132) (4c1e74f)

2.1.6 (2019-05-26)

Code refactors

  • upgrade detect-indent to version 6.0.0 (#92) (0a3f8a0)
  • upgrade fs-extra to version 8.0.0 (#94) (0d4460e)
  • use dependabot instead of greenkeeper (#102) (c03251a)

Other chores

2.1.5 (2019-04-25)

Code refactors

  • upgrade all dependencies to the latest versions (#91) (72a17ae)
  • upgrade detect-newline to version 3.0.0 (#83) (0eee460)

Other chores

  • configure pull request titles for greenkeeper (#90) (7682b5b)

Pipeline changes

  • add node 12 to testing languages (#87) (4fd6f3c)
  • remove soon-to-be outdated node 11 in favor of 12 (#89) (97e86cb)
  • temporary disable audit-block awaiting tar/node-gyp fix (#86) (9114a27)

2.1.4 (2019-04-09)

Bug fixes

  • security vulnerability in js-yaml (799f154)

Code refactors

Pipeline changes

  • allow greenkeeper package lock commits (f92edcb)

2.1.3 (2019-02-24)

Code refactors

Documentation changes

Other chores

  • update all dependencies and manually fix audit warning (#63) (408f539)

Pipeline changes

  • add dry run of new release on develop (#55) (220cd31)
  • audit before downloading dependencies with npm ci (#54) (f33f7d4)

2.1.2 (2019-01-30)

Bug fixes

  • manually override allowed semantic release branch (f94b4a1)
  • missing commitlint configuration (bb72167)

Code refactors

  • allow tests to run in watch mode (d894470)
  • replace custom semantic release with convention package (a4a1d47)
  • update pipeline with audit for security notifications (54ef137)
  • upgrade typescript to 3.2.4 (33ec439)
  • use full lodash with tree-shaked import (65e3114)

Other chores

  • upgrade peakfijn conventions packages (86e2fd9)

Pipeline changes

  • audit dependencies before using them (982699f)

2.1.1 (2018-09-17)

Bug fixes

  • force android version code to numeric value (#43) (0f7389d)

Code refactors

  • upgrade to latest peakfijn conventions (4b0fee3)

Documentation changes

  • add discussion and simple change templates (8831ae6)

Other chores

  • integrate tslint and fix all found issues (#38) (edb9129)
  • simplify the issue and pull request templates (#37) (0f460df)

Pipeline changes

  • add missing changelog package for releases (#44) (c169a87)

2.1.0 (2018-09-08)

Bug fixes

  • exclude semantic release configuration from npm (c7c212e)

New features

  • add configurable version templates (#36) (5745c9d)

2.0.0 (2018-08-31)

Bug fixes

  • breaking changes behaviour with semantic release (3844459)
  • disable spammy codecov messages in pull requests (29225be)

Code refactors

  • upgrade commit-types-peakfijn to version 0.6.0 (#32) (5065b48)
  • upgrade conventional-changelog-peakfijn to version 0.6.0 (#33) (adcbc8c)
  • upgrade cz-changelog-peakfijn to version 0.6.0 (#34) (fe462c6)

New features

  • make android version deterministic (#35) (1428f1a)

BREAKING CHANGE

  • android incremental build number is replaced. This now uses an integer value calculated by multiple variables.

https://medium.com/@maxirosson/versioning-android-apps-d6ec171cfd82

1.2.1 (2018-08-04)

Bug fixes

  • set jsdom test url for local storage support (#29) (1d2e9b6)

Code refactors

  • upgrade @semantic-release/changelog to version 3.0.0 (#23) (fa3396a)
  • upgrade commit-types-peakfijn to version 0.5.0 (#24) (4f63ab5)
  • upgrade conventional-changelog-peakfijn to version 0.5.0 (#25) (be7929d)
  • upgrade cz-changelog-peakfijn to version 0.5.0 (#26) (a9bd560)
  • upgrade fs-extra to version 7.0.0 (#22) (f5198d1)
  • upgrade ts-jest to version 23.1.2 (#31) (fb14ece)
  • use release commit type for automated releases (af87788)

1.2.0 (2018-07-11)

Code refactors

  • increase usability and other minor changes (#21) (49e29b1), closes #7 #7

Code style changes

  • remove extraneous space in log statement (cdaa1b9)

New features

  • inherit configuration from prepare when verifying (#20) (729baeb)

1.1.1 (2018-07-10)

Bug fixes

  • add missing reason of failure in exception (3f198ed)
  • log the manifest file throwing the exception (05183f4)

Code refactors

  • upgrade @types/fs-extra to version 5.0.4 (154afed)
  • upgrade ts-jest to version 23.0.0 (d2e8d94)
  • use chore as commit type for new releases (3cb214f)

Documentation changes

  • remove excessive prepare step from example (958b01c)

Other chores

  • add commitizen with peakfijn conventions (28e5552)
  • configure greenkeeper to use proper commit messages (9986e1c)
  • rebuild changelog using peakfijn conventions (3133aa5)
  • update semantic release config with the peakfijn conventions (e7f80b9)

Pipeline changes

  • add commitlint with peakfijn conventions (2e94a50)
  • use new single analyser format for releases (7e46655)

1.1.0 (2018-06-18)

New features

  • add support for multiple manifests (b8103d4), closes #12
  • use git flow approach to releases (4546556)

Other chores

  • upgrade jest dependency to jest@^23.1.0 (08268ea)

1.0.4 (2018-06-17)

Bug fixes

Code refactors

  • remove unused Config type (63fbb2c)

Code style changes

  • reindent package file with tabs (f1e4333)

Other chores

1.0.3 (2018-05-20)

Bug fixes

  • detect indentation and new lines to keep style intact (94379c9)

Testing updates

  • add extra validation for new line detection (60b4a67)

1.0.2 (2018-05-20)

Bug fixes

  • add changelog plugin for semantic releases (586047e)

1.0.1 (2018-05-20)

Bug fixes

  • remove chore from triggering new version (06b8a5e)

1.0.0 (2018-05-20)

Bug fixes

  • add semantic release and proper branch name (eb3aa6c)
  • use proper casing in badges in readme (1adea31)

New features

  • add first draft of expo releases (67c0f6f)
  • integrate semantic release in travis (cbe0582)

Other chores

  • initial project structure setup (63891a6)