Skip to content

Commit

Permalink
Update dependencies (#95)
Browse files Browse the repository at this point in the history
* Update lerna, remove rollup-plugin-babel from devdeps

* Update dependencies, update lerna usage

* Updated husky config

* Switch to local link dependencies

* chore: Adding github actions flow

* chore: fixes versions in package json

* chore: fixes eslint

* Enable compatibility with more recent versions of babel-generator

* Remove circleci and travis
  • Loading branch information
pago authored Apr 25, 2019
1 parent c7b37ab commit 617386e
Show file tree
Hide file tree
Showing 52 changed files with 5,945 additions and 1,181 deletions.
36 changes: 0 additions & 36 deletions .circleci/config.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_size = 4
indent_style = space
insert_final_newline = true
tab_width = 4
Expand Down
11 changes: 7 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
module.exports = {
parser: 'babel-eslint',
extends: ['eslint:recommended', 'prettier'],
globals: {
__REACT_DEVTOOLS_GLOBAL_HOOK__: false,
},
env: {
browser: true,
node: true,
commonjs: true,
'shared-node-browser': true,
es6: true,
jest: true
jest: true,
},
rules: {
// variable handling
'no-unused-vars': ['error', { args: 'none' }],
"prefer-const": [1],
'prefer-const': [1],
// 'one-var': 'off',
// 'vars-on-top': 'off',
'one-var-declaration-per-line': [1],
// 'no-inline-comments': 'off',

'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-param-reassign': 'error'
}
'no-param-reassign': 'error',
},
};
260 changes: 260 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,260 @@
workflow "pull request" {
resolves = [
"lint",
"bundlesize",
"canary release",
]
on = "pull_request"
}

action "filter PRs" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize|reopened'"
}

action "build" {
uses = "docker://node:8"
args = "yarn install --frozen-lockfile --non-interactive"
needs = ["filter PRs"]
}

action "test" {
uses = "docker://node:8"
needs = ["build"]
args = "yarn run test"
}

action "lint" {
uses = "docker://node:8"
needs = ["build"]
args = "yarn run lint"
}

action "bundlesize" {
uses = "docker://node:8"
needs = ["test"]
args = "yarn run bundlesize"
}

action "verdaccio" {
uses = "./actions/verdaccio"
needs = ["test"]
args = "-ddd"
}

action "canary release" {
uses = "./actions/cli"
env = {
REGISTRY_URL = "registry.npmjs.org"
}
args = "n 8 && yarn lerna publish --no-git-tag-version --no-push --no-git-reset --exact --force-publish=* --canary --yes --dist-tag $(git rev-parse --abbrev-ref HEAD) --preid $(git rev-parse --short HEAD) --registry https://$REGISTRY_URL"
needs = ["verdaccio"]
secrets = ["NPM_AUTH_TOKEN"]
}

workflow "node 6" {
resolves = [
"node6:test",
]
on = "pull_request"
}

action "node6:build" {
uses = "docker://node:6"
args = "yarn install --frozen-lockfile --non-interactive"
}

action "node6:test" {
uses = "docker://node:6"
needs = ["node6:build"]
args = "yarn test"
}

workflow "node 10" {
resolves = [
"node10:test",
]
on = "pull_request"
}

action "node10:build" {
uses = "docker://node:10"
args = "yarn install --frozen-lockfile --non-interactive"
}

action "node10:test" {
uses = "docker://node:10"
needs = ["node10:build"]
args = "yarn test"
}

workflow "node 11" {
resolves = [
"node11:test",
]
on = "pull_request"
}

action "node11:build" {
uses = "docker://node:11"
args = "yarn install --frozen-lockfile --non-interactive"
}

action "node11:test" {
uses = "docker://node:11"
needs = ["node11:build"]
args = "yarn test"
}

workflow "release" {
on = "push"
resolves = ["release:push tag"]
}

action "release:filter branch" {
uses = "actions/bin/filter@master"
args = "branch master"
}

action "release:check commit message" {
needs = ["release:filter branch"]
uses = "./actions/cli"
args = "node bin/check-commit.js"
}

