Skip to content

Commit

Permalink
Merge pull request #683 from jetstreamapp/nx/17.2.7
Browse files Browse the repository at this point in the history
Upgrade NX(17.2), Node(20), Docs(3)
  • Loading branch information
paustint authored Dec 25, 2023
2 parents 34e22d0 + c63bd9a commit b8a41ee
Show file tree
Hide file tree
Showing 74 changed files with 4,449 additions and 2,841 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: install dependencies
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'yarn'

- name: install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Init npm cache
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'
cache: 'yarn'
- name: install dependencies
run: yarn install --frozen-lockfile
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
},
"files.exclude": {
"**/.git": true,
Expand Down
5 changes: 1 addition & 4 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@
}
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": ["apps/api/**/*.ts", "apps/api/**/*.spec.ts", "apps/api/**/*.d.ts"]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export async function deployMetadata(req: Request, res: Response, next: NextFunc
const zip = new JSZip();
files.forEach((file) => zip.file(file.fullFilename, file.content));

const results = await conn.metadata.deploy(zip.generateNodeStream(), req.body.options);
const results = await conn.metadata.deploy(zip.generateNodeStream() as any, req.body.options);

sendJson(res, results);
} catch (ex) {
Expand Down Expand Up @@ -296,7 +296,7 @@ export async function checkRetrieveStatusAndRedeploy(req: Request, res: Response
sendJson(res, { type: 'deploy', results: correctInvalidXmlResponseTypes(deployResults), zipFile: results.zipFile });
} else {
// Deploy package as-is
const deployResults = await targetConn.metadata.deploy(oldPackage.generateNodeStream(), deployOptions);
const deployResults = await targetConn.metadata.deploy(oldPackage.generateNodeStream() as any, deployOptions);
sendJson(res, { type: 'deploy', results: correctInvalidXmlResponseTypes(deployResults), zipFile: results.zipFile });
}
} else {
Expand Down
8 changes: 3 additions & 5 deletions apps/cron-tasks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"tsConfig": "apps/cron-tasks/tsconfig.app.json",
"assets": [],
"target": "node",
"compiler": "tsc"
"compiler": "tsc",
"webpackConfig": "apps/cron-tasks/webpack.config.js"
},
"configurations": {
"production": {
Expand All @@ -52,10 +53,7 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/cron-tasks/**/*.ts"]
}
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
Expand Down
8 changes: 8 additions & 0 deletions apps/cron-tasks/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { composePlugins, withNx } = require('@nx/webpack');

// Nx plugins for webpack.
module.exports = composePlugins(withNx(), (config) => {
// Note: This was added by an Nx migration. Webpack builds are required to have a corresponding Webpack config file.
// See: https://nx.dev/recipes/webpack/webpack-config-setup
return config;
});
22 changes: 22 additions & 0 deletions apps/docs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": "../../.eslintrc.json",
"rules": {},
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"parserOptions": {
"project": ["apps/docs/tsconfig.*?.json"]
},
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Exporting will not include any pending changes you have made, it will always mat

### Export as Zip

This option will download a metadata package based on the current state of all metadata in Salesforce. This is a full backup of all the metadata and will allow you to re-deploy the metadata at any point in the future using the [Deploy Metadata > Deploy and Compare Metadata](../deploy/deploy-metadata.md) page and choosing **Upload Metadata Zip**.
This option will download a metadata package based on the current state of all metadata in Salesforce. This is a full backup of all the metadata and will allow you to re-deploy the metadata at any point in the future using the [Deploy Metadata > Deploy and Compare Metadata](../deploy/deploy-metadata.mdx) page and choosing **Upload Metadata Zip**.

#### Re-deploying changes

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ sidebar_label: Create Custom Object
slug: /deploy-object
---

import Success from '../assets/icons/Success.svg';

## Getting Started

You can quickly deploy a new Custom Object in Jetstream from the **Create Object and Fields** page.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions apps/docs/docs/getting-started/_org-troubleshooting-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const OAuthSettingsList = ({ children }) => (
export const OAuthSettingsSolution = ({ children }) => (
<div>
<p>
OAuth configuration settings can be managed in <code>Setup</code> -> <code>Manage Connected Apps</code> ->{' '}
OAuth configuration settings can be managed in <code>Setup</code> <code>Manage Connected Apps</code> {' '}
<code>Find Jetstream and click Edit</code>.
</p>
From here, you have the ability to:
Expand All @@ -30,10 +30,10 @@ export const OAuthSettingsSolution = ({ children }) => (

If you have issues adding your org, here are some likely causes and solutions.

| Problem | Possible Causes | Solution |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| You are unable to login, your username and password is not accepted from Salesforce | Your org may have a login restriction to only allow access by logging in using the custom domain. | This setting can be found in Salesforce under `Setup` -> `My Domain` -> `Policies` -> `Prevent login from https://login.salesforce.com`. <br /> <br /> If this is set to true, then you will want to use the **Custom Login URL** option and provide custom domain shown on the **Current My Domain URL** on the setup page. |
| You recieve an error message after successfully logging in | <OAuthSettingsList /> | <OAuthSettingsSolution /> |
| Problem | Possible Causes | Solution |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| You are unable to login, your username and password is not accepted from Salesforce | Your org may have a login restriction to only allow access by logging in using the custom domain. | This setting can be found in Salesforce under `Setup` `My Domain` `Policies` `Prevent login from https://login.salesforce.com`. <br /> <br /> If this is set to true, then you will want to use the **Custom Login URL** option and provide custom domain shown on the **Current My Domain URL** on the setup page. |
| You receive an error message after successfully logging in | <OAuthSettingsList /> | <OAuthSettingsSolution /> |

:::important

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ When you download your records, the default option will be to include all record

## Query history

The query history works just like it does on the Query page. Refer to [Query](query.md) page for more details.
The query history works just like it does on the Query page. Refer to [Query](query.mdx) page for more details.

## Downloading records

Expand Down Expand Up @@ -135,7 +135,7 @@ After you query records, you can access the bulk update menu from the gear menu

<img src={require('./query-results-bulk-update-menu.png').default} alt="Accessing bulk update records" />

The configuration to update records is very similar to [Update records in bulk](../load/update-records.md), you can refer to the options there for additional details.
The configuration to update records is very similar to [Update records in bulk](../load/update-records.mdx), you can refer to the options there for additional details.

1. First, determine which records you want to target by selecting **Which Base Records**.
1. Depending on how many records are in Salesforce and how your query was configured, you may have fewer options to choose from than the screenshot shown below.
Expand Down
File renamed without changes.
43 changes: 31 additions & 12 deletions apps/docs/docusaurus.config.js → apps/docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
import type * as Preset from '@docusaurus/preset-classic';
import type { Config, } from '@docusaurus/types';

// const config: Config = {
// title: 'My Site',
// favicon: 'img/favicon.ico',
// presets: [
// [
// 'classic',
// {
// /* Your preset config here */
// } satisfies Preset.Options,
// ],
// ],

// themeConfig: {
// /* Your theme config here */
// } satisfies Preset.ThemeConfig,
// };


const config: Config = {
title: 'Jetstream',
tagline: 'Documentation',
url: 'https://docs.getjetstream.app',
Expand All @@ -17,10 +37,9 @@ module.exports = {
presets: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: 'sidebars.ts',
sidebarCollapsed: false,
routeBasePath: '/',
editUrl: 'https://github.com/jetstreamapp/jetstream/tree/main/apps/docs/',
Expand All @@ -30,18 +49,17 @@ module.exports = {
trackingID: 'G-GZJ9QQTK44',
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: ['./src/css/custom.css'],
},
sitemap: {
changefreq: 'weekly',
changefreq: 'weekly' as any, // FIXME: figure out how to use enum
priority: 0.5,
},
}),
} satisfies Preset.Options,
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
{
algolia: {
appId: '21D7I5RB7N',
apiKey: '16cff3d92b030f175ef9a30f606a221e',
Expand Down Expand Up @@ -77,7 +95,6 @@ module.exports = {
},
],
},
/** @type {import('@docusaurus/theme-common').Footer} */
footer: {
style: 'dark',
links: [
Expand Down Expand Up @@ -115,5 +132,7 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} Jetstream.`,
},
}),
} satisfies Preset.ThemeConfig,
};

export default config;
25 changes: 14 additions & 11 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,21 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.1",
"@docusaurus/preset-classic": "2.4.1",
"@docusaurus/plugin-ideal-image": "^2.4.1",
"@docusaurus/theme-search-algolia": "^2.4.1",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@docusaurus/core": "^3.0.1",
"@docusaurus/plugin-ideal-image": "^3.0.1",
"@docusaurus/preset-classic": "^3.0.1",
"@docusaurus/theme-search-algolia": "^3.0.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.4.1"
"@docusaurus/module-type-aliases": "^3.0.1",
"@docusaurus/tsconfig": "^3.0.1",
"@docusaurus/types": "^3.0.1",
"typescript": "^5.3.3"
},
"browserslist": {
"production": [
Expand All @@ -40,6 +43,6 @@
]
},
"engines": {
"node": ">=16 <=18"
"node": ">=18.0"
}
}
5 changes: 3 additions & 2 deletions apps/docs/sidebars.js → apps/docs/sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
module.exports = {
/** @type {import('@docusaurus/preset-classic').Si} */
const sidebar = {
sidebar: [
{
type: 'category',
Expand Down Expand Up @@ -37,3 +36,5 @@ module.exports = {
'other/other-useful-features',
],
};

export default sidebar;
6 changes: 6 additions & 0 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
}
Loading

0 comments on commit b8a41ee

Please sign in to comment.