Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
mofeiZ committed Sep 30, 2024
2 parents 2d5f234 + e001896 commit 5633275
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function useFoo({
// prop3 and prop4?.inner should be hoisted as the dependency of z
const z = prop3?.fn(prop4?.inner.value).toString();

// prop5 and prop4?.inner should be hoisted as the dependency of z
// prop5 and prop6?.inner should be hoisted as the dependency of zz
const zz = prop5?.fn(prop6?.inner.value)?.toString();
return [x, y, z, zz];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function useFoo({
// prop3 and prop4?.inner should be hoisted as the dependency of z
const z = prop3?.fn(prop4?.inner.value).toString();

// prop5 and prop4?.inner should be hoisted as the dependency of z
// prop5 and prop6?.inner should be hoisted as the dependency of zz
const zz = prop5?.fn(prop6?.inner.value)?.toString();
return [x, y, z, zz];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function useFoo({
// prop3 and prop4?.inner should be hoisted as the dependency of z
const z = prop3?.fn(prop4?.inner.value).toString();

// prop5 and prop4?.inner should be hoisted as the dependency of z
// prop5 and prop6?.inner should be hoisted as the dependency of zz
const zz = prop5?.fn(prop6?.inner.value)?.toString();
return [x, y, z, zz];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function useFoo({
// prop3 and prop4?.inner should be hoisted as the dependency of z
const z = prop3?.fn(prop4?.inner.value).toString();

// prop5 and prop4?.inner should be hoisted as the dependency of z
// prop5 and prop6?.inner should be hoisted as the dependency of zz
const zz = prop5?.fn(prop6?.inner.value)?.toString();
return [x, y, z, zz];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
// @enablePropagateDepsInHIR
import {identity} from 'shared-runtime';

/**
* Evaluator failure:
* Found differences in evaluator results
* Non-forget (expected):
* (kind: ok) {}
* [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]]
* Forget:
* (kind: ok) {}
* {}
*/
/**
* Very contrived text fixture showing that it's technically incorrect to merge
* a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an
Expand Down Expand Up @@ -43,16 +33,6 @@ export const FIXTURE_ENTRYPOINT = {
import { c as _c } from "react/compiler-runtime"; // @enablePropagateDepsInHIR
import { identity } from "shared-runtime";

/**
* Evaluator failure:
* Found differences in evaluator results
* Non-forget (expected):
* (kind: ok) {}
* [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]]
* Forget:
* (kind: ok) {}
* {}
*/
/**
* Very contrived text fixture showing that it's technically incorrect to merge
* a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
// @enablePropagateDepsInHIR
import {identity} from 'shared-runtime';

/**
* Evaluator failure:
* Found differences in evaluator results
* Non-forget (expected):
* (kind: ok) {}
* [[ (exception in render) TypeError: Cannot read properties of null (reading 'title_text') ]]
* Forget:
* (kind: ok) {}
* {}
*/
/**
* Very contrived text fixture showing that it's technically incorrect to merge
* a conditional dependency (e.g. dep.path in `cond ? dep.path : ...`) and an
Expand Down
17 changes: 6 additions & 11 deletions scripts/devtools/publish-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,13 @@ async function publishToNPM() {
// If so we might be resuming from a previous run.
// We could infer this by comparing the build-info.json,
// But for now the easiest way is just to ask if this is expected.
const info = await execRead(`npm view ${npmPackage}@${version}`)
// Early versions of npm view gives empty response, but newer versions give 404 error.
// Catch the error to keep it consistent.
.catch(childProcessError => {
if (childProcessError.stderr.startsWith('npm ERR! code E404')) {
return null;
}

throw childProcessError;
});
const versionListJSON = await execRead(
`npm view ${npmPackage} versions --json`
);
const versionList = JSON.parse(versionListJSON);
const versionIsAlreadyPublished = versionList.includes(version);

if (info) {
if (versionIsAlreadyPublished) {
console.log('');
console.log(
`${npmPackage} version ${chalk.bold(
Expand Down

0 comments on commit 5633275

Please sign in to comment.