text:
nb.optional doesn't work with nb.types.NamedTuple

It seems like nb.optional doesn't work with nb.types.NamedTuple (it does with nb.types.Tuple, though). Here is the minimum repro:
import numba as nb
from typing import NamedTuple

class Params(NamedTuple):
    param1: float
    param2: int

ParamsNumbaType = nb.types.NamedTuple((nb.f8, nb.i8), Params)

@nb.njit(ParamsNumbaType(ParamsNumbaType))
def func(my_tup: Params):
    return my_tup

tup = Params(3., 3)
func(tup)  # Works

class ParamsOptional(NamedTuple):
    param1: float
    param2: int | None = None

ParamsOptionalNumbaType = nb.types.NamedTuple((nb.f8, nb.optional(nb.i8)), ParamsOptional)

@nb.njit(ParamsOptionalNumbaType(ParamsOptionalNumbaType))
def func2(my_tup: ParamsOptional):
    return my_tup

tup = ParamsOptional(3., 3)
func2(tup)  # Fails

@ocmob thank you for reporting this. I have updated the reproducer to include the import numba as nb.

The error message is
 💣 zsh» python issue_9607.py
Traceback (most recent call last):
  File "/Users/vhaenel/git/numba/issue_9607.py", line 28, in <module>
    func2(tup)  # Fails
    ^^^^^^^^^^
  File "/Users/vhaenel/git/numba/numba/core/dispatcher.py", line 658, in _explain_matching_error
    raise TypeError(msg)
TypeError: No matching definition for argument type(s) ParamsOptional(float64, int64)

@ocmob looks like I can reproduce this. I am provisionally labelling this as a typing bug until a second maintainer can verify it, thank you for reporting.

I'd classify this as a feature request to expand support to typing.NamedTuple. All tuple/namedtuple support predates that.

authors: esc ocmob sklam


text:
What have I done to stop this exam resuming properly?

Newcastle's MAS3217 CBA 3 loses all student input on resume. It looks like every part has answered: false set, so it doesn't load the suspend data, even though it's there.

I think it might be to do with number entry parts, when the answer is a fraction. I have my suspicions that I use the SCORM "number" interaction type, which doesn't allow /

source: gharchive/issue

repo: numbas/Numbas

license_type: permissive

license_source: github-api


text:
extra-files: use rsync -p, -FF

After removing -a in #15, remote extra files are implictly chowned according to the remote umask. So we (re-)add --perms to apply local file permissions remotely as this should mostly be expected behavior.
The second -F disables uploading the .rsync-filter file itself if it exists.

ci-failure looks unrelated to this change?

bors merge

source: gharchive/pull-request

repo: numtide/nixos-remote

license: MIT


text:
Dev14 fixes

In order to create a new release, I had to make some changes.
@AArnott, could you please take look? Some of those changes surprised me in the sense that without it Dev14 support should have never worked. So I'm curious if went down the wrong path.

I considered making similar changes, and I'm glad you made them.
It's not broken before these changes I believe because while the assembly names are the same, the directories they are deployed to are not the same, so why should it be broken?

It is broken on the command line because all files are dropped to bin\raw. This results in error messages like 'Code Analysis file could not be written' and stuff like this. Also, setup can't be build on the command line either because the version of WiX that it is was using didn't know about the VS 14 props.
I guess you're too committed to building in the IDE :-)

I should probably change the tree structure as well:
  src
  ├───.nuget
  ├───Common
  ├───Icons
  ├───NuProj.Build
  │   └───Properties
- ├───NuProj.Package
+ ├───NuProj.ProjectSystem.12
  │   ├───Properties
  │   ├───Rules
  │   └───Templates
  │       └───Projects
  │           └───NuProj
- ├───NuProj.Package.Dev14
+ ├───NuProj.ProjectSystem.14
  │   └───Templates
  │       └───Projects
  │           └───NuProj
  ├───NuProj.Packages
  ├───NuProj.Setup
  │   └───Resources
  ├───NuProj.Targets
  ├───NuProj.Tasks
  │   └───Properties
  └───NuProj.Tests

Thoughts?

Ya, I don't build from the command line often, although I did see some of the build errors you mentioned when I did build from the command line but didn't know what was causing it. Thanks for tracking that down.
Ya, I like the project directory name to match the project name.

Thanks for the review!

authors: AArnott terrajobst

repo: nuproj/nuproj

license: mit

license_source: bigquery


text:
Answer for ungraded exercise

Anyone have answer for the ungraded exercise 2?

not me, i was looking for it too

UE2 Str.pdf
Here are the answers.

finals is over you can close this issue


text:
[T4A3][F09-B2] Xu Chen

Ready for review

Some comments added. Please close the PR after reading comments.

authors: githubxxcc jeffryhartanto


text:
Preload lang chunks

What problem does this feature solve?
Hello,
I'm working on a 30-lang website and it would be great to preload some lang chunks.
Ex:

On http://website.com/it/ ('it' and 'en' chunks are preloaded, as 'en' is the fallback language)
On http://website.com/fr/ ('fr' and 'en' chunks are preloaded)

Btw, is it possible to do so today?
Thanks,

This feature request is available on Nuxt community (#c319)

This is how it works right now with lazyLoad enabled. Do you want to customize it more or don't know about existing behavior?

Indeed, it's linked to the lazyload feature. I can't disable it, otherwise I would bundle translations for 30 countries, having a huge impact on the bundle size.

By preload you mean use the preload meta tag?

Exactly!

I managed to do it, although I'm not really proud of the solution:
if (process.client){
    import('~/path/to/translations/messages.en_GB.yml')
    import(`~/path/to/translations/messages.${__NUXT__.state.layout.locale}.yml`)
}

I thought I've understood what you were requesting but your last comment has confused me again.
Apparently you are not talking about preload tags (https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content).
Lazy loading itself is loading all messages for the current locale and fallback locale so I'm not sure what are you missing exactly and how importing those yml files helps you.

I'll try to be clear enough:
Conditions:

I'm using Nuxt-i18n
lazy feature is activated

What is the problem?

On client side, when JS is executed, lang files are loaded sequentially:

First, the browser gets the fallback lang file (in my case: en_GB)
Then, it fetches the current locale lang file (let's say fr_FR)
It has an impact on my website performance as the user is waiting for the server to answer, twice.

What solutions?

Use a preload tag to get those 2 files sooner. But I did not manage to configure it properly.
Use webpack function import() to:

Get the lang files when the JS execution starts.
The browser caches it so it's already loaded when it's needed later.

Now I understand, thanks :)
Since fallback is always required, it would make sense to have it in the main bundle already.
For the current language, I'd try to add preload tags.
No idea how to do those things yet but will investigate at some point. :)

As far as I can see, 'fallback' does not work at all. When I set language to en all is fine. But when I switch to other (subset), it will show me:
[vue-i18n] Value of key 'home.title' is not a string! vue-i18n.esm.js:33
[vue-i18n] Cannot translate the value of keypath 'home.pay_off.title'. Use the value of keypath as default.

It's still a relevant issue. To avoid delay or screen flash for users that need the non-english, preload of the native might be preferable first... ))?

authors: jeanphilippeds rchl tvld


text:
Responsive sizing via sizes prop not working

Using the sizes prop creates different srcset sizes but it does not produce appropriate Cloudinary URLs for each size
Version
@nuxtjs/cloudinary 2.0.0-rc.3
nuxt: 3.5.2
Steps to reproduce
<CldImage
      src="images/turtle"
      width="600"
      height="600"
      crop="fill"
      sizes="sm:100vw md:50vw lg:400px"
    />

Sizes syntax example pulled from: https://image.nuxtjs.org/components/nuxt-img#sizes
What is Expected?
Each URL should include a width resize transformation that corresponds to the srcset size
What is actually happening?
Srcset includes all the same images for each size
srcset="
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 384w,
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 400w,
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 640w,
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 768w,
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 800w,
https://res.cloudinary.com/colbycloud-next-cloudinary/image/upload/c_fill,w_600,h_600,g_auto/f_auto/q_auto/v1/images/turtle?_a=E 1280w
"

if the Nuxt Image module doesn't allow for any type of custom configuration for constructing the src based on the responsive sizing and props, might want to consider using Unpic which makes this pretty easy
https://unpic.pics/img/vue/
<Image
  src="cld-sample-5"
  layout="constrained"
  width={800}
  height={600}
  alt="A lovely bath"
  transformer={({url, width, height,}) => {
    return constructCloudinaryUrl({
      options: {
        src: url,
        width,
        height
      },
      config: {
        cloud: {
          cloudName: 'example'
        }
      }
    });
  }}
/>

not sure how useCloudinaryUrl fits into that, if it can just sit in the transformer prop or not, but this is an example using the raw constructCloudinaryUrl function

I tried it with current nuxt image and also with the nuxt image rc (the newest version) but none of these versions can actually create the sizes properly. I think I would have to develop this functionality by myself.

are you opposed to using Unpic? it was developed by Matt Kane, who helped build the Gatsby image component and is now working at Netlify on a lot of other things.
it will give us everything out of the box. i highly recommend not building this yourself

authors: Baroshem colbyfayock

repo: nuxt-modules/cloudinary


text:
Create component programmaticaly with Nuxt context

Versions

nuxt: 2.15.8
node: 14.17.5

Reproduction
There is a need to create a component programmatically using similar code (for example, some mixin is used in page component, where formatterComponent method is called).
mixin.js
import Vue from 'vue';

export default {
  methods: {
    formatterComponent(component, propsData) {
      const VueComponent = Vue.extend(component);
      const VueComponentInstance = new VueComponent({ propsData });
      VueComponentInstance.$mount();
      return VueComponentInstance.$el;
    }
  }
}

But the problem is that there is no access to global variables inside the component. For example, with the nuxt-auth module installed, the call to this.$auth produces undefined.
Is it possible to correctly create and mount a component in Nuxt with all global dependencies and modules?

Hi,
I encounter the same issue using this approach. I need to instantiate a component containing some computed properties which uses Nuxt Context injected props but all are undefined.
I've set up a repro here: https://github.com/gtnsimon/codesandbox-nuxt/tree/bug/dynamic-component-context

Clone the repo
Install packages using yarn
Checkout to branch bug/dynamic-component-context
Run Nuxt using yarn run dev

authors: amkatyshev gtnsimon


text:
Missing deps

For some reason, just installing nuxt doesn't work.
    "ansi-regex": "^2.0.0",
    "babel-preset-es2015": "^6.18.0",
    "babel-preset-stage-2": "^6.18.0",
    "html-entities": "^1.2.0",
    "memory-fs": "^0.3.0",
    "nuxt": "^0.7.4",
    "strip-ansi": "^3.0.1"

is also required.
So lets back track here.
1. Starting with just nuxt:
$ npm i nuxt
npm WARN package.json test-foo@1.0.0 No description
npm WARN package.json test-foo@1.0.0 No repository field.
npm WARN package.json test-foo@1.0.0 No README data
npm WARN optional dep failed, continuing fsevents@1.0.15
...

