Skip to content

chore(deps): update ionic-docs to React 19 and other dependencies #4189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/core-concepts/webview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { Capacitor } from '@capacitor/core';
Capacitor.convertFileSrc(filePath);
```

For Cordova apps, the [Ionic Web View plugin](https://github.com/ionic-team/cordova-plugin-ionic-webview) provides a utility function for converting File URIs: `window.Ionic.WebView.convertFileSrc()`. There is also a corresponding Ionic Native plugin: [`@awesome-cordova-plugins/ionic-webview`](../native/ionic-webview.md).
For Cordova apps, the [Ionic Web View plugin](https://github.com/ionic-team/cordova-plugin-ionic-webview) provides a utility function for converting File URIs: `window.Ionic.WebView.convertFileSrc()`. There is also a corresponding Ionic Native plugin: [`@awesome-cordova-plugins/ionic-webview`](/docs/v5/native/ionic-webview).

### Implementations

Expand Down
4,712 changes: 2,736 additions & 1,976 deletions package-lock.json

Large diffs are not rendered by default.

33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,39 @@
]
},
"dependencies": {
"@docusaurus/core": "^3.7.0",
"@docusaurus/mdx-loader": "^3.7.0",
"@docusaurus/core": "3.7.0",
"@docusaurus/mdx-loader": "3.7.0",
"@docusaurus/plugin-client-redirects": "^3.7.0",
"@docusaurus/preset-classic": "^3.7.0",
"@ionic-internal/ionic-ds": "^7.0.0",
"@mdx-js/react": "^3.0.0",
"@prismicio/client": "^6.4.2",
"@prismicio/react": "^2.2.0",
"@stackblitz/sdk": "^1.6.0",
"@ionic-internal/ionic-ds": "^7.1.0",
"@mdx-js/react": "^3.1.0",
"@prismicio/client": "^6.9.0",
"@prismicio/react": "^2.9.2",
"@stackblitz/sdk": "^1.11.0",
"@tippyjs/react": "^4.2.6",
"clsx": "^1.1.1",
"concurrently": "^6.2.0",
"clsx": "^1.2.1",
"concurrently": "^6.5.1",
"crowdin": "^3.5.0",
"docusaurus-plugin-module-alias": "^0.0.2",
"docusaurus-plugin-sass": "^0.2.6",
"fs-extra": "^9.1.0",
"modern-normalize": "^1.1.0",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"remark-html": "^16.0.1",
"remark-parse": "^11.0.0",
"sass": "^1.44.0",
"semver": "^7.3.5"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.7.0",
"@docusaurus/tsconfig": "^3.7.0",
"@ionic/prettier-config": "^3.0.0",
"@types/react": "^18.2.29",
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/tsconfig": "3.7.0",
"@ionic/prettier-config": "^3.1.0",
"@types/react": "^19.1.8",
"@types/react-dom": "^19.1.6",
"cspell": "^6.31.3",
"html-loader": "^3.1.0",
"html-loader": "^3.1.2",
"hygen": "^6.2.11",
"prettier": "^2.8.8",
"typescript": "^5.2.2"
Expand Down
206 changes: 103 additions & 103 deletions scripts/release-notes.mjs
Original file line number Diff line number Diff line change
@@ -1,103 +1,103 @@
import pkg from 'fs-extra';
import fetch from 'node-fetch';
import { resolve } from 'path';
import { compare } from 'semver';
import { URL } from 'url';

import { renderMarkdown } from './utils.mjs';

const __dirname = new URL('.', import.meta.url).pathname;
const OUTPUT_PATH = resolve(__dirname, '../src/components/page/reference/ReleaseNotes/release-notes.json');

// export default {
// title: 'Build Release Notes data',
// task: async () => outputJson(OUTPUT_PATH, await getReleases(), { spaces: 2 })
// };

// Get the GitHub Releases from Ionic
// -------------------------------------------------------------------------------
// This requires an environment GITHUB_TOKEN otherwise it may fail
//
// To add a GITHUB_TOKEN, follow the steps to create a personal access token:
// https://docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
// and then authorize it to work with SSO:
// https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on
const getReleases = async () => {
try {
const request = await fetch(new URL('repos/ionic-team/ionic/releases', 'https://api.github.com'), {
headers: {
Authorization: process.env.GITHUB_TOKEN !== undefined ? `token ${process.env.GITHUB_TOKEN}` : '',
},
});

const releases = await request.json();

// Check that the response is an array in case it was
// successful but returned an object
if (Array.isArray(releases)) {
return releases
.filter((release) => {
const releasePattern = /^v(\d+)\.(\d+)\.(\d+)$/;

// All non-prerelease, non-alpha, non-beta, non-rc release
return releasePattern.test(release.tag_name);
})
.map((release) => {
const body = renderMarkdown(release.body.replace(/^#.*/, '')).value;
const published_at = parseDate(release.published_at);
const version = release.tag_name.replace('v', '');
const type = getVersionType(version);
const { name, tag_name } = release;

return {
body,
name,
published_at,
tag_name,
type,
version,
};
})
.sort((a, b) => {
return -compare(a.tag_name, b.tag_name);
});
} else {
console.error('There was an issue getting releases:', releases);
return [];
}
} catch (error) {
return [];
}
};

// Takes the date in format 2019-04-26T18:24:09Z
// and returns it as April 26 2019
function parseDate(datetime) {
const date = new Date(datetime);
return date.toLocaleString('en-us', { month: 'long' }) + ' ' + date.getDate() + ' ' + date.getFullYear();
}

// Given a version, return if it is a
// major, minor, or patch release
function getVersionType(version) {
const releasePattern = /^(\d+)\.(\d+)\.(\d+)$/;

let type = 'patch';

if (!releasePattern.test(version)) {
type = 'prerelease';
} else if (version.endsWith('.0.0')) {
type = 'major';
} else if (version.endsWith('.0')) {
type = 'minor';
}

return type;
}

async function run() {
const { outputJson } = pkg;
outputJson(OUTPUT_PATH, await getReleases(), { spaces: 2 });
}

run();
import pkg from 'fs-extra';
import fetch from 'node-fetch';
import { resolve } from 'path';
import { compare } from 'semver';
import { URL, fileURLToPath } from 'url';
import { renderMarkdown } from './utils.mjs';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const OUTPUT_PATH = resolve(__dirname, '../src/components/page/reference/ReleaseNotes/release-notes.json');
// export default {
// title: 'Build Release Notes data',
// task: async () => outputJson(OUTPUT_PATH, await getReleases(), { spaces: 2 })
// };
// Get the GitHub Releases from Ionic
// -------------------------------------------------------------------------------
// This requires an environment GITHUB_TOKEN otherwise it may fail
//
// To add a GITHUB_TOKEN, follow the steps to create a personal access token:
// https://docs.github.com/en/enterprise-cloud@latest/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
// and then authorize it to work with SSO:
// https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on
const getReleases = async () => {
try {
const request = await fetch(new URL('repos/ionic-team/ionic/releases', 'https://api.github.com'), {
headers: {
Authorization: process.env.GITHUB_TOKEN !== undefined ? `token ${process.env.GITHUB_TOKEN}` : '',
},
});
const releases = await request.json();
// Check that the response is an array in case it was
// successful but returned an object
if (Array.isArray(releases)) {
return releases
.filter((release) => {
const releasePattern = /^v(\d+)\.(\d+)\.(\d+)$/;
// All non-prerelease, non-alpha, non-beta, non-rc release
return releasePattern.test(release.tag_name);
})
.map((release) => {
const body = renderMarkdown(release.body.replace(/^#.*/, '')).value;
const published_at = parseDate(release.published_at);
const version = release.tag_name.replace('v', '');
const type = getVersionType(version);
const { name, tag_name } = release;
return {
body,
name,
published_at,
tag_name,
type,
version,
};
})
.sort((a, b) => {
return -compare(a.tag_name, b.tag_name);
});
} else {
console.error('There was an issue getting releases:', releases);
return [];
}
} catch (error) {
return [];
}
};
// Takes the date in format 2019-04-26T18:24:09Z
// and returns it as April 26 2019
function parseDate(datetime) {
const date = new Date(datetime);
return date.toLocaleString('en-us', { month: 'long' }) + ' ' + date.getDate() + ' ' + date.getFullYear();
}
// Given a version, return if it is a
// major, minor, or patch release
function getVersionType(version) {
const releasePattern = /^(\d+)\.(\d+)\.(\d+)$/;
let type = 'patch';
if (!releasePattern.test(version)) {
type = 'prerelease';
} else if (version.endsWith('.0.0')) {
type = 'major';
} else if (version.endsWith('.0')) {
type = 'minor';
}
return type;
}
async function run() {
const { outputJson } = pkg;
outputJson(OUTPUT_PATH, await getReleases(), { spaces: 2 });
}
run();
4 changes: 2 additions & 2 deletions static/code/stackblitz/v8/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"@angular/platform-browser": "^20.0.0",
"@angular/platform-browser-dynamic": "^20.0.0",
"@angular/router": "^20.0.0",
"@ionic/angular": "8.6.4",
"@ionic/core": "8.6.4",
"@ionic/angular": "8.6.3",
"@ionic/core": "8.6.3",
"ionicons": "8.0.13",
"rxjs": "^7.8.1",
"tslib": "^2.5.0",
Expand Down
2 changes: 1 addition & 1 deletion static/code/stackblitz/v8/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start": "vite preview"
},
"dependencies": {
"@ionic/core": "8.6.4",
"@ionic/core": "8.6.3",
"ionicons": "8.0.13"
},
"devDependencies": {
Expand Down
48 changes: 24 additions & 24 deletions static/code/stackblitz/v8/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading