Skip to content

Commit

Permalink
Merge main into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 7, 2023
2 parents d8ed6b2 + b22b49b commit 7c66679
Show file tree
Hide file tree
Showing 8 changed files with 332 additions and 200 deletions.
14 changes: 14 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change Log

## 9.4.0

### Minor Changes

- [#1491](https://github.com/equinor/fusion-framework/pull/1491) [`0f2b4e3a`](https://github.com/equinor/fusion-framework/commit/0f2b4e3a97aa08cac2644642b612cd3432d07be4) Thanks [@odinr](https://github.com/odinr)! - Allow setting archive name when packing bundle

### Patch Changes

- [#1487](https://github.com/equinor/fusion-framework/pull/1487) [`0dfe5a94`](https://github.com/equinor/fusion-framework/commit/0dfe5a94c89b05da3ea94d5ec0180448ba0df392) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps-dev): bump [rollup](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) from 3.29.2 to 4.3.0

- [#1478](https://github.com/equinor/fusion-framework/pull/1478) [`28bd0b8c`](https://github.com/equinor/fusion-framework/commit/28bd0b8c17fd6e7c5f5146ff490441d5b3caf602) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps-dev): bump [@equinor/fusion-react-side-sheet](https://github.com/equinor/fusion-react-components/releases/tag/%40equinor%2Ffusion-react-side-sheet%401.2.1) from 1.2.0 to 1.2.1

- [#1485](https://github.com/equinor/fusion-framework/pull/1485) [`24d02ddd`](https://github.com/equinor/fusion-framework/commit/24d02ddd532424462059a7465ac82df688e1bc6e) Thanks [@dependabot](https://github.com/apps/dependabot)! - [bump read-pkg-up from 10.1.0 to 11.0.0](https://github.com/sindresorhus/read-package-up/compare/v10.1.0...v11.0.0)

## 9.3.5

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@equinor/fusion-framework-cli",
"version": "9.3.5",
"version": "9.4.0",
"keywords": [
"Fusion",
"Fusion Framework",
Expand Down Expand Up @@ -55,7 +55,7 @@
"ora": "^7.0.1",
"portfinder": "^1.0.32",
"pretty-bytes": "^6.1.1",
"read-pkg-up": "^10.0.0",
"read-package-up": "^11.0.0",
"semver": "^7.5.4",
"vite": "^4.4.9",
"vite-plugin-environment": "^1.1.3",
Expand Down Expand Up @@ -85,7 +85,7 @@
"@equinor/fusion-react-menu": "^0.2.0",
"@equinor/fusion-react-person": "^0.6.0",
"@equinor/fusion-react-progress-indicator": "^0.2.0",
"@equinor/fusion-react-side-sheet": "1.2.0",
"@equinor/fusion-react-side-sheet": "1.2.1",
"@equinor/fusion-react-styles": "^0.6.0",
"@material-ui/styles": "^4.11.5",
"@types/express": "^4.17.17",
Expand All @@ -95,7 +95,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.15.0",
"rollup": "^3.28.1",
"rollup": "^4.3.0",
"rxjs": "^7.8.1",
"styled-components": "^6.0.7",
"types": "link:./types",
Expand Down
6 changes: 5 additions & 1 deletion packages/cli/src/bin/bundle-application.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import AdmZip from 'adm-zip';

import { resolve } from 'node:path';
import { dirname, resolve } from 'node:path';
import { mkdir } from 'node:fs/promises';

import { loadPackage } from './utils/load-package.js';
import { chalk, formatByteSize, formatPath } from './utils/format.js';
Expand Down Expand Up @@ -50,6 +51,9 @@ export const bundleApplication = async (options: { outDir: string; archive: stri
}

spinner.start('compressing content');
if (!fileExistsSync(dirname(archive))) {
await mkdir(dirname(archive), { recursive: true });
}
bundle.writeZip(archive);

spinner.info(formatPath(archive), formatByteSize(archive));
Expand Down
4 changes: 3 additions & 1 deletion packages/cli/src/bin/main.app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ export default (program: Command) => {

app.command('pack')
.option('-o, --outDir, <string>', 'output directory of package', 'dist')
.option('-a, --archive, <string>', 'output filename', 'app-bundle.zip')
.action(async (opt) => {
bundleApplication({ archive: 'app-bundle.zip', outDir: opt.outDir });
const { outDir, archive } = opt;
bundleApplication({ archive, outDir });
});
};
2 changes: 1 addition & 1 deletion packages/cli/src/bin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url';
import { dirname, resolve } from 'node:path';

/** find cli package.json */
import { readPackageUpSync } from 'read-pkg-up';
import { readPackageUpSync } from 'read-package-up';
const pkg = readPackageUpSync({ cwd: fileURLToPath(import.meta.url) });
if (!pkg) {
throw Error('failed to find program root');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/app-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
PackageJson,
readPackageUp,
type NormalizeOptions as ResolveAppPackageOptions,
} from 'read-pkg-up';
} from 'read-package-up';

import { AppManifest } from './app-manifest.js';
import { assert } from './utils/assert.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/utils/ts-transpile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tsc, { type CompilerOptions } from 'typescript';
import { dirname, join, resolve } from 'node:path';
import { readPackageUp } from 'read-pkg-up';
import { readPackageUp } from 'read-package-up';
import assert from 'node:assert';
import { existsSync } from 'node:fs';
import { mkdir, readFile, stat, writeFile } from 'node:fs/promises';
Expand Down
Loading

0 comments on commit 7c66679

Please sign in to comment.