Skip to content

Commit

Permalink
Merge pull request #3 from SFTtech/milo/version-bumps
Browse files Browse the repository at this point in the history
version bumps
  • Loading branch information
mikonse authored Dec 26, 2024
2 parents 2d66ae4 + 77612a9 commit 21ef8d0
Show file tree
Hide file tree
Showing 15 changed files with 5,722 additions and 2,827 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,6 @@ atlassian-ide-plugin.xml
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
fabric.properties
vite.config.*.timestamp*
vitest.config.*.timestamp*
8,333 changes: 5,607 additions & 2,726 deletions package-lock.json

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,65 @@
},
"private": true,
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/material": "^5.15.19",
"@mui/x-date-pickers": "^7.6.2",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/material": "^6.3.0",
"@mui/x-date-pickers": "^7.23.3",
"formik": "^2.4.6",
"luxon": "^3.4.4",
"luxon": "^3.5.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "^6.23.1",
"tslib": "^2.3.0",
"zod": "^3.23.8"
"react-router-dom": "^7.1.1",
"tslib": "^2.8.1",
"zod": "^3.24.1"
},
"devDependencies": {
"@ltd/j-toml": "^1.38.0",
"@nx/devkit": "19.2.2",
"@nx/eslint": "19.2.2",
"@nx/eslint-plugin": "19.2.2",
"@nx/jest": "19.2.2",
"@nx/js": "19.2.2",
"@nx/plugin": "^19.2.2",
"@nx/react": "19.2.2",
"@nx/vite": "19.2.2",
"@nx/web": "19.2.2",
"@nx/workspace": "19.2.2",
"@swc-node/register": "~1.9.1",
"@swc/cli": "~0.3.12",
"@swc/core": "~1.5.7",
"@swc/helpers": "~0.5.11",
"@swc/jest": "~0.2.36",
"@testing-library/react": "15.0.6",
"@types/jest": "^29.4.0",
"@nx/devkit": "20.3.0",
"@nx/eslint": "20.3.0",
"@nx/eslint-plugin": "20.3.0",
"@nx/jest": "20.3.0",
"@nx/js": "20.3.0",
"@nx/plugin": "20.3.0",
"@nx/react": "20.3.0",
"@nx/vite": "20.3.0",
"@nx/web": "20.3.0",
"@nx/workspace": "20.3.0",
"@swc-node/register": "~1.10.9",
"@swc/cli": "~0.5.2",
"@swc/core": "~1.10.1",
"@swc/helpers": "~0.5.15",
"@swc/jest": "~0.2.37",
"@testing-library/react": "16.1.0",
"@types/jest": "29.5.14",
"@types/luxon": "^3.4.2",
"@types/node": "18.16.9",
"@types/node": "22.10.2",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.3.0",
"@typescript-eslint/parser": "^7.3.0",
"@vitejs/plugin-react": "^4.2.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"@vitest/ui": "^1.3.1",
"babel-jest": "^29.4.1",
"@typescript-eslint/eslint-plugin": "8.18.2",
"@typescript-eslint/parser": "8.18.2",
"@vitejs/plugin-react": "^4.3.4",
"@vitejs/plugin-react-swc": "^3.7.2",
"@vitest/ui": "^2.1.8",
"babel-jest": "29.7.0",
"eslint": "~8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jsdom": "~22.1.0",
"nx": "19.2.2",
"prettier": "^2.6.2",
"semver": "^7.6.2",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"typescript": "~5.4.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react-hooks": "5.1.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jsdom": "~25.0.1",
"nx": "20.3.0",
"prettier": "^3.4.2",
"semver": "^7.6.3",
"ts-jest": "^29.2.5",
"ts-node": "10.9.2",
"typescript": "5.7.2",
"vite": "^5.0.0",
"vite-plugin-dts": "~3.8.1",
"vitest": "^1.3.1"
"vite-plugin-dts": "~4.4.0",
"vitest": "^2.1.8"
}
}
1 change: 1 addition & 0 deletions sftkit/sftkit/http/_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def __init__(self, title: str, config: HTTPServerConfig, version: str, license_n
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["Content-Range"],
)

