Skip to content

Commit

Permalink
improvements based on @kjvalencik's review:
Browse files Browse the repository at this point in the history
- small cleanups to `inferOrg` regexp logic
- revert the `"prepare"` hook for --app (see #1042 (comment) )
  • Loading branch information
dherman committed May 20, 2024
1 parent 56d07f9 commit f37c1f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions pkgs/create-neon/data/templates/manifest/scripts.json.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"postcross-build": "neon dist -m /target < cross.log",
"debug": "npm run cargo-build --",
"build": "npm run cargo-build -- --release",
"cross": "npm run cross-build -- --release",{{#if packageSpec.library}}
"cross": "npm run cross-build -- --release"{{#if packageSpec.library}},
"prepack": "{{#eq packageSpec.library.lang compare="ts"}}tsc && {{/eq}}neon update",
"version": "neon bump --binaries platforms && git add ."{{else}}
"prepare": "npm run build"{{/if}}
"version": "neon bump --binaries platforms && git add ."{{/if}}
}
4 changes: 2 additions & 2 deletions pkgs/create-neon/src/cache/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class NPM implements Cache {
}

static inferOrg(pkg: string): string {
const m = pkg.match(/^@([^/]+)\/([^/]+)/);
return "@" + (m ? m[1] : pkg);
const m = pkg.match(/^@([^/]+)\/(.*)/);
return `@${m?.[1] ?? pkg}`;
}
}

0 comments on commit f37c1f9

Please sign in to comment.