Comments (7)
Would be great to fix this. We often have PRs/commit messages like this:
BREAKING-RELEASE: update to @company/my-cool-library 2.0
Using the problematic /
in npm library names. And very often we forget that the slash in there breaks semantic-release.
from commit-analyzer.
What's the status here? I saw that the fix is not working and this bug currently prevents us from using semantic release properly.
from commit-analyzer.
The bug/consequence of this is from the underlying micromatch
library used. Either a different library should be used, /
removed from messages passed to micromatch
, or a huge warning be placed in this repository. I would much prefer either of the first 2 options.
To reproduce the behavior:
https://runkit.com/60587ebc6a51e10013d391c9/60587ebcc774380013410cab
var micromatch = require("micromatch")
var picomatch = require("picomatch")
console.log("1", micromatch(['abc BUMP_MAJOR def'], ['**BUMP_MAJOR**']));
console.log("2", micromatch(['abc /BUMP_MAJOR def'], ['**BUMP_MAJOR**']));
console.log("3", micromatch(['abc / BUMP_MAJOR def'], ['**BUMP_MAJOR**']));
console.log("4", micromatch(['/abc BUMP_MAJOR def'], ['**BUMP_MAJOR**']));
console.log("5", micromatch(['abc BUMP_MAJOR def/'], ['**BUMP_MAJOR**']));
console.log("6", micromatch(['abc BUMP_MAJOR/def'], ['**BUMP_MAJOR**']));
console.log("7", micromatch(['abc BUMP_MAJOR/ def'], ['**BUMP_MAJOR**']));
console.log("8", micromatch(['/foo/'], ['**f**']));
console.log("1", picomatch('**BUMP_MAJOR**')('abc BUMP_MAJOR def'));
console.log("2", picomatch('**BUMP_MAJOR**')('abc /BUMP_MAJOR def'));
console.log("3", picomatch('**BUMP_MAJOR**')('abc / BUMP_MAJOR def'));
console.log("4", picomatch('**BUMP_MAJOR**')('/abc BUMP_MAJOR def'));
console.log("5", picomatch('**BUMP_MAJOR**')('abc BUMP_MAJOR def/'));
console.log("6", picomatch('**BUMP_MAJOR**')('abc BUMP_MAJOR/def'));
console.log("7", picomatch('**BUMP_MAJOR**')('abc BUMP_MAJOR/ def'));
console.log("8", picomatch('**f**')('/foo/', ));
from commit-analyzer.
The bug/consequence of this is from the underlying
micromatch
library used
can you file an issue with micromatch
and reference it here?
from commit-analyzer.
@gr2m - I've been trying to figure out if micromatch
is performing as expected or if it is a bug on their end. From reading their documentation and examples, the library feels like purpose meant for path matching. If that's the case, then commit-analyzer
will need to switch to a different matching library.
from commit-analyzer.
[EDIT] Never mind, my commit failed because angular is the preset, and angular both does not recognize !
nor does it recognize BREAKING CHANGES
(with the S
). I was used to conventional commits spec and angular was unexpectedly-to-me tighter
I altered my release config to use conventional commits and all is well. Apologies for the noise
previous comment contents based on flawed assumptions
Wow, I think this is what just failed my run:
[2:05:07 PM] [semantic-release] › ℹ Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[2:05:07 PM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ Analyzing commit: feat(android, sdks)!: update to the latest v20 android admob sdk (#32)
* Add onAdClicked() and Event opened
* Add fullScreenContentCallback for rewarded ad
* Up compile sdk version for example
* Lint fixes
* Move setting test ids to ReactNativeGoogleAdsModule
* Remove smart banner
* Remove AdEvent left application
BREAKING CHANGES:
Please refer to upstream guides for suggestions on new usage. https://developers.google.com/admob/ios/migration and https://developers.google.com/admob/android/migration
- compileSdkVersion now 31, change your app android build.gradle to 31 if you have not already. Note that JDK11 is required for stable compilation on compileSdkVersion 31, JDK8 has internal compiler errors with SDK31
- onAdLeftApplication removed from the underlying SDK, use react-native built in AppState to determine app went to background
- Smart banner ads removed; use adaptive banner ads. Set height/width explicitly taking into account device size
The thing had a !
, it had BREAKING CHANGES:
, and still nothing launched. Quite a surprise. Does that mean URLs may not be in commit messages until this is fixed?
I can't tell if it is this one or #231 that just bit me.
from commit-analyzer.
Hi,
Just wanted to chime in to this one, that this problem bites me constantly. We use Bitbucket, and our pull requests follow this pattern Pull request #42: Feature/SMKY-1231 Working with responsiveness
That forward slash is 'poison' for picomatch (which micromatch uses under the covers). Both of those libraries seem to be designed for filesystem glob matching hence it makes sense that it would do some magic when forward slashes are included in strings.
Would be it be possible for commit-analyzer to drop this glob-approach and start to use regular expressions? That would be a big change, I know, but the result would be more predictable.
Or, can someone give a pointer what would be the least effort path to get semantic-release to trigger a patch-release for Bitbucket PRs (looking like the sample line above)?
from commit-analyzer.
Related Issues (20)
- Incorrect JSDoc Type HOT 1
- How do I add a releaseRule that also respects the `!` for a breaking change? (conventionalcommits preset) HOT 2
- Commit with `feat!: ` did not trigger release HOT 3
- chore(deps) does not trigger a patch release HOT 1
- Release type should not be case sensitive HOT 2
- The type field in the release rules doesn't seem to work if there is a space HOT 4
- "Fix: " prefix dominates over "feat: " one if latter used as a second line in commit message HOT 7
- How to pin the commit-analyzer version HOT 5
- Step analyzeCommits suddenly exits 0 without analyzing commits HOT 20
- This plugin just silently quits HOT 4
- promisify crashing node HOT 6
- Providing a PR description breaks custom releaseRules HOT 1
- deps changes do not trigger release HOT 7
- Use @commitlint/config-conventional with the new preset format HOT 3
- [Feature Request] Add feature to pass an already imported conventional_changelog_**** HOT 1
- Cannot find module 'conventional-changelog-*' HOT 8
- Use the standard `conventional-changelog-preset-loader` to load presets HOT 1
- Question: after merging from a prerelease branch into a release branch
- Feature request HOT 1
- Prevent semantic release from being triggered by certain default prefixes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commit-analyzer.