nuxt@0.7.4 node_modules\nuxt
├── pify@2.3.0
├── serialize-javascript@1.3.0
├── co@4.6.0
├── es6-object-assign@1.0.3
├── ansi-html@0.0.6
├── hash-sum@1.0.2
├── vuex@2.0.0
├── vue-router@2.0.3
├── es6-promise@4.0.5
├── vue-meta@0.5.2 (object-assign@4.1.0, lodash.escape@4.0.1, lodash.isplainobject@4.0.6, deepmerge@1.3.0)
├── debug@2.3.3 (ms@0.7.2)
├── path-to-regexp@1.7.0 (isarray@0.0.1)
├── lru-cache@4.0.1 (pseudomap@1.0.2, yallist@2.0.0)
├── file-loader@0.9.0 (loader-utils@0.2.16)
├── url-loader@0.5.7 (mime@1.2.11, loader-utils@0.2.16)
├── fs-extra@1.0.0 (klaw@1.3.1, jsonfile@2.4.0, graceful-fs@4.1.11)
├── vue-template-compiler@2.1.3 (de-indent@1.0.2, he@1.1.0)
├── vue-server-renderer@2.1.3 (de-indent@1.0.2, he@1.1.0)
├── webpack-hot-middleware@2.13.2 (html-entities@1.2.0, querystring@0.2.0, strip-ansi@3.0.1)
├── cross-spawn@5.0.1 (shebang-command@1.2.0, which@1.2.12)
├── serve-static@1.11.1 (escape-html@1.0.3, encodeurl@1.0.1, parseurl@1.3.1, send@0.14.1)
├── glob@7.1.1 (path-is-absolute@1.0.1, inherits@2.0.3, fs.realpath@1.0.0, once@1.4.0, inflight@1.0.6, minimatch@3.0.3)
├── extract-text-webpack-plugin@2.0.0-beta.4 (async@1.5.2, loader-utils@0.2.16, webpack-sources@0.1.3)
├── babel-loader@6.2.8 (object-assign@4.1.0, loader-utils@0.2.16, mkdirp@0.5.1, find-cache-dir@0.1.1)
├── webpack-dev-middleware@1.8.4 (path-is-absolute@1.0.1, range-parser@1.2.0, mime@1.3.4, memory-fs@0.3.0)
├── vue@2.1.3
├── chokidar@1.6.1 (path-is-absolute@1.0.1, inherits@2.0.3, async-each@1.0.1, glob-parent@2.0.0, is-glob@2.0.1, is-binary-path@1.0.1, readdirp@2.1.0, anymatch@1.3.0)
├── vue-loader@10.0.1 (object-assign@4.1.0, vue-hot-reload-api@2.0.6, vue-style-loader@1.0.0, vue-template-es2015-compiler@1.3.0, loader-utils@0.2.16, source-map@0.5.6, postcss-selector-parser@2.2.2, consolidate@0.14.5, postcss@5.2.6, js-beautify@1.6.4)
├── css-loader@0.26.0 (postcss-modules-extract-imports@1.0.1, object-assign@4.1.0, lodash.camelcase@4.3.0, loader-utils@0.2.16, postcss-modules-values@1.2.2, source-list-map@0.1.6, babel-code-frame@6.16.0, css-selector-tokenizer@0.7.0, postcss-modules-scope@1.0.2, postcss-modules-local-by-default@1.1.1, postcss@5.2.6, cssnano@3.8.1)
├── webpack@2.1.0-beta.27 (object-assign@4.1.0, interpret@1.0.1, tapable@0.2.4, supports-color@3.1.2, ajv-keywords@1.1.1, loader-runner@2.2.0, source-map@0.5.6, loader-utils@0.2.16, mkdirp@0.5.1, enhanced-resolve@2.3.0, acorn@4.0.3, memory-fs@0.3.0, webpack-sources@0.1.3, async@2.1.4, watchpack@1.1.0, ajv@4.9.0, uglify-js@2.7.4, node-libs-browser@1.1.1, yargs@6.4.0)
├── autoprefixer@6.5.3 (normalize-range@0.1.2, num2fraction@1.2.2, postcss-value-parser@3.3.0, browserslist@1.4.0, postcss@5.2.6, caniuse-db@1.0.30000587)
├── lodash@4.17.2
├── babel-core@6.18.2 (slash@1.0.0, babel-messages@6.8.0, path-is-absolute@1.0.1, babel-template@6.16.0, babel-helpers@6.16.0, private@0.1.6, json5@0.5.0, babylon@6.14.1, convert-source-map@1.3.0, source-map@0.5.6, babel-types@6.19.0, minimatch@3.0.3, babel-code-frame@6.16.0, babel-traverse@6.19.0, babel-generator@6.19.0, babel-register@6.18.0, babel-runtime@6.18.0)
├── babel-preset-es2015@6.18.0 (babel-plugin-transform-es2015-template-literals@6.8.0, babel-plugin-transform-es2015-modules-commonjs@6.18.0, babel-plugin-transform-es2015-shorthand-properties@6.18.0, babel-plugin-transform-es2015-function-name@6.9.0, babel-plugin-transform-es2015-spread@6.8.0, babel-plugin-transform-es2015-modules-umd@6.18.0, babel-plugin-transform-es2015-unicode-regex@6.11.0, babel-plugin-transform-es2015-classes@6.18.0, babel-plugin-check-es2015-constants@6.8.0, babel-plugin-transform-regenerator@6.16.1, babel-plugin-transform-es2015-sticky-regex@6.8.0, babel-plugin-transform-es2015-object-super@6.8.0, babel-plugin-transform-es2015-typeof-symbol@6.18.0, babel-plugin-transform-es2015-destructuring@6.19.0, babel-plugin-transform-es2015-modules-amd@6.18.0, babel-plugin-transform-es2015-modules-systemjs@6.19.0, babel-plugin-transform-es2015-literals@6.8.0, babel-plugin-transform-es2015-arrow-functions@6.8.0, babel-plugin-transform-es2015-parameters@6.18.0, babel-plugin-transform-es2015-duplicate-keys@6.8.0, babel-plugin-transform-es2015-block-scoping@6.18.0, babel-plugin-transform-es2015-computed-properties@6.8.0, babel-plugin-transform-es2015-for-of@6.18.0, babel-plugin-transform-es2015-block-scoped-functions@6.8.0)
└── babel-preset-stage-2@6.18.0 (babel-plugin-syntax-dynamic-import@6.18.0, babel-plugin-transform-decorators@6.13.0, babel-plugin-transform-class-properties@6.19.0, babel-preset-stage-3@6.17.0)

npm run dev

> test-foo@1.0.0 dev C:\Users\zenobius\Projects\test-foo
> nuxt

  nuxt:build App root: C:\Users\zenobius\Projects\test-foo +0ms
  nuxt:build Generating .nuxt/ files... +2ms
  nuxt:build Generating routes... +6ms
  nuxt:build Generating files... +3ms
  nuxt:build Adding webpack middlewares... +25ms
{ Error: Cannot find module 'memory-fs'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Nuxt.webpackWatchAndUpdate (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\lib\build\index.js:250:15)
    at Nuxt.module.exports (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\lib\build\index.js:129:27)
    at next (native)
    at onFulfilled (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\co\index.js:65:19) code: 'MODULE_NOT_FOUND' }

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v-x64\\6.9.1\\node.exe" "C:\\Program Files (x86)\\Nodist\\npmv\\2.15.10\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.9.1
npm ERR! npm  v2.15.10
npm ERR! code ELIFECYCLE
npm ERR! test-foo@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test-foo@1.0.0 dev script 'nuxt'.
npm ERR! This is most likely a problem with the test-foo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     nuxt
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs test-foo
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls test-foo
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\zenobius\Projects\test-foo\npm-debug.log

Nope...
2. adding memory-fs
$ npm i -S memory-fs

$ npm run dev

> test-foo@1.0.0 dev C:\Users\zenobius\Projects\test-foo
> nuxt

  nuxt:build App root: C:\Users\zenobius\Projects\test-foo +0ms
  nuxt:build Generating .nuxt/ files... +2ms
  nuxt:build Generating routes... +5ms
  nuxt:build Generating files... +2ms
  nuxt:build Adding webpack middlewares... +19ms
