New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLUID-5799, FLUID-5967: Reducing Fragility #5
Changes from 10 commits
c863229
d8bf7b2
a64ac5f
4a37de5
2edf5c8
bf764ca
140c2cd
0a69275
be30428
49e5978
36feebf
cd241fc
cb85d89
099f773
0e0d366
7a4f85a
74478a1
66d5a98
2775e6a
3ed2231
e663e25
35a2d3c
f7da24a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"jquery": true | ||
}, | ||
"globals": { | ||
"fluid_2_0_0": true | ||
}, | ||
"rules": { | ||
"block-scoped-var": "error", | ||
"comma-style": [ | ||
"error", | ||
"last" | ||
], | ||
"curly": [ | ||
"error", | ||
"all" | ||
], | ||
"dot-notation": [ | ||
"error", | ||
{ | ||
"allowKeywords": false | ||
} | ||
], | ||
"eol-last": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"allow-null" | ||
], | ||
"indent": ["error", 4], | ||
"keyword-spacing": "error", | ||
"new-cap": ["error", { "properties": false }], | ||
"no-caller": "error", | ||
"no-cond-assign": [ | ||
"error", | ||
"except-parens" | ||
], | ||
"no-debugger": "error", | ||
"no-empty": ["error", {"allowEmptyCatch": true}], | ||
"no-eval": "error", | ||
"no-extend-native": "error", | ||
"no-irregular-whitespace": "error", | ||
"no-iterator": "error", | ||
"no-loop-func": "error", | ||
"no-multi-str": "error", | ||
"no-new": "error", | ||
"no-proto": "error", | ||
"no-script-url": "error", | ||
"no-sequences": "error", | ||
"no-trailing-spaces": "error", | ||
"no-undef": "error", | ||
"no-unused-vars": "error", | ||
"no-with": "error", | ||
"quotes": [ | ||
"error", | ||
"double" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"space-before-blocks": ["error", "always"], | ||
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}], | ||
"space-infix-ops": "error", | ||
"space-unary-ops": [ | ||
"error", { | ||
"words": true, | ||
"nonwords": false, | ||
"overrides": { | ||
"typeof": false | ||
} | ||
}], | ||
"strict": ["error", "safe"], | ||
"valid-typeof": "error", | ||
"wrap-iife": [ | ||
"error", | ||
"inside" | ||
] | ||
} | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,20 @@ fluid-publish | |
./node_modules/.bin/fluid-publish | ||
``` | ||
|
||
#### --standard #### | ||
|
||
__value__: true (Boolean) | ||
|
||
Returns the current version of the Fluid-Publish module itself. No publishing | ||
steps will occur when this flag is enabled. | ||
|
||
```bash | ||
# returns the version of fluid-publish | ||
fluid-publish --version | ||
# fluid-publish 2.0.0 | ||
``` | ||
|
||
|
||
#### --standard #### | ||
|
||
__value__: true (Boolean) | ||
|
@@ -125,6 +139,17 @@ publish.standard(); | |
"git status -s -uno" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>checkRemoteCmd</code> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This material doesn't appear in this diff (yet) but this is the closest line: i) There's a typo where "--standard" appears twice, presumably the first instance should be "--version" fluid-publish remoteName="origin" --standard etc. |
||
</td> | ||
<td> | ||
The CLI to execute which determines if the remote repository exists. This prevents trying to push a version control tag to a repo that doesn't exist. | ||
</td> | ||
<td> | ||
"git ls-remote --exit-code ${remote}" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>rawTimestampCmd</code> | ||
|
@@ -298,6 +323,83 @@ publish.standard(); | |
"dev" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>remoteName</code> | ||
</td> | ||
<td> | ||
The remote repository to push version control tag to. | ||
</td> | ||
<td> | ||
"upstream" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>changesHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing uncommitted changes. | ||
</td> | ||
<td> | ||
"Address uncommitted changes: Commit \"git commit -a\", Stash \"git stash\" or Clean \"git reset --hard\"\n" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>checkRemoteHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing an issue where the remote repository cannot be found. | ||
</td> | ||
<td> | ||
"Run \"git remote -v\" for a list of available remote repositories.\n" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>publishHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing an issue where publishing to the registry fails. | ||
</td> | ||
<td> | ||
"Ensure that you have access to publish to the registry and that the current version does not already exist.\n" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>distTagHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing an issue where applying a distribution tag fails. | ||
</td> | ||
<td> | ||
"If the tag already exists use a new tag name or run \"npm dist-tag rm ${packageName} ${tag}\" to remove the existing one.\nAlso ensure that the tag name is valid (i.e. doesn't conform to a valid semver range like v1.4 or 1.4).\n" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>vcTagHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing an issue where applying a version control tag fails. | ||
</td> | ||
<td> | ||
"If the tag already exists, run \"git tag -d v${version}\" to remove the existing tag.\n" | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<code>pushVCTagHint</code> | ||
</td> | ||
<td> | ||
A hint for addressing an issue where pushing a version control tag to a remote repository fails. | ||
</td> | ||
<td> | ||
"If the tag already exists, run \"git push ${remote} :refs/tags/v${version} to remove the existing tag.\n" | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"name": "fluid-publish", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "A command line tool and node module that can be used to simplify the process of publishing a module to NPM. This is particularly useful for creating development releases, e.g. nightly or continuous integration releases.", | ||
"main": "publish.js", | ||
"engines": { | ||
"node": ">=0.12.0" | ||
"node": ">=4.0.0" | ||
}, | ||
"scripts": { | ||
"pub": "node publish.js", | ||
|
@@ -30,16 +30,17 @@ | |
"homepage": "http://fluidproject.org", | ||
"dependencies": { | ||
"es6-template-strings": "2.0.0", | ||
"extend": "^3.0.0" | ||
"extend": "3.0.0" | ||
}, | ||
"devDependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-jshint": "~0.9.0", | ||
"grunt": "1.0.1", | ||
"fluid-grunt-eslint": "18.1.2", | ||
"grunt-jsonlint": "1.0.4", | ||
"sinon": "^1.17.1" | ||
"sinon": "1.17.1" | ||
}, | ||
"defaultOptions": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note for the future - this strategy of packing configuration options into package.json is cute, but doesn't actually enable reuse of the functionality. In order to customise these strings, the user has to fork this module and change them! When we start work on the "mature multirepo fluid-publish" sketched out in #7, we should move this module over to being a standard Infusion component and have all these options as part of its defaults. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the default values aren't easily modifiable. In execution they are, but I agree that's not great for reuse and building upon. |
||
"changesCmd": "git status -s -uno", | ||
"checkRemoteCmd": "git ls-remote --exit-code ${remote}", | ||
"rawTimestampCmd": "git show -s --format=%ct HEAD", | ||
"revisionCmd": "git rev-parse --verify --short HEAD", | ||
"packCmd": "npm pack", | ||
|
@@ -48,9 +49,16 @@ | |
"distTagCmd": "npm dist-tag add ${packageName}@${version} ${tag}", | ||
"cleanCmd": "git checkout -- package.json", | ||
"vcTagCmd": "git tag -a v${version} -m 'Tagging the ${version} release'", | ||
"pushVCTagCmd": "git push upstream v${version}", | ||
"pushVCTagCmd": "git push ${remote} v${version}", | ||
"devVersion": "${version}-${preRelease}.${timestamp}.${revision}", | ||
"devTag": "dev", | ||
"moduleRoot": "" | ||
"remoteName": "upstream", | ||
"moduleRoot": "", | ||
"changesHint": "Address uncommitted changes: Commit \"git commit -a\", Stash \"git stash\" or Clean \"git reset --hard\"\n", | ||
"checkRemoteHint": "Run \"git remote -v\" for a list of available remote repositories.\n", | ||
"publishHint": "Ensure that you have access to publish to the registry and that the current version does not already exist.\n", | ||
"distTagHint": "If the tag already exists use a new tag name or run \"npm dist-tag rm ${packageName} ${tag}\" to remove the existing one.\nAlso ensure that the tag name is valid (i.e. doesn't conform to a valid semver range like v1.4 or 1.4).\n", | ||
"vcTagHint": "If the tag already exists, run \"git tag -d v${version}\" to remove the existing tag.\n", | ||
"pushVCTagHint": "If the tag already exists, run \"git push ${remote} :refs/tags/v${version} to remove the existing tag.\n" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you update this to our new shared eslint repo - thanks!