Skip to content

Commit

Permalink
fix(create-umi): remove unexpected query for fetch npm (#11558)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiefengnian authored Aug 25, 2023
1 parent a8de0c5 commit b999497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-umi/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const unpackTemplate = async (opts: IUnpackTemplateOpts) => {
async function getNpmPkgTarUrl(opts: { registry: string; name: string }) {
const { registry, name } = opts;
const nameWithoutScope = name.startsWith('@') ? name.split('/')[1] : name;
const latestPkgInfoUrl = `${registry}${name}/latest?date=${Date.now()}`;
const latestPkgInfoUrl = `${registry}${name}/latest`;
const res = await axios.get(latestPkgInfoUrl, { validateStatus: () => true });
const latestVersion = res?.data?.version;
if (!latestVersion) {
Expand Down

0 comments on commit b999497

Please sign in to comment.