Ready on http://localhost:3000
./.nuxt/server.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "C:\\Users\\zenobius\\Projects\\test-foo"
    at C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:299:19
    at Array.map (native)
    at OptionManager.resolvePresets (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:270:20)
    at OptionManager.mergePresets (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:259:10)
    at OptionManager.mergeOptions (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:244:14)
    at OptionManager.init (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:374:12)
    at File.initOptions (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\index.js:216:65)
    at new File (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\index.js:139:24)
    at Pipeline.transform (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
    at transpile (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-loader\lib\index.js:41:20)
webpack built 53381c8f33547a6b069d in 740ms
Hash: 53381c8f33547a6b069d
Version: webpack 2.1.0-beta.27
Time: 740ms
               Asset     Size  Chunks       Chunk Names
      nuxt.bundle.js  23.2 kB       0       app
    vendor.bundle.js   301 kB       1       vendor
  nuxt.bundle.js.map  26.7 kB       0       app
vendor.bundle.js.map   369 kB       1       vendor

ERROR in (webpack)-hot-middleware/client.js?reload=true
Module not found: Error: Can't resolve 'strip-ansi' in 'C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\webpack-hot-middleware'
 @ (webpack)-hot-middleware/client.js?reload=true 95:14-35
 @ multi app

ERROR in (webpack)-hot-middleware/client-overlay.js
Module not found: Error: Can't resolve 'html-entities' in 'C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\webpack-hot-middleware'
 @ (webpack)-hot-middleware/client-overlay.js 40:15-39
 @ (webpack)-hot-middleware/client.js?reload=true
 @ multi app

ERROR in ./.nuxt/client.js
Module build failed: Error: Couldn't find preset "es2015" relative to directory "C:\\Users\\zenobius\\Projects\\test-foo"
    at C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:299:19
    at Array.map (native)
    at OptionManager.resolvePresets (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:270:20)
    at OptionManager.mergePresets (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:259:10)
    at OptionManager.mergeOptions (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:244:14)
    at OptionManager.init (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\options\option-manager.js:374:12)
    at File.initOptions (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\index.js:216:65)
    at new File (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\file\index.js:139:24)
    at Pipeline.transform (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-core\lib\transformation\pipeline.js:46:16)
    at transpile (C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\babel-loader\lib\index.js:41:20)
 @ multi app

Which spams the terminal with errors forever until ctrl+c
3. add those missing libs

$ npm i -S html-entities ansi-regex babel-preset-stage-2 babel-preset-es2015
npm WARN package.json test-foo@1.0.0 No description
npm WARN package.json test-foo@1.0.0 No repository field.
npm WARN package.json test-foo@1.0.0 No README data
ansi-regex@2.0.0 node_modules\ansi-regex

html-entities@1.2.0 node_modules\html-entities

babel-preset-es2015@6.18.0 node_modules\babel-preset-es2015
├── babel-plugin-transform-es2015-literals@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-duplicate-keys@6.8.0 (babel-types@6.19.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-modules-umd@6.18.0 (babel-template@6.16.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-modules-amd@6.18.0 (babel-template@6.16.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-block-scoped-functions@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-typeof-symbol@6.18.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-computed-properties@6.8.0 (babel-template@6.16.0, babel-helper-define-map@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-sticky-regex@6.8.0 (babel-helper-regex@6.18.0, babel-types@6.19.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-template-literals@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-destructuring@6.19.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-for-of@6.18.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-shorthand-properties@6.18.0 (babel-types@6.19.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-modules-systemjs@6.19.0 (babel-template@6.16.0, babel-helper-hoist-variables@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-unicode-regex@6.11.0 (regexpu-core@2.0.0, babel-helper-regex@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-arrow-functions@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-modules-commonjs@6.18.0 (babel-plugin-transform-strict-mode@6.18.0, babel-template@6.16.0, babel-types@6.19.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-object-super@6.8.0 (babel-helper-replace-supers@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-parameters@6.18.0 (babel-helper-get-function-arity@6.18.0, babel-helper-call-delegate@6.18.0, babel-template@6.16.0, babel-types@6.19.0, babel-traverse@6.19.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-block-scoping@6.18.0 (babel-template@6.16.0, babel-types@6.19.0, babel-traverse@6.19.0, lodash@4.17.2, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-function-name@6.9.0 (babel-types@6.19.0, babel-helper-function-name@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-spread@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-check-es2015-constants@6.8.0 (babel-runtime@6.18.0)
├── babel-plugin-transform-es2015-classes@6.18.0 (babel-helper-replace-supers@6.18.0, babel-helper-optimise-call-expression@6.18.0, babel-messages@6.8.0, babel-helper-function-name@6.18.0, babel-template@6.16.0, babel-helper-define-map@6.18.0, babel-types@6.19.0, babel-traverse@6.19.0, babel-runtime@6.18.0)
└── babel-plugin-transform-regenerator@6.16.1 (private@0.1.6, babel-types@6.19.0, babel-runtime@6.18.0)

babel-preset-stage-2@6.18.0 node_modules\babel-preset-stage-2
├── babel-plugin-syntax-dynamic-import@6.18.0
├── babel-plugin-transform-decorators@6.13.0 (babel-plugin-syntax-decorators@6.13.0, babel-helper-define-map@6.18.0, babel-template@6.16.0, babel-types@6.19.0, babel-helper-explode-class@6.18.0, babel-runtime@6.18.0)
├── babel-plugin-transform-class-properties@6.19.0 (babel-plugin-syntax-class-properties@6.13.0, babel-template@6.16.0, babel-helper-function-name@6.18.0, babel-runtime@6.18.0)
└── babel-preset-stage-3@6.17.0 (babel-plugin-syntax-trailing-function-commas@6.13.0, babel-plugin-transform-async-to-generator@6.16.0, babel-plugin-transform-exponentiation-operator@6.8.0, babel-plugin-transform-async-generator-functions@6.17.0, babel-plugin-transform-object-rest-spread@6.19.0)

$ npm run dev

> test-foo@1.0.0 dev C:\Users\zenobius\Projects\test-foo
> nuxt

  nuxt:build App root: C:\Users\zenobius\Projects\test-foo +0ms
  nuxt:build Generating .nuxt/ files... +3ms
  nuxt:build Generating routes... +5ms
  nuxt:build Generating files... +3ms
  nuxt:build Adding webpack middlewares... +20ms
Ready on http://localhost:3000

Boom. getting somewhere... but, without loading any pages:
ERROR in (webpack)-hot-middleware/client.js?reload=true
Module not found: Error: Can't resolve 'strip-ansi' in 'C:\Users\zenobius\Projects\test-foo\node_modules\nuxt\node_modules\webpack-hot-middleware'
 @ (webpack)-hot-middleware/client.js?reload=true 95:14-35
 @ multi app

4. install yet more missing libs

$ npm i --save strip-ansi
npm WARN package.json test-foo@1.0.0 No description
npm WARN package.json test-foo@1.0.0 No repository field.
npm WARN package.json test-foo@1.0.0 No README data
strip-ansi@3.0.1 node_modules\strip-ansi

$ npm run dev

> test-foo@1.0.0 dev C:\Users\zenobius\Projects\test-foo
> nuxt

  nuxt:build App root: C:\Users\zenobius\Projects\test-foo +0ms
  nuxt:build Generating .nuxt/ files... +3ms
  nuxt:build Generating routes... +7ms
  nuxt:build Generating files... +3ms
  nuxt:build Adding webpack middlewares... +18ms
Ready on http://localhost:3000
webpack built ee46c8438c3a8b6ffca2 in 9442ms
webpack building...
webpack built ee46c8438c3a8b6ffca2 in 86ms
  nuxt:render Rendering url / +10s
webpack building...
webpack built ee46c8438c3a8b6ffca2 in 131ms

Getting somewhere now.
$ curl http://localhost:3000
<!DOCTYPE html>

    <title n-head="true">This page could not be found.</title>

    <base href="/">

404

This page could not be found.

Back to the home page

Boom. much success. yes.

It seems that you are using an old version of npm.
Can you update it with npm install -g npm and start again please?

authors: Atinux airtonix


text:
Strange behaviour on production

Version
v1.4.0
Reproduction link
https://github.com/ForzaNikolay/issue-example
Steps to reproduce
npm install
Development
npm run dev
Production
npm run build
npm run start
What is expected ?
.wasm file to have the same content-type on development and production
What is actually happening?
The content-type on development(application/wasm) is different from production(application/octet-stream)
Additional comments?
I'm not so sure if that's an Nuxt issue if it's not i would appreciate some reference to the problematic package.

This bug report is available on Nuxt.js community (#c7104)

Test

Seems related to https://github.com/expressjs/serve-static/issues/99 (found by @clarkDu)

authors: Atinux ForzaNikolay


text:
Nuxt hot reload recompile too many times

Version
v2.10.2
Reproduction link
https://jsfiddle.net/d8yugmsn/
Steps to reproduce
edit any file and the cli and save
What is expected ?
The hot reload start one compilation of the project
What is actually happening?
The hot reload start one compilation and then, when it has done, start another compilation due to a modification of a file in node_modules/.cache/babel-loader folder. It recompiles another time if there is a change in the .idea folder (eg workspace.xml)

This bug report is available on Nuxt community (#c10026)

Provide a full reproduction, not just nuxt config.

authors: aldarund asterd


text:
[Docs] Add minimal nuxt version to feature/utility - may be a label or a badge

Describe the feature
Nuxt 3.9 introduced new utility called callOnce. https://nuxt.com/docs/api/utils/call-once
However, if you are reading that page you have no idea that Nuxt 3.9 is required in order to use that utility. Maybe it would be possible to mark minimal nuxt version for a feature to work? It can be implemented as a badge or label.
This information can be:

"global" for whole docs page, providing minimalVersion inside frontmatter
"local" for newly introduced feature extending functionality like getCachedData for useFetch (Nuxt 3.8 if I remember correctly?) https://nuxt.com/docs/api/composables/use-fetch#params

I believe that simple :badge[v3.9] from Docus is more than enough
Additional information

[ ] Would you be willing to help implement this feature?
[ ] Could this feature be implemented as a module?

Final checks

[X] Read the contribution guide.
[X] Check existing discussions and issues.

A great idea - and @Atinux and I have already talked about this...
If we can't automate it, then it would be nice to annotate.

I remember this was a topic a few times ago and I'm also all for it. Helpful for upgrading versions or when new (future) features are committed but not released yet 👍🏻

@Atinux not sure if that fully closes the issue as documenting the "first version available" of most features would be nice.

callOnce was just an example of how important it is to provide minimal version info across every feature. I understand that it would be impossible to keep versioning whole docs to each nuxt version for various reasons, so this is why a small notice would be helpful.
Small projects can often be up-to-date, but when we talk about large-scale apps with a lot of dependencies it is not so obvious that they can be updated on day 1.

Sure thing! Happy to re-open it as we can improve the docs along the way for each composable / feature with the minimal version associated to it 👍

Linking https://github.com/nuxt/nuxt/issues/23189

Hello, this is a great idea! I remember when developing with WordPress they used @since annotations in the docblock. See, for example, the get_block_asset_url function in WordPress. It has an annotation here saying @since 6.4.0 which then shows up in the changelog and also allows for aggregating changes in versions.
It would be easy enough to add @since JSDoc annotations moving forward. It would be time consuming but not too difficult to look back through the changelogs of releases to see when new functions were added. The docs build would need updating to read and reference the versions.

@luc122c An @since would be a nice start, especially because of the utilization for auto-generation. It might not work for everything though (e.g. not for components).

e.g. not for components

@manniL  I've just had a play and although the JSDoc does not show in the IDE, the annotation does carry across to the definition file. Perhaps this is something that could be picked up by an extension (e.g. Volar or Nuxtr)?

I've started adding @since annotations in #25086; please let me know if I'm on the right track! :)
I've also had a look at how the documentation works, but I'm not sure where we can hook in to read this info and inject it into the docs? I see there are hooks available in unbuild but I'm not sure what they are, or if that's even the right place?

Roadmap for completing this issue:

[ ] Add @since annotations to composables #25086
[ ] Add lint rules to catch missing annotations
[ ] Add badges to docs

Please let me know if there are any additional requests/ideas (e.g. annotating components)

authors: Atinux danielroe luc122c manniL mkierdev warflash

repo: nuxt/nuxt


text:
SEO Metadata not updated in source code with nuxt 3

Environment

Operating System: Windows_NT
Node Version:     v18.19.0
Nuxt Version:     3.11.0
CLI Version:      3.10.1
Nitro Version:    2.9.4
Package Manager:  npm@10.2.3
Builder:          -
User Config:      ssr, devtools, app, vite, css, modules, hooks, build, runtimeConfig
Runtime Modules:  @pinia/nuxt@0.4.11, nuxt-icons@3.2.1, ()
Build Modules:    -

Reproduction
N/A
Describe the bug
Hi,
I want to have some SEO metadata on my nuxt 3 project. I have the following nuxt.config.ts :
export default defineNuxtConfig({
  ssr: false,
  devtools: { enabled: true },
  app: {
    head: {
      title: 'Connexion...',
      meta: [
        { charset: 'utf-8' },
        { name: 'viewport', content: 'width=device-width, initial-scale=1' },
        { hid: 'description', name: 'description', content: 'mywebsite' },
        { hid: 'og:title', name: 'og:title', content: 'test title' },
        { hid: 'og:description', name: 'og:description', content: 'my website' },
        { hid: 'og:type', name: 'og:type', content: 'website' },
        { hid: 'og:url', name: 'og:url', content: '/' },
        { hid: 'og:image', name: 'og:image', content: '/' },
        { hid: 'og:site_name', name: 'og:site_name', content: 'test title' },
        { hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },
        { hid: 'twitter:site', name: 'twitter:site', content: '@test' },
        { hid: 'twitter:title', name: 'twitter:title', content: 'test title' },
        { hid: 'twitter:description', name: 'twitter:description', content: 'my website' },
        { hid: 'twitter:creator', name: 'twitter:creator', content: '@test' },
        { hid: 'og:image', name: 'og:image', content: '/' },

      ],
      link: [
        { rel: 'icon', type: 'image/png', href: '/favicon.png' }
      ],
      script: [
        ...
      ]
    },
  },

So I have some metadata in my source code (on all pages) that are fixed. I can see them when I select "view source code" on chrome. What I want is for each page to have their own metadata, and I want the source code to change accordingly.
For example, in Home.vue
<template>
 <div>
   Hello world
 </div>
</template>

<script>
export default defineNuxtComponent({
 setup() {
  useSeoMeta({
    title: 'My Amazing Site',
    ogTitle: 'My Amazing Site',
    description: 'This is my amazing site, let me tell you all about it.',
    ogDescription: 'This is my amazing site, let me tell you all about it.',
    ogImage: 'https://example.com/image.png',
    twitterCard: 'summary_large_image',
 })
}

})
</script>

I would expect the title, description, and so on... to change, and it does but not in the source code of the page. On the source code it's still the default metadata that i definied in nuxt.config.ts I have tried to use useHead but it's the same result.
Additional context
No response
Logs
No response

When not using SSR (ssr: false), the values won't change in the HTML as your code only runs on the client side.

It was working fine in nuxt 2, it's just not the case anymore in nuxt 3 ?

The behavior should be similar in Nuxt 2.
While the data will be updated in the client (in Nuxt 2 and Nuxt 3), crawlers won't be able to get the data from the initial HTML, so for example og tags won't be taken into account.

The behavior should be similar in Nuxt 2. While the data will be updated in the client (in Nuxt 2 and Nuxt 3), crawlers won't be able to get the data from the initial HTML, so for example og tags won't be taken into account.

I have exactly the same problem as yours. I got data from requests and assigned by useSeoMeta. the FB or LINE can not get the og:image & og:title. It seems dynamic seo meta is not working, or crawlers can only get the static data.

The behavior should be similar in Nuxt 2. While the data will be updated in the client (in Nuxt 2 and Nuxt 3), crawlers won't be able to get the data from the initial HTML, so for example og tags won't be taken into account.

I have exactly the same problem as yours. I got data from requests and assigned by useSeoMeta. the FB or LINE can not get the og:image & og:title. It seems dynamic seo meta is not working, or crawlers can only get the static data.

Nothing is broken here. This is a downside of not using SSR.

authors: aquerol2 manniL withgogo


text:
The requested module 'node_modules/dayjs/plugin/weekOfYear.js?v=e2bd8455' doesn't provide an export named: 'default'

Environment

Operating System: Linux
Node Version:     v20.17.0
Nuxt Version:     3.13.2
CLI Version:      3.13.2
Nitro Version:    2.9.7
Package Manager:  yarn@1.22.22
Builder:          -
User Config:      ssr, devServer, app, plugins, runtimeConfig, modules, antd, eslint, css, imports, postcss, vite, auth, experimental, router, compatibilityDate
Runtime Modules:  @nuxt/eslint@0.5.7, @nuxt-alt/auth@3.1.7, @ant-design-vue/nuxt@1.4.2, @pinia/nuxt@0.5.4
Build Modules:    -

Reproduction
upgrade to Nuxt 3.13.2 by running npx nuxi@latest upgrade --force
Describe the bug
Hey guys, I upgraded to Nuxt 3.13.2 and I kept having below error. I tried reverting back to 3.13.1 and everything continue to works fine, please check.
[nuxt] error caught during app initialization Error: The requested module 'http://localhost:6100/_nuxt/node_modules/dayjs/plugin/weekOfYear.js?v=e2bd8455' doesn't provide an export named: 'default'
Additional context

Logs
No response

nuxt-antv.zip
类似问题：The requested module '/_nuxt/node_modules/dayjs/plugin/advancedFormat.js?v=eafb9efd' does not provide an export named 'default'

Hope this helps,
I just tried this code given by amihhs
https://github.com/nuxt/nuxt/issues/14716#issuecomment-1397364211
By adding this in your nuxt.config.ts
alias: {
    'dayjs': 'dayjs/esm/'
  },

Personally I used the code below, since the above mentioned will cause an error on yarn build which returns an errors mentioning that it will result in "duplicated modules".
alias: {
    'dayjs': 'dayjs'
  },

authors: Ahmard MarkCalderon yangyixuan


text:
fix(tpc): directly import schema from valibot

🔗 Linked issue
fix #133

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
@harlan-zw is there a reason to have #nuxt-scripts-utils if it only exports everything from valibot ?

We use the alias to make sure we stub out the valibot exports outside of dev. For some reason, I couldn't get them to tree shake out otherwise.
It shouldn't cause an issue though? All of the other registry scripts are using it without issue :thinking:

authors: harlan-zw huang-julien

repo: nuxt/scripts


text:
Problem with error message translations if use valibot in form

Environment

Node Version:     v20.11.1
Nuxt Version:     3.11.2
CLI Version:      3.11.1
Nitro Version:    2.9.6
Package Manager:  pnpm@8.15.6
Builder:          -
User Config:      telemetry, ssr, app, spaLoadingTemplate, extends, css, modules, ui, i18n, devtools, devServer
Runtime Modules:  @nuxt/ui@2.16.0, @nuxt/fonts@0.6.1, @vueuse/nuxt@10.9.0, nuxt-lodash@2.5.3, @nuxtjs/i18n@8.3.1, @pinia/nuxt@0.5.1, nuxt-zod-i18n@1.7.0
Build Modules:    -

Version
v2.16.0
Reproduction
https://stackblitz.com/edit/nuxt-starter-cf4613?file=app.vue
Description
Hello! 👋  Thanks for package!
I very likes use Nuxt Ui / Pro in my projects !
I use valibot in forms and set globally translation. ( please see reproduction )
Expected behavior: after set globally translation language in valibot, issues message shows in set globally lang
Actual behavior: issues message shows in default language "en"
Under the hood we used ._parse method
#https://github.com/nuxt/ui/blob/main/src/runtime/components/forms/Form.vue
Please see string 263.
fabian-hiller says:

._parse is an internal API and should not be used directly. If you parse your schema with parse or safeParse, it should work as expected: https://valibot.dev/guides/parse-data/

For this reason we don't get messages with current translation.
Issue in valibot repo: https://github.com/fabian-hiller/valibot/issues/576
Please help with this problem, or if need i can try solve this problem and send new pull request!
Additional context
No response
Logs
No response

Tagging  @fabian-hiller for feedback

Short explanation: Valibot captures the configuration when calling parse and safeParse and then passes it to ._parse. Since ._parse is called directly, the global configuration is probably ignored. I am happy to help with any questions.

This should be fixed by https://github.com/nuxt/ui/pull/1848 and wrapping your schema in v.safeParser.

authors: fabian-hiller ncodealex romhml

repo: nuxt/ui


text:
Graphs & charts

Description
It would be nice if you could add the possibility to create graphs and charts.
Additional context
No response

Creating graphs & charts is really complicated and there are lots of other libraries that have been doing this for years like https://github.com/apertureless/vue-chartjs, we are not planning to add this in @nuxt/ui.

Hey @benjamincanac  it would be easier for me as a user accessing the charts also from nuxt ui. The one you talked about does not look good honestly and integrating some like https://github.com/radix-vue/shadcn-vue sucks . The Nuxt UI having all component will be easier and more convenient  for the user.

I've been having a good experience with https://unovis.dev/ when building the Nuxt UI Pro - Dashboard template (https://github.com/nuxt-ui-pro/dashboard) so we might do something on top of this once v3 is out 😊

Just wanted to add onto this:
I also believe this will be an incredible thing to add. Having a centralized UI library designed for Nuxt is already great because of all the Nuxt-exclusive optimizations that are possible to be made which other libraries cannot benefit from. Having said UI library be as extensive and thorough as possible would ensure that with these Nuxt specific optimizations there will not be a need for additional external design libraries, which will increase bundle size and may not benefit from all the Nuxt-exclusive optimizations due to them not being Nuxt-exclusive.

Would be awesome to have this

authors: GalacticHypernova benjamincanac dynamic2code martinjdlabs negativems


text:
Feature(Modal):Center Modal

Feature(Modal):Center Modal
🔗 Linked issue

❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[X ] 👌 Enhancement (improving an existing functionality)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
I just update the tailwind classes to center the modal on mobile devices
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

The modal is already centered starting at the sm breakpoint, you can override this behavior in your app.config.ts.

@benjamincanac Thank you

authors: benjamincanac dc-vibishi


text:
可不可以添加全球所有的国家？

大家好：
可不可以添加全球所有的国家？

非常需要这个功能。。。

repo: nuysoft/Mock


text:
🛑 NVIDIA AI Enterprise Hub is down

In 2d68c11, NVIDIA AI Enterprise Hub (https://nvaie.lab.novaglobal.com.sg) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NVIDIA AI Enterprise Hub is back up in ae62164.

repo: nvgsg/lab-upptime


text:
Fix #796 and close #797

If there are errors loading nvim-base16, the setup_base16() call will throw an error instead of returning defaults. This has the effect of falling back to the 'auto' theme, allowing the colorscheme to remain more consistent with the existing theme as opposed to using a default that doesn't match the exising theme.
This solution also addresses the discussion in #797.

Doesn't seem like this commit fails the tests. Every PR since about 3 weeks ago seem to fail the these two tests with the same issue.


text:
Context is lost when archiving headline with level >1

Describe the bug
Archiving a headline should add context, that is, the various ARCHIVE_ properties defined in https://github.com/nvim-orgmode/orgmode/blob/d2fde796eec52d9ecc4ac045a6d1b3bff83cbfe7/lua/orgmode/capture/init.lua#L288-L292
Since edc3ceb, this does not work anymore for headlines of level 2 or greater. It seems the culprit is https://github.com/nvim-orgmode/orgmode/blob/d2fde796eec52d9ecc4ac045a6d1b3bff83cbfe7/lua/orgmode/capture/init.lua#L176-L178 - the original lines including the archive props is overwritten with (promoted) lines based on the headline only, so the archive prop lines are lost.
Steps to reproduce

Open nvim (with the minimal init.lua)
Create the file foo.org containing* bar
** TODO baz

If it is not already there, move the cursor into the second line (the "baz" line)
Press <Leader>o$ to trigger archiving the baz-headline.
Open foo.org_archive. It contains* TODO baz

Expected behavior
foo.org_archive should contain
* TODO baz
  :PROPERTIES:
  :ARCHIVE_TIME: <current timestamp>
  :ARCHIVE_FILE: </path/to/foo.org>
  :ARCHIVE_CATEGORY: foo'
  :ARCHIVE_TODO: TODO'
  :END:

Emacs functionality
I have not tested this, but presume since it worked previously with nvim-orgmode, it works in Emacs as it had worked in nvim-orgmode.
Minimal init.lua
(Just the provided template)
local tmp_dir = vim.env.TMPDIR or vim.env.TMP or vim.env.TEMP or '/tmp'
local nvim_root = tmp_dir .. '/nvim_orgmode'
local lazy_root = nvim_root .. '/lazy'
local lazypath = lazy_root .. '/lazy.nvim'

-- Install lazy.nvim if not already installed
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    'git',
    'clone',
    '--filter=blob:none',
    'https://github.com/folke/lazy.nvim.git',
    '--branch=stable', -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require('lazy').setup({
  {
    'nvim-orgmode/orgmode',
    event = 'VeryLazy',
    ft = { 'org' },
    config = function()
      require('orgmode').setup()
    end,
  },
}, {
  root = lazy_root,
  lockfile = nvim_root .. '/lazy.json',
  install = {
    missing = false,
  },
})

require('lazy').sync({
  wait = true,
  show = false,
})

Screenshots and recordings
No response
OS / Distro
macOS 14.5
Neovim version/commit
0.11.0-dev-18+g63e3a63d2
Additional context
I have started writing a test to demonstrate this , it can be applied with patch -p1 < test_archiving_with_context.patch (on master as of d2fde79):
test_archiving_with_context.patch
Note the test is not complete, in particular, the precise content of the archive properties is not checked. But at least it should be sufficient to demonstrate the problem.
Edit: Fix links to code

Thank for reporting. Should be fixed on latest master.

Thank you for the fast response, I can confirm it works now. 👍

authors: andreaswachowski kristijanhusak

repo: nvim-orgmode/orgmode


text:
@call.inner throws an error

Describe the bug
I got this error when trying to use @call.inner
E5108: Error executing lua: /usr/share/nvim/runtime/lua/vim/treesitter.lua:204: node: expected userdata, got table
stack traceback:
        [C]: in function 'error'
        vim/shared.lua: in function 'validate'
        /usr/share/nvim/runtime/lua/vim/treesitter.lua:204: in function 'is_in_node_range'
        ...r-textobjects/lua/nvim-treesitter/textobjects/shared.lua:85: in function 'best_match_at_point'
        ...r-textobjects/lua/nvim-treesitter/textobjects/shared.lua:223: in function 'textobject_at_point'
        ...r-textobjects/lua/nvim-treesitter/textobjects/select.lua:103: in function 'select_textobject'
        ...r-textobjects/lua/nvim-treesitter/textobjects/select.lua:184: in function <...r-textobjects/lua/nvim-treesitter/textobjects/select.lua:183
>

To Reproduce
Steps to reproduce the behavior:

Open any file which has treesitter support
Use @call.inner binding

Expected behavior
No errors when using the textobject
Output of :checkhealth nvim-treesitter

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~

OK tree-sitter found 0.20.7 (parser generator, only needed for :TSInstallFromGrammar)
OK node found v19.7.0 (only needed for :TSInstallFromGrammar)
OK git executable found.
OK cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: cc (GCC) 12.2.1 20230201
OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
machine = "x86_64",
release = "6.2.2-arch1-1",
sysname = "Linux",
version = "#1 SMP PREEMPT_DYNAMIC Fri, 03 Mar 2023 15:58:31 +0000"
} ~
Parser/Features         H L F I J

bash                ✓ ✓ ✓ . ✓
c                   ✓ ✓ ✓ ✓ ✓
cmake               ✓ . ✓ . .
comment             ✓ . . . .
cpp                 ✓ ✓ ✓ ✓ ✓
css                 ✓ . ✓ ✓ ✓
dockerfile          ✓ . . . ✓
gitcommit           ✓ . . . ✓
go                  ✓ ✓ ✓ ✓ ✓
graphql             ✓ . . ✓ ✓
html                ✓ ✓ ✓ ✓ ✓
java                ✓ ✓ . ✓ ✓
javascript          ✓ ✓ ✓ ✓ ✓
json                ✓ ✓ ✓ ✓ .
kotlin              ✓ ✓ ✓ . ✓
latex               ✓ . ✓ . ✓
lua                 ✓ ✓ ✓ ✓ ✓
markdown            ✓ . ✓ . ✓
markdown_inline     ✓ . . . ✓
meson               ✓ . ✓ . ✓
nix                 ✓ ✓ ✓ . ✓
norg                . . . . .
pascal              ✓ ✓ ✓ ✓ ✓
php                 ✓ ✓ ✓ ✓ ✓
python              ✓ ✓ ✓ ✓ ✓
rust                ✓ ✓ ✓ ✓ ✓
sql                 ✓ . . . ✓
toml                ✓ ✓ ✓ ✓ ✓
typescript          ✓ ✓ ✓ ✓ ✓
vim                 ✓ ✓ ✓ . ✓
yaml                ✓ ✓ ✓ ✓ ✓
zig                 ✓ . ✓ ✓ ✓

Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~

Output of nvim --version
NVIM v0.9.0-dev-1165+g0e7edd70a9
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/usr/include/luajit-2.1 -I/usr/include -I/usr/include -I/home/User/.cache/yay/neovim-git/src/build/src/nvim/auto -I/home/User/.cache/yay/neovim-git/src/build/include -I/home/User/.cache/yay/neovim-git/src/build/cmake.config -I/home/User/.cache/yay/neovim-git/src/neovim/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

Additional context
Add any other context about the problem here.

I made a hotfix PR (#411), but it looks like this upstream PR (https://github.com/neovim/neovim/pull/22582) will fix this issue. We can maybe wait for a day or two.

authors: ibldzn kiyoon


text:
fix(v): reflect new comment structure in parser

This change fixes the CI issue related to V

We really need some better integration CI between the different repos...

100%


text:
MultiMiner Not Starting

When I open MultiMiner I just see the MultiMiner icon for a split second , then it just closes. I am using the Mac version with XQuartz and Mono.

I seem to have the same problems....

Check the Windows Event Viewer for additional details related to the problem. Also ensure that MultiMiner is not open in the notification area.

I'm on OSX so was using the app....

Please see the instructions, including troubleshooting, for OS X here:
https://github.com/nwoolls/MultiMiner/wiki/Installation#mac-os-x

Sadly months later I'm still having this issue.  I'm hoping it's my own ignorance, but I followed all linked instructions and have attempted this on three different versions of Mac OSX since mid-10.8

And it's still here
Davids-MacBook-Pro:~ kioltk$ cd ~/Desktop/MultiMiner.app/Contents/Resources
Davids-MacBook-Pro:Resources kioltk$ mono MultiMiner.Win.exe
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: libgdiplus.dylib
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Drawing.KnownColors..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Drawing.Color.get_Black () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.ThemeVisualStyles..ctor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0
  at MultiMiner.Win.Forms.MessageBoxFontForm..ctor () [0x00000] in <filename unknown>:0
  at MultiMiner.Win.Forms.MinerForm..ctor () [0x00000] in <filename unknown>:0
  at (wrapper remoting-invoke-with-check) MultiMiner.Win.Forms.MinerForm:.ctor ()
  at MultiMiner.Win.Program.RunApplication () [0x00000] in <filename unknown>:0
  at MultiMiner.Win.Program.Main () [0x00000] in <filename unknown>:0

On MAC OS, open finder, right click on Multiminer application. Select "show contents". This should open up "Contents" file in finder. Select "Contents", then select "Mac OS", then right click on "Multiminer.exe" and select "open with...". Try to open this file with the terminal. This is the only way I can get multiminer to run on a Mac so far. Still acts kinda buggy. Good luck!

Please try the latest release - there are several issues addressed when starting the app on macOS.

Please reopen if this is still occurring with the latest version.

authors: BigMammasWhistleStop Raginglikeaboss crackfoo gamizard kioltk nwoolls

repo: nwoolls/MultiMiner


text:
Fixed command failed when running in graph daemon

Currently when the plugin runs from within the daemon that Nx runs to efficiently process changes to the dependency graph the plugin will throw an error like so in node_modules/.cache/nx/d/daemon.log:
stat /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/daemon/client/apps/api/main.go: directory not found
Error: Command failed: go list -json ./apps/api/main.go
stat /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/daemon/client/apps/api/main.go: directory not found

    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:902:15)
    at getGoDependencies (/path/to/workspace/node_modules/.pnpm/@nx-go+nx-go@2.1.0/node_modules/@nx-go/nx-go/src/go-package-graph/index.js:37:60)
    at /path/to/workspace/node_modules.pnpm/@nx-go+nx-go@2.1.0/node_modules/@nx-go/nx-go/src/go-package-graph/index.js:18:68
    at Array.map (<anonymous>)
    at Object.processProjectGraph (/path/to/workspace/node_modules/.pnpm/@nx-go+nx-go@2.1.0/node_modules/@nx-go/nx-go/src/go-package-graph/index.js:18:14)
    at /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:215:27
    at Array.reduce (<anonymous>)
    at updateProjectGraphWithPlugins (/path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:213:28)
    at /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/build-project-graph.js:87:19 {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'stat /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/daemon/client/apps/api/main.go: directory not found\n'
  ],
  pid: 1445,
  stdout: '',
  stderr: 'stat /path/to/workspace/node_modules/.pnpm/@nrwl+workspace@13.8.1_95b412ae97cf96e9f43494b4913c978e/node_modules/@nrwl/workspace/src/core/project-graph/daemon/client/apps/api/main.go: directory not found\n'
}
Failed to process the project graph with "@nx-go/nx-go". This will error in the future!

I have tested this with other package managers and the issue is consistent.

Thanks @phillipCouto!

This has been released as @nx-go/nx-go@2.2.0 🥳. Thanks!

authors: beeman phillipCouto

repo: nx-go/nx-go


text:
Stop instances of DOM Node being wrapped as it throws a TypeError

Stop instances of DOM Node being wrapped as it throws a TypeError when accessing it via Reflect.get

Nice catch 👍. Could you change the implementation to adding [Node.prototype, false] to this map?
Reasoning: most built-in objects break with Proxies, because of their internal slots. This is the central place where you can opt-out from Proxy wrapping (with false) or add special instrumentation - if it makes sense - before the Proxying to avoid the errors. I am pretty sure people will find more breaking built-ins in the future.
Another note: please check for the existence of the global Node object before you use it. The library should work with NodeJS. (Something like if typeof Node === 'function' -> map.add([Node.prototype, false])).
The test is awesome as it is 🙂
Thanks for the PR! I can merge and release right after these changes.

Unfortunately, I already saw and tried adding it to the map but they're not direct implementations of Node.
For example, document is an instance of HTMLDocument which inherits from Document which inherits from Node.
i.e.
Object.getPrototypeOf(document) !== Node.prototype
(document instanceof Node) === true
I'll change that typeof check though, forgot to actually try that syntax worked on Nodejs.

Merged and released v3.1.4 with it. You are totally right about the prototype/instanceof thing. I will make that a bit more robust with the next major release.
Thanks for the help! 👍

authors: devgrok solkimicreb

repo: nx-js/observer-util


text:
Download files via HTTP (e.g. urllib)

I can't seem to find a way to download files via HTTP. I wanted to use urllib, but I get OSError: [Errno 93] when it tries to connect

Сan you check if urllib works for you now?

I don't have the environment set up to compile on my Mac OS X; would you mind compiling and sending the binaries? Or are there simple instructions to set up the dependencies to compile on Mac OS X?

https://www.dropbox.com/sh/6gtc6w91c16wpiz/AABk3JrGca7kZuZVEurnjiysa?dl=0

Great, thanks! I won't be home for another two days, but I'll test it out and let you know once I'm back!

It works great!!! Thanks so much!

authors: elnardu niemasd

repo: nx-python/PyNX

license: ISC


text:
UNRESOLVED_IMPORT warning when importing libs from the same Nx workspace

I have a Nx workspace with 1 app and 6 libs (4 of which were generated using @nxext/stencil):

MyApp
MainLib (stencil)
LibA (stencil)
LibB (stencil)
LibC (stencil)
Utils
Types

MainLib is dependent on LibA and LibB.
When building MainLib I get this error for both LibA and LibB:
Bundling Warning UNRESOLVED_IMPORT
'@bv0012/lib-a' is imported by
../../../libs/main-lib/src/theme/component-map.ts, but could
not be resolved – treating it as an external dependency

There are no inline errors in component-map.ts and my tsconfig.json paths property looks like this:
"paths": {
      "@bv0012/main-lib": ["libs/main-lib/src/components.d.ts"],
      "@bv0012/main-lib/*": ["libs/main-lib/src/*"],
      "@bv0012/main-lib/loader": ["dist/libs/main-lib/loader"],
      "@bv0012/main-lib/react": [
        "dist/libs/generated/main-lib/react/src/components.ts"
      ],
      "@bv0012/types": ["libs/types/src/index.d.ts"],
      "@bv0012/utils": ["libs/utils/src/index.ts"],
      "@bv0012/lib-a": ["dist/libs/lib-a"],
      "@bv0012/lib-b": ["dist/libs/lib-b"],
      "@bv0012/lib-c": ["dist/libs/lib-c"]
    }

I'm pointing the lib paths to dist/ because they're publishable.
I feel like this is a node-resolve issue but I haven't had any success debugging it so far.

My current workaround is to npm link each libs dist directory and then npm link @bv0012/lib-ain the root directory and remove the paths for those libs fromtsconfig.json`

I also found out that even though lib-a and lib-b are not bundled with main-lib, the app that depends on main-lib is able to resolve the dependencies correctly without using npm link.

Here's a minimal reproduction.
Run nx build lib-a followed by nx build main-lib to see the issue.

It seems that path mappings are not supported out of the box by the stencil compiler which seems to be using rollup. There are dedicated Rollup plugins for that issue:
https://github.com/bitshiftza/rollup-plugin-ts-paths
https://github.com/simonhaenisch/rollup-plugin-typescript-paths
https://github.com/Mutefish0/rollup-plugin-typescript-path-mapping/blob/master/index.js
However, in context of Nx we have the additional challenge, that the app is built with apps/my-app/tsconfig.json but the path mappings are configured in the root tsconfig.json  (which the app-specific tsconfig.json extends).
If the Rollup plugin uses the root config, the root path does not match the app path and the module resolution fails.
If the Rollup plugin uses the app config, the plugins would have to resolve the extends reference to know about the path mappings in the root config, which none of the plugins seem to be capable of.

I spent the afternoon on a PR for rollup-plugin-typescript-paths and got the extends part working (simonhaenisch/rollup-plugin-typescript-paths#5). However, I noticed too late, that the plugin runs after TypeScript compilation:

It assumes that your Typescript code has already been transpiled before being rolled up

Which means that path mappings that reference the index.ts file of a lib won't work (as they are currently generated by the @nxext/stencil plugin):
    "baseUrl": ".",
    "paths": {
      "@my-org/my-lib": [
        "libs/my-lib/src/index.ts"
      ],
      "@my-org/my-lib/loader": [
        "dist/libs/my-lib/loader"
      ]
    }

@luchsamapparat thank you for sharing your investigation!
FWIW I'm on Mac OS.
I found that the changes introduced in the PR you mentioned were subsequently removed in this PR which has a lot of changes but very little context and has something to do with removing the legacy compiler.
I don't know if they were incorporated into another file because it's a large PR.

I did a quick check yesterday and created a new project with npm init stencil. I added "@foo": "src/some-file.ts" as path mapping to the generated tsconfig and then added an import for @foo to the generated component - and it worked 🤔

@luchsamapparat thanks for your help.
Sorry for the late response, I'm at holidays right now.
I'll take a look at soon as I can

@DominikPieper no problem, enjoy your holiday :)
@luchsamapparat I'm not seeing an issue with paths like your example. It's when the path is pointing to a build dir, e.g. "@bv0012/lib-a": ["dist/libs/lib-a"].
I did the same quick check using npm init stencil but with a path like above and I still see Bundling Warning UNRESOLVED_IMPORT.
I haven't tried using rollup-plugin-typescript-paths yet, it's on my todo list.

This is my stencil-only test for path mappings: https://github.com/luchsamapparat/stencil-path-mapping
[tsconfig.json](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/tsconfig.json#L20)
    "paths": {
      "@foo": [
        "src/util.ts"
      ]
    }

[src/util.ts](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/src/util.ts)
export const foo = 'bar';

[src/components/app-home/app-home.tsx](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/src/components/app-home/app-home.tsx#L14)
        <h1>{foo}</h1>

No warning in my console:
❯ npm start

> playground-stencil@0.0.1 start {...}\stencil-path-mapping
> stencil build --dev --watch --serve

[23:05.9]  @stencil/core v1.12.2
[23:10.4]  build, app, dev mode, started ...
[23:10.5]  transpile started ...
[23:13.8]  transpile finished in 3.29 s
[23:13.8]  copy started ...
[23:13.8]  generate lazy started ...
[23:14.2]  copy finished (3 files) in 459 ms
[23:15.6]  generate lazy finished in 1.78 s
[23:15.6]  build finished, watching for changes... in 5.16 s

[23:15.6]  http://localhost:3333/

@hnipps Ah, then Stencil probably didn't implement the module resolution, that TypeScript is perfoming, which is quite complex:
https://github.com/microsoft/TypeScript/blob/2c08affa0d0d7fc55f15ab22e0326b93326d21d8/src/compiler/moduleNameResolver.ts#L927
https://github.com/microsoft/TypeScript/blob/2c08affa0d0d7fc55f15ab22e0326b93326d21d8/src/compiler/moduleNameResolver.ts#L1165
Maybe it's worth an issue in Stencil...?

Okay, now I'm back and looked into this. I'll do some experiments as well. The ugly/fastes solution could be using rollup again to bundle the libs. The @nrwl/web plugin does this, cause you can request the dependency tree und bundle up then. I'll try some more with the stencil compiler but maybe that's an workaround

Hey guys, finally I had some time to investigate deeper into this. Right now I try to find a solution for buildable libs. Trying with stencil 2.0 (maybe something fixed in the meantime) if I export the components I want to use in the libraries index.ts instead of the generated components.d.ts file it works ootb. I'll change the default template for not buildable libraries I think, to work here like the angular builders.

Unfortunately, the new version brings in a half solution—there a now the concept of buildable and not buildable libraries like in the Angular plugins. Import from not buildable plugins works well (just typescript doing some work here) but buildable libs, there's not a solution yet :-(

i was able to solve this by updating paths in tsconfig.base.json to this:
"paths": {
  "@cool-app/component-a": ["dist/libs/component-a/dist"],
  "@cool-app/component-b": ["dist/libs/component-b/dist"],
  "@cool-app/component-c": ["dist/libs/component-c/dist"],
  "@package": ["package.json"]
}

and by importing the packages in the global script:
import '@cool-app/component-a';
import '@cool-app/component-b';
import '@cool-app/component-c';

export default async () => {
  /**
   * The code to be executed should be placed within a default function that is
   * exported by the global script. Ensure all of the code in the global script
   * is wrapped in the function() that is exported.
   */
};

it feels wrong, but it works and doesn't appear to break the dependency graph

i was able to solve this by updating paths in tsconfig.base.json to this:
"paths": {
  "@cool-app/component-a": ["dist/libs/component-a/dist"],
  "@cool-app/component-b": ["dist/libs/component-b/dist"],
  "@cool-app/component-c": ["dist/libs/component-c/dist"],
  "@package": ["package.json"]
}

and by importing the packages in the global script:
import '@cool-app/component-a';
import '@cool-app/component-b';
import '@cool-app/component-c';

export default async () => {
  /**
   * The code to be executed should be placed within a default function that is
   * exported by the global script. Ensure all of the code in the global script
   * is wrapped in the function() that is exported.
   */
};

it feels wrong, but it works and doesn't appear to break the dependency graph

authors: DominikPieper hnipps luchsamapparat superpezgeek

repo: nxext/nx-extensions


text:
Cannot find module 'nx/src/utils/app-root'

I am trying to create an NX monorepo for an ionic react app I am building.
I create the nx workspace like so:
npx create-nx-workspace my-org --preset=empty
Then I installed installed the required dependencies:
npm install --save-dev --exact @nxtend/ionic-react @nxtend/capacitor @nrwl/react
Finally I am trying to generate my ionic-react app using the following command:
nx generate @nxtend/ionic-react:application myApp
However I am getting the following error:
>  NX  Generating @nxtend/ionic-react:application

✔ Which starter template would you like to use? · tabs
Cannot find module 'nx/src/utils/app-root'
Require stack:
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/@nxtend/ionic-react/node_modules/@nrwl/devkit/index.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/@nxtend/ionic-react/src/generators/application/generator.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/nx/src/config/workspaces.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/nx/src/command-line/generate.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/nx/src/command-line/nx-commands.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/nx/bin/init-local.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/nx/bin/nx.js
- /Users/jeffstapleton/Documents/Github/integrations-front-end/node_modules/@nrwl/cli/bin/nx.js
- /Users/jeffstapleton/.nvm/versions/node/v14.15.0/lib/node_modules/nx/node_modules/@nrwl/cli/bin/nx.js
- /Users/jeffstapleton/.nvm/versions/node/v14.15.0/lib/node_modules/nx/bin/nx.js

For the sake of being thurough I will include my entire package.json here in case the problem is with my specific version:
{
  "name": "integrations-front-end",
  "version": "0.0.0",
  "license": "MIT",
  "scripts": {
    "start": "nx serve",
    "build": "nx build",
    "test": "nx test"
  },
  "private": true,
  "dependencies": {
    "@capacitor/core": "3.5.1",
    "@ionic/react-router": "6.1.9",
    "@testing-library/jest-dom": "5.16.4",
    "@testing-library/react": "13.3.0",
    "@testing-library/user-event": "14.2.0",
    "@types/jest": "28.1.1",
    "@types/node": "17.0.41",
    "@types/react": "18.0.12",
    "@types/react-dom": "18.0.5",
    "@types/react-router": "5.1.18",
    "@types/react-router-dom": "5.3.3",
    "ionicons": "6.0.2",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-router": "6.3.0",
    "react-router-dom": "6.3.0",
    "react-scripts": "5.0.1",
    "typescript": "4.7.3",
    "web-vitals": "2.1.4",
    "workbox-background-sync": "6.5.3",
    "workbox-broadcast-update": "6.5.3",
    "workbox-cacheable-response": "6.5.3",
    "workbox-core": "6.5.3",
    "workbox-expiration": "6.5.3",
    "workbox-google-analytics": "6.5.3",
    "workbox-navigation-preload": "6.5.3",
    "workbox-precaching": "6.5.3",
    "workbox-range-requests": "6.5.3",
    "workbox-routing": "6.5.3",
    "workbox-strategies": "6.5.3",
    "workbox-streams": "6.5.3",
    "@ionic-native/core": "5.36.0",
    "@ionic-native/splash-screen": "5.36.0",
    "@ionic-native/status-bar": "5.36.0",
    "@ionic/react": "6.1.9",
    "@nrwl/workspace": "14.2.4"
  },
  "devDependencies": {
    "@capacitor/android": "3.5.1",
    "@capacitor/cli": "3.5.1",
    "@capacitor/ios": "3.5.1",
    "@nrwl/cli": "14.2.4",
    "@nrwl/cypress": "14.2.4",
    "@nrwl/eslint-plugin-nx": "14.2.4",
    "@nrwl/jest": "14.2.4",
    "@nrwl/linter": "14.2.4",
    "@nrwl/nx-cloud": "latest",
    "@nrwl/react": "^14.2.4",
    "@nrwl/tao": "14.2.4",
    "@nrwl/workspace": "14.2.4",
    "@nxtend/capacitor": "^13.0.0",
    "@nxtend/ionic-react": "^13.0.0",
    "nx": "14.2.4",
    "prettier": "2.6.2",
    "typescript": "4.7.2"
  }
}

Hi @Jeff-Stapleton! I'm encountering the exact same problem.
I tried to apply the solutions mentioned here, but no luck so far https://github.com/nrwl/nx/issues/4731
Could you paste your report here, using npx nx report you can generate it, here is mine:
 Node : 16.15.0
   OS   : darwin x64
   npm  : 8.5.5

   nx : 14.2.4
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.2.4
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.2.4
   @nrwl/eslint-plugin-nx : 14.2.4
   @nrwl/express : Not Found
   @nrwl/jest : 14.2.4
   @nrwl/js : 14.2.4
   @nrwl/linter : 14.2.4
   @nrwl/nest : Not Found
   @nrwl/next : 14.2.4
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 14.2.4
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.2.4
   @nrwl/web : 14.2.4
   @nrwl/workspace : 14.2.4
   typescript : 4.7.3
   ---------------------------------------
   Community plugins:
         @nxtend/capacitor: 13.0.0

Alright so you porbably have to options

Roll back to  @nxtend/capacitor version 12.1.0
cd inside your container directory and run npx cap --help to find what you could do without downgrading   @nxtend/capacitor

Same issue here with cap sync command.
This happens since I upgrade to Nx v^14.x.x

Same issue. Any progress on this ?
Cannot find module 'nx/src/utils/app-root'

same problem with Angular also. Tried version 12 and it also didn't work for me.

Downgrading back to 14.1.7 works

Same issue here
Node : 14.17.0
   OS   : darwin arm64
   npm  : 6.14.13

   nx : 14.3.6
   @nrwl/angular : 14.3.6
   @nrwl/cypress : 14.3.6
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.3.6
   @nrwl/eslint-plugin-nx : 14.3.6
   @nrwl/express : Not Found
   @nrwl/jest : 14.3.6
   @nrwl/js : 14.3.6
   @nrwl/linter : 14.3.6
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : 14.1.3
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.3.6
   @nrwl/web : 14.3.6
   @nrwl/workspace : 14.3.6
   typescript : 4.6.4
   ---------------------------------------
   Community plugins:
         @nxtend/capacitor: 13.0.0

@dandouglas, @Tam2 - did you downgrade nx and all plugins to 14.1.7?  And did you use the nx version migration, or did you just change the versions by hand?  Asking because this fix did not work for me.

nk_mac@Nathans-iMac super-cap % npx nx generate @nxtend/capacitor:capacitor-project --project mobile --verbose
✔ What app ID would you like to use? · com.embue.mobile
✔ What app name would you like to use? · super
The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at new NodeError (node:internal/errors:388:5)
at validateString (node:internal/validators:114:11)
at normalize (node:path:1128:5)
at offsetFromRoot (/Users/nk_mac/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/node_modules/@nrwl/devkit/src/utils/offset-from-root.js:18:40)
at addCapacitorConfig (/Users/nk_mac/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/src/generators/capacitor-project/lib/add-capacitor-config.js:6:170)
at /Users/nk_mac/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/src/generators/capacitor-project/generator.js:16:55
at Generator.next ()
at /Users/nk_mac/Projects/MonoRepo/super-cap/node_modules/tslib/tslib.js:118:75
at new Promise ()
at __awaiter (/Users/nk_mac/Projects/MonoRepo/super-cap/node_modules/tslib/tslib.js:114:16)
nk_mac@Nathans-iMac super-cap % npx nx report

This is the output I get from a clean install using npx create-nx-workspace@14.1.7 and npm install --save-dev @nxtend/cpacitor and then running the following generator.  Nx report at the end.  From the stacktrace it looks like a value for path was returned as undefined, but I don't see what is causing this.  Any help appreciated.
% npx nx generate @nxtend/capacitor:capacitor-project --project mobile --verbose
✔ What app ID would you like to use? · com.hostname.mobile
✔ What app name would you like to use? · mobile-app
The "path" argument must be of type string. Received undefined
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:388:5)
    at validateString (node:internal/validators:114:11)
    at normalize (node:path:1128:5)
    at offsetFromRoot (/Users/nk/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/node_modules/@nrwl/devkit/src/utils/offset-from-root.js:18:40)
    at addCapacitorConfig (/Users/nk/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/src/generators/capacitor-project/lib/add-capacitor-config.js:6:170)
    at /Users/nk/Projects/MonoRepo/super-cap/node_modules/@nxtend/capacitor/src/generators/capacitor-project/generator.js:16:55
    at Generator.next (<anonymous>)
    at /Users/nk/Projects/MonoRepo/super-cap/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)
    at __awaiter (/Users/nk/Projects/MonoRepo/super-cap/node_modules/tslib/tslib.js:114:16)
% npx nx report
>  NX   Report complete - copy this into the issue template

   Node : 18.4.0
   OS   : darwin x64
   npm  : 6.14.12

   nx : 14.1.7
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.1.7
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.1.7
   @nrwl/eslint-plugin-nx : 14.1.7
   @nrwl/express : Not Found
   @nrwl/jest : 14.1.7
   @nrwl/js : 14.1.7
   @nrwl/linter : 14.1.7
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 14.1.7
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.1.7
   @nrwl/web : 14.1.7
   @nrwl/workspace : 14.1.7
   typescript : 4.6.4
   rxjs : 6.6.7
   ---------------------------------------
   Community plugins:
   	 @nxtend/capacitor: 13.0.0

Any updates on this? Unable to create a ionic workspace with nxtend aswell

For me downgrading NX did not solve the issue. Neither 13.0.0 nor 14.1.7 seemed to do the trick.

Thanks @Tam2 downgrading to 14.1.7 did indeed work. Hopefully this issue will be fixed soon 🤞

What steps did you take to downgrade?
Looking at doing the same and don't want to miss anything :)

I manually changed the versions in package.json to 14.1.7, deleted the node_modules folder and then ran npm install

For anyone that wants a patch:

Details
diff --git a/src/executors/run-commands/run-commands.impl.js b/src/executors/run-commands/run-commands.impl.js
index d2c45a4405755b63e541b060f0e7631781f33b9c..052e0a4c172454d8c3cfae567739baa5fc1e3be6 100644
--- a/src/executors/run-commands/run-commands.impl.js
+++ b/src/executors/run-commands/run-commands.impl.js
@@ -190,7 +190,7 @@ function interpolateArgsIntoCommand(command, opts, forwardAllArgs) {
         return command.replace(regex, (_, group) => opts.parsedArgs[group]);
     }
     else if (forwardAllArgs) {
-        return `${command}${opts.__unparsed__.length > 0 ? ' ' + opts.__unparsed__.join(' ') : ''}`;
+        return `${command}${opts.__unparsed__?.length > 0 ? ' ' + opts.__unparsed__.join(' ') : ''}`;
     }
     else {
         return command;
diff --git a/src/utils/app-root.d.ts b/src/utils/app-root.d.ts
new file mode 100644
index 0000000000000000000000000000000000000000..9d8d8966d6d98539c395ce6d7c95333f7ab35474
--- /dev/null
+++ b/src/utils/app-root.d.ts
@@ -0,0 +1,11 @@
+/**
+ * The root of the workspace.
+ *
+ * @deprecated use workspaceRoot instead
+ */
+export declare const appRootPath: string;
+/**
+ * The root of the workspace
+ */
+export declare const workspaceRoot: string;
+export declare function fileExists(filePath: string): boolean;
diff --git a/src/utils/app-root.js b/src/utils/app-root.js
new file mode 100644
index 0000000000000000000000000000000000000000..440e99787ed3facbe77e036f17d7f49ff90789cb
--- /dev/null
+++ b/src/utils/app-root.js
@@ -0,0 +1,39 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.fileExists = exports.workspaceRoot = exports.appRootPath = void 0;
+const path = require("path");
+const fs_1 = require("fs");
+/**
+ * The root of the workspace.
+ *
+ * @deprecated use workspaceRoot instead
+ */
+exports.appRootPath = pathInner(__dirname);
+/**
+ * The root of the workspace
+ */
+exports.workspaceRoot = exports.appRootPath;
+function pathInner(dir) {
+    if (process.env.NX_WORKSPACE_ROOT_PATH)
+        return process.env.NX_WORKSPACE_ROOT_PATH;
+    if (path.dirname(dir) === dir)
+        return process.cwd();
+    if (fileExists(path.join(dir, 'workspace.json')) ||
+        fileExists(path.join(dir, 'nx.json')) ||
+        fileExists(path.join(dir, 'angular.json'))) {
+        return dir;
+    }
+    else {
+        return pathInner(path.dirname(dir));
+    }
+}
+function fileExists(filePath) {
+    try {
+        return (0, fs_1.statSync)(filePath).isFile();
+    }
+    catch (err) {
+        return false;
+    }
+}
+exports.fileExists = fileExists;
+//# sourceMappingURL=app-root.js.map
\ No newline at end of file
diff --git a/src/utils/app-root.js.map b/src/utils/app-root.js.map
new file mode 100644
index 0000000000000000000000000000000000000000..d8068dc95b667de1d6c5f5af8d2fd616ed328f97
--- /dev/null
+++ b/src/utils/app-root.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app-root.js","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/app-root.ts"],"names":[],"mappings":";;;AAAA,6BAA6B;AAC7B,2BAA8B;AAE9B;;;;GAIG;AACU,QAAA,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAEhD;;GAEG;AACU,QAAA,aAAa,GAAG,mBAAW,CAAC;AAEzC,SAAS,SAAS,CAAC,GAAW;IAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB;QACpC,OAAO,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IAC5C,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG;QAAE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;IACpD,IACE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAC5C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACrC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAC1C;QACA,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;KACrC;AACH,CAAC;AAED,SAAgB,UAAU,CAAC,QAAgB;IACzC,IAAI;QACF,OAAO,IAAA,aAAQ,EAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;KACpC;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAND,gCAMC"}
\ No newline at end of file

How and where can I apply this patch?

For anyone that want a patch, here. This also includes #633.
Details
How?

pnpm

copy contents into a file patches/nx@14.4.3.patch
add to package.json "pnpm": { "patchedDependencies": { "nx@14.4.3": "patches/nx@14.4.3.patch" } }
pnpm install

yarn

similar to pnpm: yarnpkg.com/cli/patch-commit#details

npm

no support

Would https://www.npmjs.com/package/patch-package work?

Downgrade to nrwl/*@14.1.7 still having the same issue.

For anyone that want a patch, here. This also includes #633.
Details
How?

pnpm

copy contents into a file patches/nx@14.4.3.patch
add to package.json "pnpm": { "patchedDependencies": { "nx@14.4.3": "patches/nx@14.4.3.patch" } }
pnpm install

yarn

similar to pnpm: yarnpkg.com/cli/patch-commit#details

npm

no support

Would https://www.npmjs.com/package/patch-package work?

Is this patch to be applied to the latest version or 14.1.7?

nx@14.4.3

Is there a way to do this with https://www.npmjs.com/package/patch-package

For anyone that want a patch, here. This also includes #633.
Details
How?

pnpm

copy contents into a file patches/nx@14.4.3.patch
add to package.json "pnpm": { "patchedDependencies": { "nx@14.4.3": "patches/nx@14.4.3.patch" } }
pnpm install

yarn

similar to pnpm: https://yarnpkg.com/cli/patch-commit#details

npm

no support

Thanks a lot! This worked for us

Still waiting for an "official" fix.
Would be great to at least get some message if it will be looked into.

These plugins are moving over to the Nxext repo, and an Nx 14 version has been released. There are some migration guides on their docs site, here's a link to the Ionic Angular guide: https://nxext.dev/docs/ionic-angular/migrating-from-nxtend.html

authors: 0x1ad2 Jeff-Stapleton SimonPrammer Stevoohh Tam2 dandouglas devinshoemaker llnathanll mackelito mtiahrt muuvmuuv ntgussoni orl99 rjlopezdev yannickcare

repo: nxtend-team/nxtend


text:
feat(astro): allow --no-integrations via cli

What it does
Allows running generator with --no-integrations without failing
Related Issue(s)

Thanks for contributing!
Please note the integrations flag is not a boolean. It's an array and it defaults to an empty array. Passing --no-integrations is not something you should do or need to do.
Still, the change of this PR shouldn't make a difference. The GeneratorCallback task for the integrations is only added to the tasks array if defined as you can see in https://github.com/nxtensions/nxtensions/blob/main/packages/astro/src/generators/application/generator.ts#L36-L38. Same is done in the library generator.
I'm closing this. If you still have issues with this, please create an issue first with a reproduction so we can discuss it and troubleshoot it.

Hey! Thanks for expanded reply and for your time. Apparently, I was in a rush when submitted this PR and have mistyped the name of the flag in subject which took this discussion off the rails. Sorry about that. Please let me rephrase :) This PR resolves problem which occurs when @nxtensions/astro is used to generate an app with --no-interactive flag, please find the bug reproduction and bug fix scenarios below.
Reproduction
Just run this CLI snippet:
npx create-nx-workspace@latest nx-astro --preset=empty --nxCloud=false --pm=npm && \
cd nx-astro && \
npm i -D @nxtensions/astro && \
npx nx g @nxtensions/astro:app website --no-interactive

Fix
...and here is the same scenario with this PR fix included (installing @nxtensions/astro from my fork with this PR's change):
npx create-nx-workspace@latest nx-astro --preset=empty --nxCloud=false --pm=npm && \
cd nx-astro && \
npm i -D "@nxtensions/astro@sergeylukin/nxtensions#no-integrations" && \
npx nx g @nxtensions/astro:app website --no-interactive

Hope that makes sense!
P.S. if you know a way to install npm package from github monorepo, LMK :) for now I had to create a special branch which contains package in the root folder in addition to the normal branch with the change which I couldn't get working with npm due to monorepo structure.

Oh, I see. I reproduced it now and the issue happens because in a recent Nx version thecypressInitGenerator changed to return a Promise. That was fixed in https://github.com/nxtensions/nxtensions/pull/335/files#diff-11a83b544887ceef518edf5976ebe10f8348e3c687853651706d06823d2b2be3R38, but I just realized I hadn't released the changes. I'll create a release now and that should address this issue.

authors: leosvelperez sergeylukin

repo: nxtensions/nxtensions


text:
magic button

This adds a new behavior I'm calling :sparkles: magic button :sparkles:
In brief, it grabs data from a field, optionally does stuff to it (including transforms, api calls, etc) and puts it into the current field.
All arguments to magic-button are optional.

if you specify field, it'll grab the data from that field (otherwise it'll use emptystring)
if you specify transform it'll run that data through a transform function (available transforms live in the behavior)
if you specify url, it'll do a GET request against that url + transformed data (useful for mediaplay images!)
if you specify property, it'll grab that property from the returned api call

Note: It won't update the current field if the data is empty, which prevents it from overwriting good data with garbage (in most situations).
Note: It'll always grab the same data (unless you do an api call that returns different data), so the behavior is super consistent.
Note: You can always change what's in the field after you press the button, or even erase the data entirely! There's no weird business logic going on.
It can make headlines easier!

It can make image captions and credits easier!

Coverage decreased (-0.8%) to 86.74% when pulling 5f5ec4a6a16c3568cffac4bc3d246f91852dc23f on magic-button into 295c7de7acb744c9bb2e9a7bf8154cceb8571978 on master.

Coverage decreased (-0.8%) to 86.74% when pulling cdb9a5ff194a521bc2e8bdbf32f6c96c48661d3a on magic-button into 295c7de7acb744c9bb2e9a7bf8154cceb8571978 on master.

+1

authors: coveralls cruzanmo yoshokatana

repo: nymag/clay-kiln


text:
It is impossible to set zkAppUri inside SmartContract’s method

Although it is possible to set the verification key inside the SmartContract’s method by passing the variable of the type VerificationKey to the method, it is not possible to set zkAppUri inside the SmartContract’s method by passing the variable of the type Types.ZkappUri to the method.
Error thrown:
“Argument 1 of method setURI is not a provable type: function Object() { [native code] }”
Both VerificationKey and Types.ZkappUri internally contains string and Field, but Types.ZkappUri is not provable. Also, account.zkappUri.set accepts only string, while account.verificationKey.set accepts hash and string:
type ZkappUri = {
    data: string;
    hash: Field;
}

(method) account.zkappUri.set(value: string): void

class VerificationKey extends Struct({
  ...provable({ data: String, hash: Field }),
  toJSON({ data }: { data: string }) {
    return data;
  },
}) {}

(method) account.verificationKey.set(value: {
    data: string;
    hash: Field;
}): void

The code to reproduce the error:
import { describe, expect, it } from "@jest/globals";
import {
  Field,
  SmartContract,
  method,
  VerificationKey,
  Types,
  DeployArgs,
  Permissions,
} from "o1js";

jest.setTimeout(1000 * 60 * 60); // 1 hour

describe("Compile a contract", () => {
  it("should compile a contract VK", async () => {
    class VK extends SmartContract {
      deploy(args: DeployArgs) {
        super.deploy(args);
        this.account.permissions.set({
          ...Permissions.default(),
          setDelegate: Permissions.proof(),
          setPermissions: Permissions.proof(),
          setVerificationKey: Permissions.proof(),
          setZkappUri: Permissions.proof(),
          setTokenSymbol: Permissions.proof(),
          incrementNonce: Permissions.proof(),
          setVotingFor: Permissions.proof(),
          setTiming: Permissions.proof(),
        });
        this.emitEvent("mint", Field(0));
      }

      @method setVK(key: VerificationKey) {
        this.account.verificationKey.set(key);
      }
    }
    console.time("compiled");
    console.log("Compiling VK");
    await VK.compile();
    console.timeEnd("compiled");
  });

  it("should compile a contract URI", async () => {
    class URI extends SmartContract {
      deploy(args: DeployArgs) {
        super.deploy(args);
        this.account.permissions.set({
          ...Permissions.default(),
          setDelegate: Permissions.proof(),
          setPermissions: Permissions.proof(),
          setVerificationKey: Permissions.proof(),
          setZkappUri: Permissions.proof(),
          setTokenSymbol: Permissions.proof(),
          incrementNonce: Permissions.proof(),
          setVotingFor: Permissions.proof(),
          setTiming: Permissions.proof(),
        });
        this.emitEvent("mint", Field(0));
      }

      @method setURI(uri: Types.ZkappUri) {
        this.account.zkappUri.set(uri.data);
      }
    }
    console.time("compiled");
    console.log("Compiling URI");
    await URI.compile();
    console.timeEnd("compiled");
  });
});

@dfstio the problem isn't that Types.ZkappUri is not provable, but that it's not a class. The @method decorator tries to automatically find a class from the type arguments. It works for VerificationKey because it extends a Struct.
You can pass a plain string to your method by wrapping it in a Struct, like
class MyString extends Struct({ string: String }) {}

@method myMethod(s: MyString) {
  account.zkappUri.set(s.string);

Setting zkAppUri for token accounts Account(address, tokenId) seems only possible inside the token owner @method, and this issue blocks this possibility.

authors: dfstio mitschabaude


text:
Provide an interface to specify absolute cliff time as dates, and fix docs

Time locked accounts currently don't work as documented, because the docs assume cliff time is set relative to the transaction which sets timing, while in reality it seems to be interpreted as an absolute slot number (of the slot at which the cliff time is over).
We should either fix the docs or (my suggestion) make the interface in snarkyjs treat the cliff time as a relative slot number, because that will be most certainly easier to use.
EDIT: plan changed, see below

Instead of the above, we decided to keep the absolute time and provide an interface for converting times / dates into global slots

@mitschabaude I opened PR https://github.com/o1-labs/docs2/pull/355 for updates to the the https://docs.minaprotocol.com/zkapps/advanced-snarkyjs/time-locked-accounts page
I have to learn how to bring in that updated graphic.
Can you use this PR for your changes? Teach me if there is a better way to work this. Thank yoU!

Can you use this PR for your changes? Teach me if there is a better way to work this. Thank yoU!

Yes that works 👍🏻

authors: barriebyron mitschabaude