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:
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-e2e-testing",
|
"name": "twenty-e2e-testing",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-emails",
|
"name": "twenty-emails",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-front",
|
"name": "twenty-front",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -34,11 +34,10 @@ import {
|
|||||||
IconUserCircle,
|
IconUserCircle,
|
||||||
IconUsers,
|
IconUsers,
|
||||||
} from 'twenty-ui/display';
|
} from 'twenty-ui/display';
|
||||||
import { GithubVersionLink } from 'twenty-ui/navigation';
|
import { AdvancedSettingsToggle } from 'twenty-ui/navigation';
|
||||||
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
import { getOsControlSymbol } from 'twenty-ui/utilities';
|
||||||
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
import { I18nFrontDecorator } from '~/testing/decorators/I18nFrontDecorator';
|
||||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||||
import jsonPage from '../../../../../../../package.json';
|
|
||||||
import { NavigationDrawer } from '../NavigationDrawer';
|
import { NavigationDrawer } from '../NavigationDrawer';
|
||||||
import { NavigationDrawerItem } from '../NavigationDrawerItem';
|
import { NavigationDrawerItem } from '../NavigationDrawerItem';
|
||||||
import { NavigationDrawerItemGroup } from '../NavigationDrawerItemGroup';
|
import { NavigationDrawerItemGroup } from '../NavigationDrawerItemGroup';
|
||||||
@ -194,7 +193,11 @@ export const Settings: Story = {
|
|||||||
</NavigationDrawerSection>
|
</NavigationDrawerSection>
|
||||||
|
|
||||||
<NavigationDrawerFixedContent>
|
<NavigationDrawerFixedContent>
|
||||||
<GithubVersionLink version={jsonPage.version} />
|
<AdvancedSettingsToggle
|
||||||
|
isAdvancedModeEnabled={false}
|
||||||
|
setIsAdvancedModeEnabled={() => {}}
|
||||||
|
label="Advanced:"
|
||||||
|
/>
|
||||||
</NavigationDrawerFixedContent>
|
</NavigationDrawerFixedContent>
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-server",
|
"name": "twenty-server",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-shared",
|
"name": "twenty-shared",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"main": "dist/twenty-shared.cjs.js",
|
"main": "dist/twenty-shared.cjs.js",
|
||||||
"module": "dist/twenty-shared.esm.js",
|
"module": "dist/twenty-shared.esm.js",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-ui",
|
"name": "twenty-ui",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"main": "dist/index.cjs",
|
"main": "dist/index.cjs",
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
"style": "./dist/style.css",
|
"style": "./dist/style.css",
|
||||||
|
|||||||
@ -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');
|
|
||||||
}
|
|
||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "twenty-website",
|
"name": "twenty-website",
|
||||||
"version": "0.52.0-canary",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",
|
"nx": "NX_DEFAULT_PROJECT=twenty-website node ../../node_modules/nx/bin/nx.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user