Skip to content

Commit

Permalink
[cascading] from release/10.3.0-rc to main (#1785)
Browse files Browse the repository at this point in the history
<!--
{"currentBranch":"release/10.3.0-rc","targetBranch":"main","bypassReviewers":true,"isConflicting":false}
-->

## Cascading from release/10.3.0-rc to main

The configuration requests the cascading to bypass reviewer in case of
CI success.
To not bypass the reviewing process, please check the following
checkbox:

- [ ] <!-- !cancel bypass! --> 🚫 stop reviewing process
bypass for this Pull Request

---

<small>This Pull Request has been generated with ❤️ by the
[Otter](https://github.com/AmadeusITGroup/otter) cascading tool.</small>
  • Loading branch information
kpanot committed May 14, 2024
2 parents 89fcb9b + ec95a4f commit 016fa1a
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
17 changes: 12 additions & 5 deletions .yarn/sdks/typescript/lib/tsserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +221,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserver.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserver.js your application uses
Expand Down
17 changes: 12 additions & 5 deletions .yarn/sdks/typescript/lib/tsserverlibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ const relPnpApiPath = "../../../../.pnp.cjs";
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
}

const moduleWrapper = tsserver => {
if (!process.versions.pnp) {
return tsserver;
Expand Down Expand Up @@ -214,11 +221,11 @@ const moduleWrapper = tsserver => {
return tsserver;
};

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/lib/tsserverlibrary.js
require(absPnpApiPath).setup();
}
const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10));
// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well.
// Ref https://github.com/microsoft/TypeScript/pull/55326
if (major > 5 || (major === 5 && minor >= 5)) {
moduleWrapper(absRequire(`typescript`));
}

// Defer to the real typescript/lib/tsserverlibrary.js your application uses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const getGeneratorOptions = (tree: Tree, context: SchematicContext, options: NgG
const openapiNormalizer = Array.from(openapiNormalizerMap).map(([key, value]) => `${key}=${value}`).join(',');

// log warning of options that won't be taken into account if generator key and other options are provided in the command
if (options.generatorKey && openApiToolsJsonGenerator && JAVA_OPTIONS.some((optionName) => typeof options[optionName] !== undefined)) {
if (options.generatorKey && openApiToolsJsonGenerator && JAVA_OPTIONS.some((optionName) => typeof options[optionName] !== 'undefined')) {
Object.keys(openApiToolsJsonGenerator).filter((option) => !OPEN_API_TOOLS_OPTIONS.includes(option))
.forEach((ignoredOption) => context.logger.warn(`Option ${ignoredOption} from ${openApiToolsPath} will not be taken into account`));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const renderCssTypeStrokeStyleValue = (value: DesignTokenTypeStrokeStyleValue |
const getCssRawValue = (variableSet: DesignTokenVariableSet, {node, getType}: DesignTokenVariableStructure) => {
const nodeType = getType(variableSet, false);
if (!nodeType && node.$value) {
return typeof node.$value.toString !== undefined ? (node.$value as any).toString() : JSON.stringify(node.$value);
return typeof node.$value.toString !== 'undefined' ? (node.$value as any).toString() : JSON.stringify(node.$value);
}
const checkNode = {
...node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ module.exports = {
'global'
],
'use-isnan': 'error',
'valid-typeof': 'off',
'wrap-iife': [
'error',
'inside'
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/eslint-plugin/src/rules/json/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type JsoncParserServices = ParserServices & {
* @param parserServices Parser services object
*/
export function isJsoncParserServices(parserServices: any): parserServices is JsoncParserServices {
return !!parserServices && typeof parserServices.isJSON !== undefined;
return !!parserServices && typeof parserServices.isJSON !== 'undefined';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@o3r/telemetry/src/environment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const getEnvironmentInfo = async (): Promise<EnvironmentMetricData> => {
version: otterCorePackageJsonPath ? JSON.parse(await fs.promises.readFile(otterCorePackageJsonPath, { encoding: 'utf-8' })).version as string : undefined
};

const ci = typeof process.env.CI !== undefined && process.env.CI?.toLowerCase() !== 'false';
const ci = typeof process.env.CI !== 'undefined' && process.env.CI?.toLowerCase() !== 'false';

let projectName: string | undefined;
try {
Expand Down

0 comments on commit 016fa1a

Please sign in to comment.