forward_allowed_ips = None
Expand Down
4 changes: 2 additions & 2 deletions tools/nx-python/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "@sftkit/nx-python",
"version": "0.0.1",
"dependencies": {
"@nx/devkit": "^19.2.2",
"@nx/devkit": "^20.3.0",
"tslib": "^2.3.0",
"nx": "^19.2.2",
"nx": "^20.3.0",
"semver": "^7.6.2",
"@ltd/j-toml": "^1.38.0"
},
Expand Down
21 changes: 14 additions & 7 deletions tools/nx-python/src/executors/release-publish/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,40 @@ export default async function runExecutor(options: ReleaseExecutorSchema, contex
*/
const isDryRun = process.env.NX_DRY_RUN === "true" || options.dryRun || false;

const projectConfig = context.projectsConfigurations!.projects[context.projectName!]!;
if (!context.projectName) {
throw new Error("project name is empty");
}

const projectConfig = context.projectsConfigurations?.projects[context.projectName];

if (!projectConfig) {
throw new Error("could not find a project config");
}

const packageRoot = joinPathFragments(context.root, options.packageRoot ?? projectConfig.root);

const pdmPublishCommandSegments = [`pdm publish`];
const command = "pdm publish";

try {
const command = pdmPublishCommandSegments.join(" ");
output.logSingleLine(`Running "${command}"...`);

if (isDryRun) {
console.log(`Would publish to https://pypi.org, but '[dry-run]' was set`);
output.logSingleLine("Would publish to https://pypi.org, but '[dry-run]' was set");
} else {
execSync(command, {
maxBuffer: LARGE_BUFFER,
cwd: packageRoot,
stdio: "inherit",
});

console.log("");
console.log(`Published to https://pypi.org`);
output.logSingleLine("Published to https://pypi.org");
}

return {
success: true,
};
} catch (err: any) {
} catch (err) {
output.logSingleLine(`Error running pdm publish: ${err}`);
return {
success: false,
};
Expand Down
10 changes: 6 additions & 4 deletions tools/nx-python/src/generators/release-version/generator.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import {
formatFiles,
joinPathFragments,
Expand Down Expand Up @@ -203,8 +205,8 @@ To fix this you will either need to add a pyproject.toml file at that location,
const previousVersionRef = latestMatchingGitTag
? latestMatchingGitTag.tag
: options.fallbackCurrentVersionResolver === "disk"
? await getFirstGitCommit()
: undefined;
? await getFirstGitCommit()
: undefined;

if (!previousVersionRef) {
// This should never happen since the checks above should catch if the current version couldn't be resolved
Expand Down Expand Up @@ -481,8 +483,8 @@ function resolveLocalPackageDependencies(
const dependencyCollection: "dependencies" | "dev-dependencies" | null = dependencies[depProject.name]
? "dependencies"
: devDependencies[depProject.name]
? "dev-dependencies"
: null;
? "dev-dependencies"
: null;
if (!dependencyCollection) {
throw new Error(
`The project "${projectNode.name}" does not have a local dependency on "${depProject.name}" in its Cargo.toml`
Expand Down
6 changes: 5 additions & 1 deletion tools/nx-python/src/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ export const createNodes: CreateNodesV2 = [
const root = dirname(projectFile);
const pyproject = loadPyprojectToml(projectFile);

if (!pyproject.project?.name) {
throw new Error("No name configured in pyproject.toml");
}

const pythonPackage = {
name: pyproject.project!.name!,
name: pyproject.project.name,
pyprojectToml: pyproject,
projectRoot: dirname(projectFile),
};
Expand Down
30 changes: 13 additions & 17 deletions tools/nx-python/src/utils/pyproject-toml.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { logger, Tree } from "@nx/devkit";
import TOML from '@ltd/j-toml';
import TOML from "@ltd/j-toml";
import * as fs from "fs";

export interface BuildSystem {
Expand Down Expand Up @@ -36,12 +37,12 @@ export interface Project {
classifiers?: string[];
urls?: Record<string, string>;
requires_python?: string;
dependencies?: string[],
optional_dependencies?: string[],
dependencies?: string[];
optional_dependencies?: string[];
scripts?: Record<string, string>;
gui_scripts?: Record<string, string>;
entry_points?: Record<string, Record<string, string>>;
dynamic?: string[]
dynamic?: string[];
}

export interface PyprojectToml {
Expand All @@ -67,20 +68,20 @@ export function loadPyprojectToml(pyprojectTomlPath: string): PyprojectToml {
}

export function parsePyprojectToml(pyprojectString: string) {
return TOML.parse(pyprojectString, {
return TOML.parse(pyprojectString, {
x: { comment: true },
}) as unknown as PyprojectToml;
}

export function stringifyPyprojectToml(pyprojectToml: PyprojectToml) {
const tomlString = TOML.stringify(pyprojectToml, {
newlineAround: 'section',
newlineAround: "section",
indent: 4,
});
// the following is a very, very dirty hack for dealing with j-toml not being able to configure the type of quotation

if (Array.isArray(tomlString)) {
return tomlString.join('\n').replace(/'/g, '"');
return tomlString.join("\n").replace(/'/g, '"');
}

return tomlString.toString().replace(/'/g, '"');
Expand All @@ -94,19 +95,14 @@ export function modifyPyprojectToml(
) {
toml[section] ??= TOML.Section({});
toml[section][key] =
typeof value === 'object' && !Array.isArray(value)
typeof value === "object" && !Array.isArray(value)
? TOML.inline(value as any)
: typeof value === 'function'
? value()
: value;
: typeof value === "function"
? value()
: value;
}

export function modifyCargoNestedTable(
toml: PyprojectToml,
section: string,
key: string,
value: object
) {
export function modifyCargoNestedTable(toml: PyprojectToml, section: string, key: string, value: object) {
toml[section] ??= {};
toml[section][key] = TOML.Section(value as any);
}
4 changes: 4 additions & 0 deletions web/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"require": "./index.js"
}
},
"peerDependencies": {
"react": "^18.3.1",
"@mui/material": "^5.15.21"
},
"repository": {
"type": "git",
"url": "https://github.com/SFTtech/sftkit",
Expand Down
1 change: 0 additions & 1 deletion web/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export * from "./lib/DataGridTitle";
export * from "./lib/Loading";
export * from "./lib/NumericInput";
export * from "./lib/Select";
export * from "./lib/TestModeDisclaimer";
20 changes: 0 additions & 20 deletions web/components/src/lib/TestModeDisclaimer.tsx

This file was deleted.

9 changes: 9 additions & 0 deletions web/form-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"require": "./index.js"
}
},
"peerDependencies": {
"react": "^18.3.1",
"@mui/material": "^5.15.21",
"@mui/x-date-pickers": "^7.8.0",
"luxon": "^3.4.4",
"formik": "^2.4.6",
"@sftkit/utils": "^0.2.0",
"@sftkit/components": "^0.2.0"
},
"repository": {
"type": "git",
"url": "https://github.com/SFTtech/sftkit",
Expand Down
5 changes: 5 additions & 0 deletions web/modal-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"require": "./index.js"
}
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"@mui/material": "^5.15.21"
},
"repository": {
"type": "git",
"url": "https://github.com/SFTtech/sftkit",
Expand Down
5 changes: 5 additions & 0 deletions web/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
"require": "./index.js"
}
},
"peerDependencies": {
"react": "^18.3.1",
"react-router-dom": "^6.24.0",
"zod": "^3.23.8"
},
"repository": {
"type": "git",
"url": "https://github.com/SFTtech/sftkit",
Expand Down

0 comments on commit 21ef8d0

Please sign in to comment.