Comments (3)
Hey @mklueh!
Usually, this can be achieved by creating package.json
in your application directory. For example:
{
"name": "my-app",
"version": "1.0.0"
"private" true
}
You will also need to set npm: true
in your semantic-release configuration. Because the private
is set to true
, it won't be published to NPM, but during release the version in package.json
will be bumped, and you will be able to access it in your app like this:
import { version } from './package.json';
console.log(version);
I hope that it helps!
from nx-semantic-release.
@TheUnderScorer thank you! I'll try that
from nx-semantic-release.
@TheUnderScorer I've finally managed to try it and failed to far. The only thing that is changed and pushed is the changelog, but not the versions.
My config is within the package.json and in all my package.jsons private is set to true and I've tried setting npm: true in the root package.json as well as the application one's with no effect. The version is set to 0.0.1 in the application only.
It seems the npm plugin is not running after the changelog plugin, despite having explicitly installed it
[8:09:59 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/changelog"
[8:09:59 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/changelog"
[8:09:59 AM] [semantic-release] › ℹ Start step "verifyConditions" of plugin "@semantic-release/git"
[8:09:59 AM] [semantic-release] › ✔ Completed step "verifyConditions" of plugin "@semantic-release/git"
Edit: my mistake
I've set the option in nxrelease config instead of the executor options
from nx-semantic-release.
Related Issues (20)
- outputPath not being used? HOT 1
- MaxBufferError when running semantic-release on 12 projects HOT 2
- Enhancing nx-semantic-release to Accurately Detect Changes in Merge Commits for Release Generation HOT 4
- NX v18 support HOT 2
- npmPublish always false HOT 1
- Error ERR_REQUIRE_ESM]: require() of ES Module ... HOT 3
- @semantic-release/gitlab support HOT 4
- Skip publishing as npmPublish is [secure] HOT 6
- internal dependencies bumps HOT 1
- Invalid host defined options HOT 2
- Add support for single version for all packages HOT 3
- analyzeCommits fails to Error: spawn EBADF HOT 1
- New projects analyze all previous commits HOT 2
- Tag format not being respected? HOT 2
- Unknown branch name appended to release tag and tilte HOT 2
- Unable to release hotfix versions for remote apps in Nx Monorepo HOT 3
- Conditionally load plugin per package ? HOT 2
- Honor "dependsOn" configuration for build target HOT 2
- Plugin name incorrectly logged HOT 7
- Please update @semantic-release/npm version HOT 3
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 nx-semantic-release.