Skip to content

Commit

Permalink
Merge pull request #477 from dhis2/alpha
Browse files Browse the repository at this point in the history
chore(release): upgrade react-scripts
  • Loading branch information
varl authored Oct 30, 2020
2 parents 3fe0885 + 4a70d77 commit dbf88af
Show file tree
Hide file tree
Showing 16 changed files with 8,405 additions and 4,394 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/cli/assets
**/locales/index.js
cli/config/init.entrypoint.js
cli/config/init.App.test.js

122 changes: 122 additions & 0 deletions .github/workflows/dhis2-verify-lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: 'dhis2: verify (lib)'

on:
push:
branches:

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: '[email protected]'
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}}
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
CI: true

jobs:
install:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

build:
runs-on: ubuntu-latest
needs: install
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Build
run: yarn build

- uses: actions/upload-artifact@v2
with:
name: lib-build
path: |
**/build
!**/node_modules
retention-days: 1

lint:
runs-on: ubuntu-latest
needs: [install]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Build
run: yarn build

- name: Lint
run: yarn lint

test:
runs-on: ubuntu-latest
needs: [install]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Test
run: yarn test

publish:
runs-on: ubuntu-latest
needs: [build, lint, test]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
with:
token: ${{env.GH_TOKEN}}
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/download-artifact@v2
with:
name: lib-build

- name: Publish to NPM
run: npx @dhis2/cli-utils release --publish npm
87 changes: 0 additions & 87 deletions .github/workflows/dhis2-verify.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/npm-publish.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [5.4.1-alpha.1](https://github.com/dhis2/app-platform/compare/v5.4.0...v5.4.1-alpha.1) (2020-10-30)


### Bug Fixes

* update react-scripts and cli-style at same time to use eslint 7 ([#475](https://github.com/dhis2/app-platform/issues/475)) ([8fd9225](https://github.com/dhis2/app-platform/commit/8fd9225624ab02565ea72a3f9a1170a1bb4655ba))

# [5.4.0](https://github.com/dhis2/app-platform/compare/v5.3.0...v5.4.0) (2020-10-19)


Expand Down
4 changes: 2 additions & 2 deletions adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/app-adapter",
"version": "5.4.0",
"version": "5.4.1-alpha.1",
"repository": {
"type": "git",
"url": "https://github.com/amcgee/dhis2-app-platform",
Expand All @@ -20,7 +20,7 @@
"moment": "^2.24.0"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "5.4.0",
"@dhis2/cli-app-scripts": "5.4.1-alpha.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5"
},
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/cli-app-scripts",
"version": "5.4.0",
"version": "5.4.1-alpha.1",
"engines": {
"node": ">=10"
},
Expand Down Expand Up @@ -32,7 +32,7 @@
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@dhis2/app-shell": "5.4.0",
"@dhis2/app-shell": "5.4.1-alpha.1",
"@dhis2/cli-helpers-engine": "^1.5.0",
"archiver": "^3.1.1",
"axios": "^0.20.0",
Expand Down
6 changes: 3 additions & 3 deletions cli/src/lib/bundleApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ module.exports = (inDir, outFile) => {
zlib: { level: 9 },
})

output.on('close', function() {
output.on('close', function () {
reporter.print(chalk.dim(`Total size: ${archive.pointer()} bytes`))
resolve()
})

archive.on('warning', function(err) {
archive.on('warning', function (err) {
if (err.code === 'ENOENT') {
reporter.warn('[bundler]', err)
} else {
reject(err)
}
})

archive.on('error', function(err) {
archive.on('error', function (err) {
reject(err)
})

Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib/compiler/compileLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const compileLibrary = async ({ config, paths, mode, watch }) => {
}
})

process.on('SIGINT', function() {
process.on('SIGINT', function () {
reporter.debug('Caught interrupt signal')
watcher.close()
})
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib/generateManifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = (paths, config, publicUrl) => {
},
},
icons: {
'48': 'dhis2-app-icon.png',
48: 'dhis2-app-icon.png',
},
developer: config.author,

Expand Down
16 changes: 6 additions & 10 deletions examples/simple-app/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{
"name": "simple-app",
"version": "1.0.0",
"version": "5.4.1-alpha.1",
"repository": "https://github.com/amcgee/dhis2-app-platform",
"author": "Austin McGee <[email protected]>",
"license": "BSD-3-Clause",
"private": true,
"devDependencies": {
"@dhis2/cli-app-scripts": "file:../../cli"
"@dhis2/cli-app-scripts": "5.4.1-alpha.1"
},
"scripts": {
"start": "../../cli/bin/d2-app-scripts start",
"build": "../../cli/bin/d2-app-scripts build",
"test": "../../cli/bin/d2-app-scripts test",
"deploy": "../../cli/bin/d2-app-scripts deploy"
},
"resolutions": {
"@dhis2/app-shell": "file:../../shell",
"@dhis2/app-adapter": "file:../../adapter"
"start": "d2-app-scripts start",
"build": "d2-app-scripts build",
"test": "d2-app-scripts test",
"deploy": "d2-app-scripts deploy"
},
"peerDependencies": {
"@dhis2/app-runtime": "*",
Expand Down
Loading

0 comments on commit dbf88af

Please sign in to comment.