@docusaurus/core 0.0.0-5049 → 0.0.0-5052

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -49,7 +49,7 @@ class PendingNavigation extends React.Component {
49
49
  // user is on saveData
50
50
  preload(nextLocation.pathname)
51
51
  .then(() => {
52
- this.routeUpdateCleanupCb?.();
52
+ this.routeUpdateCleanupCb();
53
53
  this.setState({ nextRouteHasLoaded: true });
54
54
  })
55
55
  .catch((e) => console.warn(e));
@@ -55,7 +55,7 @@ This behavior can have SEO impacts and create relative link issues.
55
55
  .exec('git config --get remote.origin.url', { silent: true })
56
56
  .stdout.trim();
57
57
  // The source branch; defaults to the currently checked out branch
58
- const sourceBranch = process.env.CURRENT_BRANCH ||
58
+ const sourceBranch = process.env.CURRENT_BRANCH ??
59
59
  shelljs_1.default.exec('git rev-parse --abbrev-ref HEAD', { silent: true }).stdout.trim();
60
60
  const gitUser = process.env.GIT_USER;
61
61
  let useSSH = process.env.USE_SSH !== undefined &&
@@ -69,22 +69,22 @@ This behavior can have SEO impacts and create relative link issues.
69
69
  throw new Error('Please set the GIT_USER environment variable, or explicitly specify USE_SSH instead!');
70
70
  }
71
71
  }
72
- const organizationName = process.env.ORGANIZATION_NAME ||
73
- process.env.CIRCLE_PROJECT_USERNAME ||
72
+ const organizationName = process.env.ORGANIZATION_NAME ??
73
+ process.env.CIRCLE_PROJECT_USERNAME ??
74
74
  siteConfig.organizationName;
75
75
  if (!organizationName) {
76
76
  throw new Error(`Missing project organization name. Did you forget to define "organizationName" in ${siteConfigPath}? You may also export it via the ORGANIZATION_NAME environment variable.`);
77
77
  }
78
78
  logger_1.default.info `organizationName: name=${organizationName}`;
79
- const projectName = process.env.PROJECT_NAME ||
80
- process.env.CIRCLE_PROJECT_REPONAME ||
79
+ const projectName = process.env.PROJECT_NAME ??
80
+ process.env.CIRCLE_PROJECT_REPONAME ??
81
81
  siteConfig.projectName;
82
82
  if (!projectName) {
83
83
  throw new Error(`Missing project name. Did you forget to define "projectName" in ${siteConfigPath}? You may also export it via the PROJECT_NAME environment variable.`);
84
84
  }
85
85
  logger_1.default.info `projectName: name=${projectName}`;
86
86
  // We never deploy on pull request.
87
- const isPullRequest = process.env.CI_PULL_REQUEST || process.env.CIRCLE_PULL_REQUEST;
87
+ const isPullRequest = process.env.CI_PULL_REQUEST ?? process.env.CIRCLE_PULL_REQUEST;
88
88
  if (isPullRequest) {
89
89
  shelljs_1.default.echo('Skipping deploy on a pull request.');
90
90
  shelljs_1.default.exit(0);
@@ -102,10 +102,10 @@ This behavior can have SEO impacts and create relative link issues.
102
102
  Please provide the branch name to deploy to as an environment variable, for example DEPLOYMENT_BRANCH=main or DEPLOYMENT_BRANCH=master .
103
103
  You can also set the deploymentBranch property in docusaurus.config.js .`);
104
104
  }
105
- const deploymentBranch = process.env.DEPLOYMENT_BRANCH || siteConfig.deploymentBranch || 'gh-pages';
105
+ const deploymentBranch = process.env.DEPLOYMENT_BRANCH ?? siteConfig.deploymentBranch ?? 'gh-pages';
106
106
  logger_1.default.info `deploymentBranch: name=${deploymentBranch}`;
107
- const githubHost = process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
108
- const githubPort = process.env.GITHUB_PORT || siteConfig.githubPort;
107
+ const githubHost = process.env.GITHUB_HOST ?? siteConfig.githubHost ?? 'github.com';
108
+ const githubPort = process.env.GITHUB_PORT ?? siteConfig.githubPort;
109
109
  let deploymentRepoURL;
110
110
  if (useSSH) {
111
111
  deploymentRepoURL = (0, utils_1.buildSshUrl)(githubHost, organizationName, projectName, githubPort);
@@ -150,7 +150,7 @@ You can also set the deploymentBranch property in docusaurus.config.js .`);
150
150
  throw err;
151
151
  }
152
152
  shellExecLog('git add --all');
153
- const commitMessage = process.env.CUSTOM_COMMIT_MESSAGE ||
153
+ const commitMessage = process.env.CUSTOM_COMMIT_MESSAGE ??
154
154
  `Deploy website - based on ${currentCommit}`;
155
155
  const commitResults = shellExecLog(`git commit -m "${commitMessage}"`);
156
156
  if (shellExecLog(`git push --force origin ${deploymentBranch}`).code !== 0) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@docusaurus/core",
3
3
  "description": "Easy to Maintain Open Source Documentation Websites",
4
- "version": "0.0.0-5049",
4
+ "version": "0.0.0-5052",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -43,13 +43,13 @@
43
43
  "@babel/runtime": "^7.18.0",
44
44
  "@babel/runtime-corejs3": "^7.18.0",
45
45
  "@babel/traverse": "^7.18.0",
46
- "@docusaurus/cssnano-preset": "0.0.0-5049",
47
- "@docusaurus/logger": "0.0.0-5049",
48
- "@docusaurus/mdx-loader": "0.0.0-5049",
46
+ "@docusaurus/cssnano-preset": "0.0.0-5052",
47
+ "@docusaurus/logger": "0.0.0-5052",
48
+ "@docusaurus/mdx-loader": "0.0.0-5052",
49
49
  "@docusaurus/react-loadable": "5.5.2",
50
- "@docusaurus/utils": "0.0.0-5049",
51
- "@docusaurus/utils-common": "0.0.0-5049",
52
- "@docusaurus/utils-validation": "0.0.0-5049",
50
+ "@docusaurus/utils": "0.0.0-5052",
51
+ "@docusaurus/utils-common": "0.0.0-5052",
52
+ "@docusaurus/utils-validation": "0.0.0-5052",
53
53
  "@slorber/static-site-generator-webpack-plugin": "^4.0.4",
54
54
  "@svgr/webpack": "^6.2.1",
55
55
  "autoprefixer": "^10.4.7",
@@ -107,8 +107,8 @@
107
107
  "webpackbar": "^5.0.2"
108
108
  },
109
109
  "devDependencies": {
110
- "@docusaurus/module-type-aliases": "0.0.0-5049",
111
- "@docusaurus/types": "0.0.0-5049",
110
+ "@docusaurus/module-type-aliases": "0.0.0-5052",
111
+ "@docusaurus/types": "0.0.0-5052",
112
112
  "@types/detect-port": "^1.3.2",
113
113
  "@types/react-dom": "^18.0.4",
114
114
  "@types/react-router-config": "^5.0.6",
@@ -128,5 +128,5 @@
128
128
  "engines": {
129
129
  "node": ">=14"
130
130
  },
131
- "gitHead": "527b2a01c46b67483327a1a6873fccf81bc19e2c"
131
+ "gitHead": "4a38a12418dc0d2bfa287bd38392fabf04222556"
132
132
  }