Skip to content

Commit

Permalink
update library name from @azmi/tsignal to @oazmi/tsignal, as the `"
Browse files Browse the repository at this point in the history
…@azmi"` scope name was unavailable to me on "https://npmjs.com".

update dependency name:
  - `@azmi/kitchensink` -> `@oazmi/kitchensink`
fix accidental overwritting of the `exports` field in `build_npm.ts`, when merging the output `package.json` with `package_json` object
  • Loading branch information
omar-azmi committed Mar 5, 2024
1 parent 18184a2 commit 0eabf7d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
8 changes: 5 additions & 3 deletions build_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const package_json = await createPackageJson(deno_json_dir, {
}
})
const tsconfig_json = await createTSConfigJson(deno_json_dir)
// we must delete the `exports` property, as it will override the correct version generated by `dntBuild`.
delete package_json["exports"]

await emptyDir(npm_dir)
await dntBuild({
Expand All @@ -43,10 +45,10 @@ await dntBuild({
// TODO: ISSUE: `dnt` won't currently work with `jsr` imports, not until the following issue is resolved: https://github.com/denoland/dnt/issues/378
["binder", "builtin_aliases_deps", "lambda", "struct", "typedefs",].map((submodule_path) => {
return [
"jsr:@azmi/kitchensink@0.7.5/" + submodule_path,
"jsr:@oazmi/kitchensink@0.7.5/" + submodule_path,
{
name: "@azmi/kitchensink",
version: "^0.7.5",
name: "@oazmi/kitchensink",
version: "0.7.5-a",
subPath: submodule_path,
}
]
Expand Down
2 changes: 1 addition & 1 deletion build_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getDenoJson = async (base_dir: string = "./") => {

export const createPackageJson = async (deno_json_dir: string = "./", overrides: Partial<PackageJson> = {}): Promise<PackageJson> => {
const { name, version, description, author, license, repository, bugs, exports, package_json } = await getDenoJson(deno_json_dir)
// note that if you use dnt (deno-to-node), then `exports` will get overwritten
// note that if you use dnt (deno-to-node), then you will have to delete the `exports` property, otherwise it will ruin the output.
return {
name: name ?? "",
version: version ?? "0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@azmi/tsignal",
"name": "@oazmi/tsignal",
"version": "0.3.1",
"description": "a topological order respecting signals library inspired by SolidJS",
"author": "Omar Azmi",
Expand Down Expand Up @@ -57,7 +57,7 @@
},
"package_json": {
"dependencies": {
"@azmi/kitchensink": "^0.7.5"
"@oazmi/kitchensink": "^0.7.5-a"
},
"devDependencies": {
"typescript": "^5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Non-mandatory example:
// if the top-most rectangle's `right` or `top` bounding-box's sides exceed `600`, then we should log `"overflow"` in the console.
// at the end of every reaction cycle, log the number of computations done in the console.

import { Context } from "jsr:@azmi/tsignal/context"
import { StateSignal_Factory, MemoSignal_Factory, EffectSignal_Factory } from "jsr:@azmi/tsignal/signal"
import type { Accessor, Setter } from "jsr:@azmi/tsignal/typedefs"
import { Context } from "jsr:@oazmi/tsignal/context"
import { StateSignal_Factory, MemoSignal_Factory, EffectSignal_Factory } from "jsr:@oazmi/tsignal/signal"
import type { Accessor, Setter } from "jsr:@oazmi/tsignal/typedefs"

/** `x` and `y` are relative to the parent-rectangle's top-left corner (which is their (x, y) position). */
interface Rect { x: number, y: number, width: number, height: number }
Expand Down
10 changes: 5 additions & 5 deletions src/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export {
bind_set_delete,
bind_set_has,
bind_stack_seek
} from "jsr:@azmi/kitchensink@0.7.5/binder"
export { array_isArray, noop, object_assign, object_entries, object_keys, object_values, promise_forever, promise_reject, promise_resolve, symbol_iterator } from "jsr:@azmi/kitchensink@0.7.5/builtin_aliases_deps"
export { THROTTLE_REJECT, throttle, throttleAndTrail } from "jsr:@azmi/kitchensink@0.7.5/lambda"
export { isFunction, isPrimitive, prototypeOfClass } from "jsr:@azmi/kitchensink@0.7.5/struct"
export type { CallableFunctionsOf, ConstructorOf, MethodsOf, StaticImplements } from "jsr:@azmi/kitchensink@0.7.5/typedefs"
} from "jsr:@oazmi/kitchensink@0.7.5/binder"
export { array_isArray, noop, object_assign, object_entries, object_keys, object_values, promise_forever, promise_reject, promise_resolve, symbol_iterator } from "jsr:@oazmi/kitchensink@0.7.5/builtin_aliases_deps"
export { THROTTLE_REJECT, throttle, throttleAndTrail } from "jsr:@oazmi/kitchensink@0.7.5/lambda"
export { isFunction, isPrimitive, prototypeOfClass } from "jsr:@oazmi/kitchensink@0.7.5/struct"
export type { CallableFunctionsOf, ConstructorOf, MethodsOf, StaticImplements } from "jsr:@oazmi/kitchensink@0.7.5/typedefs"

export const enum DEBUG {
LOG = 0,
Expand Down

0 comments on commit 0eabf7d

Please sign in to comment.