Remove versions from package.json (#11658)

Now the source of truth for the version is set during the build process.
We set it as an environment variable from the tags.
We could add it back to the package.json during the build process (from
the git tag), but there is not use for it at the moment since it's not
npm packages.
This commit is contained in:
Félix Malfait
2025-04-19 23:03:06 +02:00
committed by GitHub
parent 83434deb22
commit 24873d0c1d
9 changed files with 6 additions and 39 deletions

View File

@ -1,6 +1,5 @@
{
"name": "twenty-e2e-testing",
"version": "0.52.0-canary",
"description": "",
"author": "",
"private": true,

View File

@ -1,6 +1,5 @@
{
"name": "twenty-emails",
"version": "0.52.0-canary",
"description": "",
"author": "",
"private": true,

View File

@ -1,6 +1,5 @@
{
"name": "twenty-front",
"version": "0.52.0-canary",
"private": true,
"type": "module",
"scripts": {

View File

@ -34,11 +34,10 @@ import {
IconUserCircle,
IconUsers,
} from 'twenty-ui/display';
import { GithubVersionLink } from 'twenty-ui/navigation';
import { AdvancedSettingsToggle } from 'twenty-ui/navigation';
import { getOsControlSymbol } from 'twenty-ui/utilities';
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
import jsonPage from '../../../../../../../package.json';
import { NavigationDrawer } from '../NavigationDrawer';
import { NavigationDrawerItem } from '../NavigationDrawerItem';
import { NavigationDrawerItemGroup } from '../NavigationDrawerItemGroup';
@ -194,7 +193,11 @@ export const Settings: Story = {
</NavigationDrawerSection>
<NavigationDrawerFixedContent>
<GithubVersionLink version={jsonPage.version} />
<AdvancedSettingsToggle
isAdvancedModeEnabled={false}
setIsAdvancedModeEnabled={() => {}}
label="Advanced:"
/>
</NavigationDrawerFixedContent>
</>
),

View File

@ -1,6 +1,5 @@
{
"name": "twenty-server",
"version": "0.52.0-canary",
"description": "",
"author": "",
"private": true,

View File

@ -1,6 +1,5 @@
{
"name": "twenty-shared",
"version": "0.52.0-canary",
"main": "dist/twenty-shared.cjs.js",
"module": "dist/twenty-shared.esm.js",
"license": "AGPL-3.0",

View File

@ -1,6 +1,5 @@
{
"name": "twenty-ui",
"version": "0.52.0-canary",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"style": "./dist/style.css",

View File

@ -1,29 +0,0 @@
const fs = require('fs');
const semver = require('semver');
const path = require('path');
// Get the version argument from the command line
const [, , version] = process.argv;
if (!semver.valid(version)) {
console.error(
'Invalid version. The format should be X.X.X where X is a positive integer (or 0).',
);
process.exit(1);
}
const frontPackageJson = path.join(__dirname, '../twenty-front/package.json');
const serverPackageJson = path.join(__dirname, '../twenty-server/package.json');
const emailPackageJson = path.join(__dirname, '../twenty-emails/package.json');
// Update package.json
for (let file of [
frontPackageJson,
serverPackageJson,
docsPackageJson,
emailPackageJson,
]) {
let pkgdata = JSON.parse(fs.readFileSync(file));
pkgdata.version = version;
fs.writeFileSync(file, JSON.stringify(pkgdata, null, 2), 'utf8');
}

View File

@ -1,6 +1,5 @@
{
"name": "twenty-website",
"version": "0.52.0-canary",
"private": true,
"scripts": {
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",