action "release:authorized users only" {
needs = ["release:check commit message"]
uses = "actions/bin/filter@master"
args = ["actor", "ayusharma", "pago"]
}

action "release:build" {
needs = ["release:authorized users only"]
uses = "docker://node:8"
args = "yarn install --frozen-lockfile --non-interactive"
}

action "release:test" {
uses = "docker://node:8"
needs = ["release:build"]
args = "yarn test"
}

action "release:version" {
uses = "./actions/cli"
needs = ["release:test"]
args = "yarn lerna version $CURRENT_COMMIT_TEXT --no-push --yes --force-publish=*"
}

action "release:publish" {
uses = "./actions/cli"
needs = ["release:version"]
args = "yarn lerna publish from-git --force-publish=* --yes --registry https://$REGISTRY_URL"
env = {
REGISTRY_URL = "registry.npmjs.org"
}
secrets = ["NPM_AUTH_TOKEN"]
}

action "release:push tag" {
needs = ["release:publish"]
uses = "trivago/melody/actions/cli@github-actions"
args = "git push https://$GITHUB_TOKEN@github.com/trivago/melody.git github-actions --follow-tags"
secrets = ["GITHUB_TOKEN"]
}

workflow "master branch only" {
on = "push"
resolves = ["master:lint", "master:bundlesize", "master:release alpha"]
}

action "filter master branch" {
uses = "actions/bin/filter@master"
args = "branch master"
}

action "master:build" {
uses = "docker://node:8"
args = "yarn install --frozen-lockfile --non-interactive"
needs = ["filter master branch"]
}

action "master:lint" {
uses = "docker://node:8"
needs = ["master:build"]
args = "yarn lint"
}

action "master:test" {
uses = "docker://node:8"
needs = ["master:build"]
args = "yarn test"
}

action "master:bundlesize" {
uses = "docker://node:8"
needs = ["master:test"]
args = "yarn bundlesize"
}

action "master:verdaccio" {
uses = "./actions/verdaccio"
needs = ["master:test"]
args = "-ddd"
}

action "master:release alpha" {
uses = "./actions/cli"
needs = ["master:verdaccio"]
args = "n 8 && yarn lerna publish --no-git-tag-version --no-push --no-git-reset --exact --force-publish=* --canary --yes --dist-tag prerelease --registry https://$REGISTRY_URL"
env = {
REGISTRY_URL = "registry.npmjs.org"
}
secrets = ["NPM_AUTH_TOKEN"]
}

workflow "non-master branch" {
on = "push"
resolves = [
"non-master:test",
]
}

action "filter non-master branch" {
uses = "actions/bin/filter@master"
args = "not branch master"
}

action "non-master:build" {
uses = "docker://node:8"
args = "yarn install --frozen-lockfile --non-interactive"
needs = ["filter non-master branch"]
}

action "non-master:test" {
uses = "docker://node:8"
args = "yarn test"
needs = ["non-master:build"]
}

workflow "pull request closed" {
on = "pull_request"
resolves = [
"remove dist-tag",
]
}

action "filter PR closed" {
uses = "actions/bin/filter@master"
args = "action 'closed'"
}

action "remove dist-tag" {
uses = "./actions/cli"
needs = ["filter PR closed"]
args = "node bin/dist-tag-rm.js packages $(git rev-parse --abbrev-ref HEAD) https://$REGISTRY_URL"
env = {
REGISTRY_URL = "registry.npmjs.org"
}
secrets = ["NPM_AUTH_TOKEN"]
}
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Removes `Chai` and `Sinon` support, Migrates tests to use `Jest`'s matchers. [#103](https://github.com/trivago/melody/pull/103)
- Drop `bundledDependencies` option in package.json's to avoid issues with yarn [#113](https://github.com/trivago/melody/pull/113)
- Add Github Actions for automation [#109](https://github.com/trivago/melody/pull/109)
- Update various dependencies (lerna, babel-generate, etc.) [#95](https://github.com/trivago/melody/pull/95)

## 1.2.0-21.2 (beta)

Expand Down
Loading

0 comments on commit 617386e

Please sign in to comment.