-
Notifications
You must be signed in to change notification settings - Fork 6
feat(nx): update to Nx 22 #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| approval_policy = "on-request" | ||
| sandbox_mode = "workspace-write" | ||
|
|
||
| [sandbox_workspace_write] | ||
| network_access = true | ||
| # Nx's startLocalRegistry helper shells out to `npm config set/delete ... --ws=false`, | ||
| # which temporarily writes the local registry auth token to the user npm config at ~/.npmrc. | ||
| writable_roots = ["~/.npmrc"] | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,4 +42,6 @@ Thumbs.db | |
| .env | ||
|
|
||
| .nx/cache | ||
| .nx/workspace-data | ||
| .nx/workspace-data | ||
| .claude/worktrees | ||
| .claude/settings.local.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,224 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
| "scopeName": "source.jsonata", | ||
| "foldingStartMarker": "\\{\\s*$", | ||
| "foldingStopMarker": "^\\s*\\}", | ||
| "patterns": [ | ||
| { | ||
| "include": "#value" | ||
| } | ||
| ], | ||
| "repository": { | ||
| "expression": { | ||
| "name": "meta.selector.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "match": "(\\$|\\.)", | ||
| "name": "keyword.other.selector.jsonata" | ||
| }, | ||
| { | ||
| "match": "(\\+|-|\\*|/|&)", | ||
| "name": "keyword.other.math.jsonata" | ||
| } | ||
| ] | ||
| }, | ||
| "array": { | ||
| "begin": "\\[", | ||
| "beginCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.array.begin.jsonata" | ||
| } | ||
| }, | ||
| "end": "\\]", | ||
| "endCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.array.end.jsonata" | ||
| } | ||
| }, | ||
| "name": "meta.structure.array.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "include": "#value" | ||
| }, | ||
| { | ||
| "match": ",", | ||
| "name": "punctuation.separator.array.jsonata" | ||
| }, | ||
| { | ||
| "match": "[^\\s\\]]", | ||
| "name": "invalid.illegal.expected-array-separator.jsonata" | ||
| } | ||
| ] | ||
| }, | ||
| "comments": { | ||
| "patterns": [ | ||
| { | ||
| "begin": "/\\*\\*(?!/)", | ||
| "captures": { | ||
| "0": { | ||
| "name": "punctuation.definition.comment.jsonata" | ||
| } | ||
| }, | ||
| "end": "\\*/", | ||
| "name": "comment.block.documentation.jsonata" | ||
| }, | ||
| { | ||
| "begin": "/\\*", | ||
| "captures": { | ||
| "0": { | ||
| "name": "punctuation.definition.comment.jsonata" | ||
| } | ||
| }, | ||
| "end": "\\*/", | ||
| "name": "comment.block.jsonata" | ||
| }, | ||
| { | ||
| "captures": { | ||
| "1": { | ||
| "name": "punctuation.definition.comment.jsonata" | ||
| } | ||
| }, | ||
| "match": "(//).*$\\n?", | ||
| "name": "comment.line.double-slash.js" | ||
| } | ||
| ] | ||
| }, | ||
| "constant": { | ||
| "match": "\\b(?:true|false|null)\\b", | ||
| "name": "constant.language.jsonata" | ||
| }, | ||
| "number": { | ||
| "match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional", | ||
| "name": "constant.numeric.jsonata" | ||
| }, | ||
| "object": { | ||
| "begin": "\\{", | ||
| "beginCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.dictionary.begin.jsonata" | ||
| } | ||
| }, | ||
| "end": "\\}", | ||
| "endCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.dictionary.end.jsonata" | ||
| } | ||
| }, | ||
| "name": "meta.structure.dictionary.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "comment": "the JSON object key", | ||
| "include": "#objectkey" | ||
| }, | ||
| { | ||
| "include": "#comments" | ||
| }, | ||
| { | ||
| "begin": ":", | ||
| "beginCaptures": { | ||
| "0": { | ||
| "name": "punctuation.separator.dictionary.key-value.jsonata" | ||
| } | ||
| }, | ||
| "end": "(,)|(?=\\})", | ||
| "endCaptures": { | ||
| "1": { | ||
| "name": "punctuation.separator.dictionary.pair.jsonata" | ||
| } | ||
| }, | ||
| "name": "meta.structure.dictionary.value.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "comment": "the JSON object value", | ||
| "include": "#value" | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "match": "[^\\s\\}]", | ||
| "name": "invalid.illegal.expected-dictionary-separator.jsonata" | ||
| } | ||
| ] | ||
| }, | ||
| "string": { | ||
| "begin": "\"", | ||
| "beginCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.string.begin.jsonata" | ||
| } | ||
| }, | ||
| "end": "\"", | ||
| "endCaptures": { | ||
| "0": { | ||
| "name": "punctuation.definition.string.end.jsonata" | ||
| } | ||
| }, | ||
| "name": "string.quoted.double.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "include": "#stringcontent" | ||
| } | ||
| ] | ||
| }, | ||
| "objectkey": { | ||
| "begin": "\"", | ||
| "beginCaptures": { | ||
| "0": { | ||
| "name": "punctuation.support.type.property-name.begin.jsonata" | ||
| } | ||
| }, | ||
| "end": "\"", | ||
| "endCaptures": { | ||
| "0": { | ||
| "name": "punctuation.support.type.property-name.end.jsonata" | ||
| } | ||
| }, | ||
| "name": "string.jsonata support.type.property-name.jsonata", | ||
| "patterns": [ | ||
| { | ||
| "include": "#stringcontent" | ||
| }, | ||
| { | ||
| "include": "#expression" | ||
| } | ||
| ] | ||
| }, | ||
| "stringcontent": { | ||
| "patterns": [ | ||
| { | ||
| "match": "(?x) # turn on extended mode\n \\\\ # a literal backslash\n (?: # ...followed by...\n [\"\\\\/bfnrt] # one of these characters\n | # ...or...\n u # a u\n [0-9a-fA-F]{4}) # and four hex digits", | ||
| "name": "constant.character.escape.jsonata" | ||
| }, | ||
| { | ||
| "match": "\\\\.", | ||
| "name": "invalid.illegal.unrecognized-string-escape.jsonata" | ||
| } | ||
| ] | ||
| }, | ||
| "value": { | ||
| "patterns": [ | ||
| { | ||
| "include": "#comments" | ||
| }, | ||
| { | ||
| "include": "#constant" | ||
| }, | ||
| { | ||
| "include": "#number" | ||
| }, | ||
| { | ||
| "include": "#string" | ||
| }, | ||
| { | ||
| "include": "#array" | ||
| }, | ||
| { | ||
| "include": "#object" | ||
| }, | ||
| { | ||
| "include": "#expression" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
For Codex.codex/config.toml, doeswritable_roots = ["~/.npmrc"]support tilde expansion, or must paths be absolute? Also, what is the recommended secure pattern to allow temporary npm auth for Nx local registry helpers without writing to user-home.npmrc?💡 Result:
For Codex .codex/config.toml, writable_roots = ["~/.npmrc"] does not support tilde expansion; paths must be absolute. Official docs and examples consistently use absolute paths like ["/Users/YOU/.pyenv/shims"] or ["/additional/writable/path"]. A related GitHub issue confirms that Codex tools like Edit do not expand ~, treating it literally, which aligns with config path handling requiring explicit expansion or absolute paths. The recommended secure pattern for temporary npm auth with Nx local registry helpers, without writing to user-home .npmrc, is to use project-level .npmrc in the workspace root. Nx docs state this configures custom registries and auth tokens for publishing/installing, scoped by npm scopes (e.g.,
@my-scope:registry=... //my-custom-registry.com/:_authToken=). This avoids global user config, keeping auth local to the project. Environment variables like NPM_TOKEN can also inject auth temporarily via CI or shell_environment_policy in Codex config, but project .npmrc is the explicit Nx recommendation.Citations:
Replace user-home
.npmrcreference with workspace-local.npmrcand use absolute path if keeping this approach.The
writable_roots = ["~/.npmrc"]path will not work as intended: Codex does not expand tilde inwritable_roots, so it will treat~/.npmrcliterally rather than resolving to the user's home directory. This is both a config bug and a security concern.The recommended approach is to use a workspace-local
.npmrcin the project root instead. This allows Nx's local registry helper to configure auth tokens scoped to the project without writing to user-home config, eliminating cross-run/cross-user persistence risks. If you must write to user-home~/.npmrc, use an absolute path like/Users/USERNAME/.npmrc—but the workspace-local.npmrcpattern is safer and aligns with Nx documentation.🤖 Prompt for AI Agents