text:
New Exercise book-store

Attempting to create slug for new xpascal exercise.

Oh, this exercise looks interesting. As the README makes clear, a few choices for the optimisation. I am interested to see how it will go.
It would be nice if we can have the test cases in a file in this repo too, as https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#improving-consistency-by-extracting-shared-test-data has it. In this case, the task should only require using the same tests as those in https://github.com/exercism/xpascal/pull/14

@petertseng thanks for the tip.  The json file seems pretty straight forward.

I'd like to see this exercise called something more generic like 'book-discounts'. The books being Harry Potter books is irrelevant to the problem.

@Insti thanks, I'm trying.  It's the first "original" exercise that I have added to exercism.  Had I only known....  Kidding, wouldn't be doing this if I didn't want to learn too.

I think I have completed what needs to be done.  Let me know where I've errored and I'll take care of it.

It thinks your json is invalid.

Read this comment I wrote on another PR, about test descriptions: https://github.com/exercism/x-common/pull/451#issuecomment-263070019

Having a good canonical-data.json file can be harder than writing the original specification.
It might be good to split this off into a separate PR so we can get the initial exercise merged in and once a few tracks have implemented it we can work out what the canonical test data should be.

@petertseng I've gone ahead and moved the canonical-data.json to another PR.  I am not really clear on how the inner workings of the machine (exercism.io) operate so don't have a solid grasp on what the exact role the three files play (canonical-data.json,  description.md, and metadata.yml).  At this point I am trying to format the files as best I can to examples from other exercises.  In the case of the json file I am not sure what tests should be listed and which shouldn't.  I've assumed that they should all be listed.  I uess further discussion related to the json file should take place here #470

I think all the files for the exercise should go into the same PR, (and in a single commit) since they all belong to one, atomic change.

That is the way I had it but was encouraged to pull the canonical data out into a separate PR.
Sent from my android device.

@kytrinyx I asked @rpottsoh to move the canonical data to another PR.
Reasoning:
There are many pre-existing exercises that do not have canonoical-data files.
The description.md and metadata.yml files for this exercise were almost complete and ready to be merged.
By getting the exercise in place it gives multiple tracks an opportunity to implement the problem and help find/explore the required test cases, and find/resolve any issues with the description.

I think things are OK. A few minor things but I am not sure if they are blocking.

I asked @rpottsoh to move the canonical data to another PR.

@Insti fair enough. I saw the other PR first, and it didn't have a [WIP] to indicate that it would have to be merged after a different PR, so I was unaware of the fact that there was a different PR in progress until I got further down my notifications list.

Good question.  I will look again with this in mind as well as check other sources that might have the same/similar exercise.
Sent from my android device.

I see.  So is the exercise dead?
Sent from my android device.

I do not think there are other changes that I would suggest.
I am not competent to discuss copyright, so I make no comment on that.
Before I forget to mention it:
Before merging this PR, please squash commits.

In terms of copyright, as long as we don't exactly copy their text word for word, and link to them as a source, I think it is fine.

Text was changed a little.  Looks like C# and F# have already implemented the exercise. 👍

@rpottsoh thanks to @ErikSchierboom we now have two people that have submitted implementations on the site for the this exercise in both C# and F# 👍

And that's thanks to @robkeim who implemented the problem!

@ErikSchierboom I noticed!  Thanks to you and @robkeim for taking the time to get it out there.

authors: ErikSchierboom Insti kytrinyx petertseng robkeim rpottsoh

repo: exercism/x-common


text:
Reorder config.json

The last several PRs have left config.json out of sync with the JS track.  I will put in a PR to fix that.

Closed by #108

source: gharchive/issue

repo: exercism/xecmascript

license: mit

license_type: permissive

license_source: bigquery


text:
Use Jest test runner

As discussed in #272 , this is a variation of a terrific idea from @tejasbubane .
It greatly simplifies our scaffolding around this project.  My goals were:

Replace Jasmine, Gulp, and Babel with Jest and Babel-Jest.
Retain eslint for linting support

As suggested by @rchavarria, the babel config is in the package.json file.  I was also able to move the eslint config here as well.
I had one issue with an array matcher in the "Palindrome Products" exercise that was not behaving, so I had to add some JS functions to specfile to get the desired test results.
This is a big PR in appearance, but mostly removes some existing scaffolding.  The changes are conceptually small but are duplicated many times.
UPDATE: I realized I missed changing two of the /doc files, so I have updated those.

I wonder what the issue with palindrome-products is since jest also has the array toContain matcher.

@tejasbubane I don't know either why the matcher isn't working.  It looks like the Jest version of the matcher does not handle nested arrays, EG it doesn't see [ [3, 3], [1, 9]] as containing [3, 3].  I had to unpack both arrays and compare them element by element.

One more commit to copy the new package.json file with jest --watch to all the exercise dirs.

Awesome! Awesome! Awesome! Many, many thanks for this great work!!!

source: gharchive/pull-request

authors: matthewmorgan rchavarria tejasbubane


text:
bob: Add lightweight generics to foundation objects

See https://github.com/exercism/xobjective-c/issues/45

doesn't need it

repo: exercism/xobjective-c


text:
Move exercises to subdirectory

The problems api (x-api) now supports having exercises collected in a subdirectory
named exercises.
That is to say that instead of having a mix of bin, docs, and individual exercises,
we can have bin, docs, and exercises in the root of the repository, and all
the exercises collected in a subdirectory.
In other words, instead of this:
x{TRACK_ID}/
├── LICENSE
├── README.md
├── bin
│   └── fetch-configlet
├── bowling
│   ├── bowling_test.ext
│   └── example.ext
├── clock
│   ├── clock_test.ext
│   └── example.ext
├── config.json
└── docs
│   ├── ABOUT.md
│   └── img
... etc

we can have something like this:
x{TRACK_ID}/
├── LICENSE
├── README.md
├── bin
│   └── fetch-configlet
├── config.json
├── docs
│   ├── ABOUT.md
│   └── img
├── exercises
│   ├── bowling
│   │   ├── bowling_test.ext
│   │   └── example.ext
│   └── clock
│       ├── clock_test.ext
│       └── example.ext
... etc

This has already been deployed to production, so it's safe to make this change whenever you have time.

This can be closed. Satisfied by #18.

Thank you!

authors: kelcecil kytrinyx

repo: exercism/xpony


text:
Fixed the check-exercises.py script to run tests against the config.json file

As for issue #294.
This time I'm directly pushing changes with the "single dot" paths. I tested it with two dots and everything seemed to be fine.
Parts that don't really convince me:

Lines 73-76. I did the checks in a ways that the script returns an hint in case you try checking deprecated exercises or exercises that don't even exists (which means typos too).

Before I put my hands on this script, there weren't really many suggestions returned by the scripts, so I was thinking maybe this is a code of conduct you decided to adopt? I don't know, in any case let me know thanks.
There's also a chance that I completely misunderstood the assignment for this issue in which case I apologise.

Okay, so configlet checks, that every exercise has an example solution and an entry in the config.json. That makes it save to work with the problems from the json-file in line 81.
Line 70 & 82: String formatting should be preferred over raw concatenation. './exercises/{}/*_test.py'.format(exercise_name) Maybe its also a good idea to standardize the two names exercise_path and exercise.
Your solution doesn't handle the reason we are doing all this, which is the case that the test file does not exist or is in a wrong location. To achieve this we could work with os.path.exists and remove the usage of the glob module entirely.
For example if we rename a test file it looks like this:
$ mv exercises/luhn/luhn_test.py exercises/luhn/luhn_test_na.py
$ ./test/check-exercises.py luhn
Traceback (most recent call last):
  File "./test/check-exercises.py", line 97, in <module>
    main()
  File "./test/check-exercises.py", line 71, in main
    )[0]
IndexError: list index out of range
$ ./test/check-exercises.py
# grains
.......
----------------------------------------------------------------------
Ran 7 tests in 0.000s

OK

Traceback (most recent call last):
  File "./test/check-exercises.py", line 97, in <module>
    main()
  File "./test/check-exercises.py", line 82, in main
    test_file = glob.glob('./exercises/' + exercise + '/*_test.py')[0]
IndexError: list index out of range

@behrtam I'm sorry, I don't get it. In the issue you stated that the check-exercise.py should check that the exercise is in the config.json and is not deprecated before doing the test. But from what you are saying here it looks like the configlet script already ensures that every exercise is listed in the config.json file and has an example implementation to test against.
So, what is exactly the problem? Assuring that all the test files exist (and have a legal name) before running the test? Should the check-exercise.py go scavenge all the possible paths in case it can't find the test file? Something else?
I'm sorry if I got it wrong, I thought it was just a matter of ensuring that the exercise was listed in the config.json file and not deprecated before running the tests. I still think I can manage to fix this, but first I need to understand what's the required behaviour you expect from it.

authors: behrtam oalbe

repo: exercism/xpython


text:
insufficient WSL path conversion

https://github.com/existentialmutt/wsl_build/blob/ef0e282a51294bf2e6a2408ef5dc76af4a7c7f88/wsl_build.py#L77-L79
The path translation ...

works only for a very specific WSL distribution. How about Debian or other distros?
doesn't take files into account, which are located in normal windows like folders (e.g.: C:\Foo\Bar\baz.txt)

possible fix
    @staticmethod
    def wsl_path(path):
        # remove UNC prefix for paths pointing to WSL environment
        if path.startswith('\\\\'):
            path = re.sub(r"\\\\wsl\.localhost\\[^\\]*", "", path)
        # convert local windows paths to WSL compliant unix format
        elif path[1:3] == ':\\':
            path = ''.join(('/mnt/', path[0].lower(), path[2:]))
        return path.replace('\\', '/')

license: MIT

license_source: github-api


text:
(WIP) add extendable erc721r contract

Created a simple extendable version of ERC721R
WIP: need to handle owner mints differently

For owner mints I would work on what we already have merged in which fixes issues around that.

Note, I'm not sure the actual issue is owner mint. Because even if the owner can't mint, they can still buy 1 off the market and refund indefinitely. So I'm not sure we need it at all. We just need the fixes that were put in here:
https://github.com/exo-digital-labs/ERC721R/pull/9
The core being:
    mapping(uint256 => bool) public hasRefunded; // users can search if the NFT has been refunded
    mapping(uint256 => bool) public isOwnerMint; // if the NFT was freely minted by owner

Could the notContract modifier be removed? I don't see why it should be included in the base contract, an inheriting contract could simply implement it themselves if they need it. (There is a reason you don't see it in the ERC721A contract, for example). Also, it's Bad Practice® (#5).

Note, I'm not sure the actual issue is owner mint. Because even if the owner can't mint, they can still buy 1 off the market and refund indefinitely. So I'm not sure we need it at all. We just need the fixes that were put in here: #9
The core being:
    mapping(uint256 => bool) public hasRefunded; // users can search if the NFT has been refunded
    mapping(uint256 => bool) public isOwnerMint; // if the NFT was freely minted by owner

I have a nice solution for all that I plan to implement to push tomorrow to fix this issue

Could the notContract modifier be removed? I don't see why it should be included in the base contract, an inheriting contract could simply implement it themselves if they need it. (There is a reason you don't see it in the ERC721A contract, for example). Also, it's Bad Practice® (#5).

yeah I see what you're saying. It may be removed soon

Note, I'm not sure the actual issue is owner mint. Because even if the owner can't mint, they can still buy 1 off the market and refund indefinitely. So I'm not sure we need it at all. We just need the fixes that were put in here: #9
The core being:
    mapping(uint256 => bool) public hasRefunded; // users can search if the NFT has been refunded
    mapping(uint256 => bool) public isOwnerMint; // if the NFT was freely minted by owner

I have a nice solution for all that I plan to implement to push tomorrow to fix this issue

a solution was already merged in for this btw. there was discussion around some different options too. may be worth adding comments to that discussion on what you're planning as a few options were already put out

mapping(uint256 => bool) public hasRefunded; // users can search if the NFT has been refunded

Yes the mapping are included to the implementation.
I was thinking about adding another mapping for token id -> purchase price.
This will require modifying _safeMint to add purchase price after minting.
We then require that purchase price for this token id > 0 when requesting a refund for  it.

So I pushed a version like that a few days ago:
https://github.com/exo-digital-labs/ERC721R/pull/9#issuecomment-1097823682
The reason we didn't use it is discussed there. It increases mint price. The other versions increase ownermint price and refund which is probably better


text:
Caused by: org.gradle.process.internal.ExecException: Process 'command 'git'' finished with non-zero exit value 128

Caused by: org.gradle.process.internal.ExecException: Process 'command 'git'' finished with non-zero exit value 128

Is not related to this library. Looks like a git error. Did you accept xcode license agreement?

authors: anishak kibotu

repo: exozet/Geolocator


text:
Expression for exploding "complex atomics" to maps

This is a counterproposal to the extension of the ? syntax to "complex atomics" such as dates.
The idea is that
Expr :fireworks:
explodes an atomic (like date, etc...) returned by Expr into a map (with fields year, month, etc).
(the choice of :fireworks:   is arbitrary and a placeholder for any other reasonable choice of syntax)
It can also work on a sequence of atomics, returning a sequence of maps.
Then one can write
(current-date():fireworks: )?year
where the semantics of ? is completely unchanged.
Parentheses are here for clarity on precedence, but may or may not be needed depending on the relative precedence of :fireworks:  and ?.
This way, :fireworks:  could be combined and used with all other functionality applying to maps (functions, obtaining the keys, the values, etc), providing a more general functionality than only for ?-based lookup.
As raised in Slack, it would be clear to anybody seeing :fireworks: and getting an error with an XQuery 3.1 query that this is something new, rather than an existing ? with modified semantics

Hi Ghislain, a rather explosive proposal ;) So we could decide between 💥 and 🎆…
One (pretty boring) alternative would be a fn:to-map function, which binds the actual value to a value key and provide additional mappings depending on the type:
to-map(current-date())?year

Yes, I did consider that approach. The downside is that it needs another magic symbol. An alternative would be a function
map:from(current-date())?year
but it doesn't read so nicely.
Michael Kay
Saxonica

On 18 Dec 2020, at 16:02, Ghislain Fourny notifications@github.com wrote:
This is a counterproposal to the extension of the ? syntax to "complex atomics" such as dates.
The idea is that Expr 🎆 explodes an atomic (like date, etc...) returned by Expr into a map (with fields year, month, etc).
(the choice of 🎆 is arbitrary and a placeholder for any other reasonable choice of syntax)
It can also work on a sequence of atomics, returning a sequence of maps.
Then one can write (current-date()🎆)?year where the semantics of ? is completely unchanged.
Parentheses are here for clarity on precedence, but may or may not be needed depending on the relative precedence of 🎆 and ?.
This way, 🎆 could be combined and used with all other functionality applying to maps (functions, obtaining the keys, the values, etc), providing a more general functionality than only for ?-based lookup.
As raised in Slack, it would be clear to anybody seeing 🎆 and getting an error with an XQuery 3.1 that this is something new, rather than an existing ? with modified semantics
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/expath/xpath-ng/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASIQISHEIBXZJWM6GFQET3SVN4IXANCNFSM4VBLTLMA.

I'm now inclined to have a function fn:parts() which extracts the components of an atomic value as a map, so you write
parts(current-date())?year
or current-date() => parts()?year
It's a little bit harder this way to define the rules in such a way that implementations are allowed to raise an error statically if you do something inappropriate, like implicit-timezone() => parts?hour [should be "hours"], but I expect we can manage.
Michael Kay
Saxonica

On 18 Dec 2020, at 16:18, Christian Grün notifications@github.com wrote:
Hi Ghislain, a rather explosive proposal ;) So we could decide between 💥 and 🎆…
One (pretty boring) alternative would be a fn:to-map function, which binds the actual value to a value key and provide additional mappings depending on the type:
to-map(current-date())?year
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/expath/xpath-ng/issues/23#issuecomment-748183595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASIQIVS5PWIY4EOZ7MS3K3SVN6FNANCNFSM4VBLTLMA.

I’m in favor of the extra function. It seems more extensible to me as, in principle, the argument of an fn:parts function could also be a sequence, records, or function items (including maps and arrays).

repo: expath/xpath-ng


text:
feat: add exact match caching

This PR introduces a robust caching abstraction to improve performance and prevent progress loss during API calls (e.g., LLM or embedding requests). This was brought up in #1522 and later added as an enhancement request in #1602.
Key Features:

Flexible Backend Support: Added CacheInterface with DiskCacheBackend (using diskcache) and InMemoryCacheBackend (not tested yet).
Deterministic Cache Key Generation: So far, I was successful in generating deterministic and unique cache keys.
Decorator-Based Integration: Simple @cacher decorator to seamlessly apply caching to both synchronous and asynchronous functions. This can act as a singular interface. Additionally, I can create a CacheMixin class from which other classes can inherit. But personally liked the elegance of a decorator.

Questions:

What's would be a good assumption for the size of dataset used for evaluation/number of LLM calls made?  Asking this so that I can plan benchmarking accordingly. cc: @jjmachan

The implemented _generate_cache_key uses the args and kwargs to find attributes that should be deterministic. For now I am excluding keys that have memory address. This can be done more gracefully maybe. Or we can leverage the __repr__ or __hash__ written for PydanticPrompt but not sure if this is the consensus for writing most core components in the lib.

Few obvious TODOs:

[x] proper abstractions
[ ] test for dataset generation
[ ] test in memory caching
[ ] write tests
[ ] benchmark for latency
[ ] docs

Great to see this draft 🙂
This should give you an average distribution for last month @ayulockin

this ignores rows which had the value 1 (assume single evaluations)

Thanks @jjmachan, I will stress test on an evaluation set of 300 rows (on the top of my mind). I think it would be sufficient amount give the percentile 95 is 120 and average is 40 rows. Will benchmark a few methods and let you know. Super useful data points.

hey @ayulockin I was thinking, instead of benchmarking evaluation, we have to evaluate prompt inputs here right - that will be more accurate benchmark. We can synthically create a few of these too
but a few questions

what aspects are we benchmarking/measuring?
what different situations should we consider (I think mostly it will be the different key_length but is there any other factors?)

instead of benchmarking evaluation, we have to evaluate prompt inputs here right

Caching should add some latency. I want to benchmark evaluation/testset generation (as a case study) with caching enabled and without it. The difference should not be noticeable imo. Running this is easy.
I am not sure what you exactly mean by "evaluate prompt inputs here". My guess is on unique key generation given a prompt input and that it is deterministic (we get the same key when we give the same prompt input) and the lookup speed/insertion speed, etc. I think with evaluation benchmark I meant the same thing.
So to answer your question on "what aspects are we benchmarking/measuring?" > It's latency. Also because we are saving the raw output as the value to the key, need to be careful about the disk memory usage too imo (but should not be such a big deal considering the percentile usage data you shared -- one will never run LLM based eval on 100k samples 😅).

what different situations should we consider (I think mostly it will be the different key_length but is there any other factors?)

I am generating key like this: https://github.com/explodinggradients/ragas/blob/55e7472fab48a0510aef1ff983f244f67cf75802/src/ragas/cache.py#L81
it's quite generic but want to check it with the embeddings as well (embedding models are very cheap so up to you if you want this to be cached too.)
TLDR;

Aspect
Metric
How to Measure

Cache Lookup Speed
Lookup latency (ms)
Measure time to fetch from cache for keys of varying lengths.

Cache Insertion Speed
Insertion latency (ms)
Measure time to insert new cache entries.

End-to-End Latency
Total function time (ms)
Compare cached vs. uncached function calls.

Cache Hit Rate
Hit rate (%)
Track cache hits vs. misses during repeated evaluations.

Memory/Disk Overhead
Cache size (MB/GB)
Monitor cache size with different inputs and backends.

Key Length Impact
Latency by key length
Test small vs. large keys for hashing and lookup time.

Concurrency
Latency under load (ms)
Simulate multiple threads/processes using the cache concurrently.

Backend Comparison
Latency for disk vs. memory
Compare diskcache and in-memory caching for similar workloads.

Ran evaluation with and without caching on the rungalileo/ragbench "tech" subset with 314 samples in the test set.
Without caching: 6 minutes 32.21 seconds

With caching: 5 minutes 46.31 seconds

Hence diskcache is practically having no overhead because it gets overlapped with the openai's latency.
Running the same eval that was cached took only 3.27 seconds.

The resulting .cache/cache.db is only taking 2 MB for this example. I don't think key_length is a concern here.

(but should not be such a big deal considering the percentile usage data you shared -- one will never run LLM based eval on 100k samples 😅).

this actually doesn't hold for testset generation, especially since there are a lot of transforms involved which process a lot of documents

I am not sure what you exactly mean by "evaluate prompt inputs here". My guess is on unique key generation given a prompt input and that it is deterministic (we get the same key when we give the same prompt input) and the lookup speed/insertion speed, etc. I think with evaluation benchmark I meant the same thing.

one are that might perform different is testset generation which will behave differently when compared to things that are cached when evaluating. This is why I though we would consider a different benchmark but that is an overkill. Instead what we could do is to benchmark how caching affects the testset generation module too - what do you think?

diskcache is good enough. anything else would be over engineering at this point.

caching should be parameterised i.e, the user should easily be able to turn it on or off given the non-deterministic nature of evals -- one would like to run without cache.

should we consider the trade-offs for in memory? I don't think we have too because even though disk caching is way slower than in-memory it is cheaper and can store more and given the biggest bottleneck is LLMs it should be a great fit
yep, lets do that. how many aspects of this should we configure. 2 things I can think off are

on/off (if there are any caching backend specific args, that will come here too)
how to which backend to use

how users will use these config is the question

Instead what we could do is to benchmark how caching affects the testset generation module too - what do you think?

You are right. Test set generation is where I am right now.

should we consider the trade-offs for in memory? I don't think we have too because even though disk caching is way slower than in-memory it is cheaper and can store more and given the biggest bottleneck is LLMs it should be a great fit

In memory should be an option for the users -- maybe test generation benefits from it (just started investigating). The default should be diskcache.

on/off (if there are any caching backend specific args, that will come here too)

I think I have a way to do it cleanly. Will let you know.

The caching works fine with test generation.
But I faced a few issues from my dev branch while running test generation so, did a fresh install in a new environment by cloning directly from the main branch (no fork) to make sure if the issues persist.
I have documented them here #1718. I am either doing something stupid or the issues are real.

thanks a lot for the update @ayulockin 🙂
should we aim to just work on diskcache for now and then open an issue to get more feedback on this

@jjmachan the PR is ready for review.

@jjmachan moved caching to the async def generate method of BaseRagasLLM as per our discussion.

Hey @jjmachan, this is great. Let me quickly implement this.

what do you think?

This is clearly a cleaner approach from a user pov (env can be scary especially in a big project). My approach was to make caching a hidden thing with just the control to turn on/off and select backend but I find your idea more appealing.

I went with the  evaluator_llm = LangchainLLMWrapper(gpt4o, cache=DiskCacheBackend()) approach.

authors: ayulockin jjmachan

repo: explodinggradients/ragas


text:
Correct year in changelog for recent releases

Either this PR is correct, or your PyPI account has been hacked :S
PyPI releases:

haha no it's a typo. thanks

authors: benhowes julianpacker

repo: expo-community/expo-server-sdk-python


text:
Failure creating a new project

I get the following error:
ValidationError: child "name" fails because ["name" is required]

I have a name entered in the box as well as a path in the second field.

This is using the XDE built from source on Ubuntu at 314bfca8754f69c6f7d5ff3c63a2ab3cc542e63c. I guess I should try the 1.0 tag?

I just tried running npm install with the v1.2.0 branch, but that also failed:
npm WARN optional dep failed, continuing fsevents@1.0.14
npm ERR! Linux 3.13.0-57-generic
npm ERR! argv "/home/mbolin/.nvm/versions/node/v4.1.1/bin/node" "/home/mbolin/.nvm/versions/node/v4.1.1/bin/npm" "install"
npm ERR! node v4.1.1
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE

npm ERR! ngrok@0.1.99 postinstall: `node ./postinstall.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngrok@0.1.99 postinstall script 'node ./postinstall.js'.
npm ERR! This is most likely a problem with the ngrok package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./postinstall.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls ngrok
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mbolin/code/xde/npm-debug.log

I'm on Ubuntu 14.04.5.

Yeah, master gives that error right now. Can you try the v2.6.0 tag, reinstall node modules, and try again?

@ide OK, thanks, I didn't see the v2.6.0 tag because I was only looking at the branches. I even went so far as to upgrade from Ubuntu 14.04 to 16.04. Now I ran:
nvm use v4.1.1
git clean -xfd
npm install
npm start

but now I am getting this error:
mbolin@stout:~/code/xde$ npm start

> @ start /home/mbolin/code/xde
> gulp build && cross-env XDE_NPM_START=1 electron ./app

[07:33:44] Failed to load external module babel-register
[07:33:44] Failed to load external module babel-core/register
[07:33:44] Failed to load external module babel/register
/home/mbolin/code/xde/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import gulp from 'gulp';
                                                              ^^^^^^

SyntaxError: Unexpected reserved word
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:413:25)
    at Object.Module._extensions..js (module.js:452:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at execute (/home/mbolin/code/xde/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0-alpha.2/index.js:35:18)
    at Liftoff.handleArguments (/home/mbolin/code/xde/node_modules/gulp/node_modules/gulp-cli/index.js:149:63)
    at Liftoff.<anonymous> (/home/mbolin/code/xde/node_modules/gulp/node_modules/gulp-cli/node_modules/liftoff/index.js:198:16)

npm ERR! Linux 4.4.0-36-generic
npm ERR! argv "/home/mbolin/.nvm/versions/node/v4.1.1/bin/node" "/home/mbolin/.nvm/versions/node/v4.1.1/bin/npm" "start"
npm ERR! node v4.1.1
npm ERR! npm  v2.14.4
npm ERR! code ELIFECYCLE
npm ERR! @ start: `gulp build && cross-env XDE_NPM_START=1 electron ./app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script 'gulp build && cross-env XDE_NPM_START=1 electron ./app'.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp build && cross-env XDE_NPM_START=1 electron ./app
npm ERR! You can get their info via:
npm ERR!     npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/mbolin/code/xde/npm-debug.log

I feel like I should give in and use the CLI instead? https://github.com/exponentjs/exp

Ugh, that doesn't work either:
$ exp init .
? Project name: storytime
[exp] Downloading project files...
[exp] Extracting project files...
tar: storytime: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
Process exited with non-zero code: 2

I don't see any tags for exp, so I'm on master: 74482b88e2ef191664b31aaec060330c71e62c0c.

Hmm, for XDE, I was looking at the wrong version of the README.md for install instructions. Looking at https://github.com/exponentjs/xde/tree/v2.6.0, I see I need nvm install v6.

OK, running the installation instructions at https://github.com/exponentjs/xde/tree/v2.6.0 on Ubuntu 16.04 worked for me. I was able to start XDE and create a project. I was able to send myself a link via email on my iPad for the default app and start it up.

sorry for all of the hassle @bolinfest, glad you were able to resolve it!

authors: bolinfest brentvatne ide

repo: exponentjs/xde


text:
Express 5.0.0 Route with regex not working

We have created simple express application with following code

const express = require('express')
const app = express()
const port = 4000

function logErrors(err, req, res, next) {
    console.error(err.stack)
    next(err)
}

function clientErrorHandler(err, req, res, next) {
    if (req.xhr) {
        res.status(500).send({ error: 'Something failed!' })
    } else {
        next(err)
    }
}
function errorHandler (err, req, res, next) {

    res.status(err.statusCode || 500)
    res.json({ message: err.message || "something wrong" })
}

app.get('/', async (req, res) => {
    await Promise.reject({"message":"dsfjh", statusCode: 400})
    res.status(200).send("asfas")
})

app.get('/[discussion|page]/:slug', async (req, res) => {
    throw {statusCode: 400, message: "harish"}
    res.status(200).send("asfas")
})

app.use(logErrors)
app.use(clientErrorHandler)
app.use(errorHandler)

app.listen(port, () => {
    console.log(`Example app listening on port ${port}`)
})

It is throwing following error

~/express5/node_modules/path-to-regexp/dist/index.js:136
        throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`);
        ^

TypeError: Unexpected [ at 1, expected END: https://git.new/pathToRegexpError
    at Iter.consume (~/express5/node_modules/path-to-regexp/dist/index.js:136:15)
    at consume (~/express5/node_modules/path-to-regexp/dist/index.js:193:16)
    at parse (~/express5/node_modules/path-to-regexp/dist/index.js:197:20)
    at ~/express5/node_modules/path-to-regexp/dist/index.js:308:74
    at Array.map (<anonymous>)
    at pathToRegexp (~/express5/node_modules/path-to-regexp/dist/index.js:308:25)
    at Object.match (~/express5/node_modules/path-to-regexp/dist/index.js:278:30)
    at matcher (~/express5/node_modules/router/lib/layer.js:83:23)
    at new Layer (~/express5/node_modules/router/lib/layer.js:90:62)
    at Function.route (~/express5/node_modules/router/index.js:421:17)

We identified that path to regexp node module is broken which is causing this issue.
Node.js v20.10.0 used

I have seen a similar issue with express 5.0 - which seems have root cause in path-to-regexp module:
/some-repo/node_modules/path-to-regexp/dist/index.js:85
throw new TypeError(Missing parameter name at ${i}: ${DEBUG_URL});
^
TypeError: Missing parameter name at 1: https://git.new/pathToRegexpError
at name (/some-repo/node_modules/path-to-regexp/dist/index.js:85:19)
at lexer (/some-repo/node_modules/path-to-regexp/dist/index.js:103:27)
at lexer.next ()
at Iter.peek (/some-repo/node_modules/path-to-regexp/dist/index.js:119:38)
at Iter.tryConsume (/some-repo/node_modules/path-to-regexp/dist/index.js:125:28)
at Iter.text (/some-repo/node_modules/path-to-regexp/dist/index.js:141:30)
at consume (/some-repo/node_modules/path-to-regexp/dist/index.js:166:29)
at parse (/some-repo/node_modules/path-to-regexp/dist/index.js:197:20)
at /some-repo/node_modules/path-to-regexp/dist/index.js:308:74
at Array.map ()

Is it realtes to https://blakeembrey.com/posts/2024-09-web-redos/?
But I don't understand, why the major version of "path-to-regexp" was updated when express@5 was released?

I agree - seems "weird"..

We fully dropped support for regular expressions in strings for routes. You can check out the docs for path-to-regexp@8 in that repo. We will be putting together a migration guide for folks, but in this case you need to either use an array of paths or write your own regular expression (very discouraged).
So it would become this:
app.get(['/discussion/:slug', '/page/:slug'], async (req, res) => {
    throw {statusCode: 400, message: "harish"}
    res.status(200).send("asfas")
})

@wesleytodd, sad to hear, we used regexp for data type routing.
app.get('/product/:page([0-9]+)', async (req, res) => {

We will be recommending folks use a more robust input validation approach for this. If you want, here is the open api library I maintain: https://github.com/wesleytodd/express-openapi/
The reason for this is mainly security around DOS protection. There is no way to support path segment regular expression matching while also avoiding major performance regressions. See more here: https://blakeembrey.com/posts/2024-09-web-redos/
This is a 100% big win for the ecosystem longer term, as regular expression route matching was one of the worst decisions from the early days which has stuck around. So while we understand the pain this change will cause, we stand by this decision as the right thing for the ecosystem and all express users (even if you need to change your approach to this sort of routing).

@blakeembrey  This is one of the example but we have routes which uses regex like at end all routes i want keep '*' as route and send specific response instead of express default one.

If you want to use a regex it’s fine to write a regex directly, it’s just not supported in the string.

The migration guide explicitly mentions using regex as a string, but I take it that's not correct seeing as the example provided doesn't work (/:foo(.*))?
https://expressjs.com/en/guide/migrating-5.html#path-syntax

The following changes have been made to how the path string is matched to an incoming request:

https://github.com/expressjs/express/issues/5948#issuecomment-2350915953
This solution is working fine.

I take it that's not correct

Yes, that guide needs updating. Please submit a PR on https://github.com/expressjs/expressjs.com

authors: HarishGangula blakeembrey ex1st richardsimko thomashohn wesleytodd

repo: expressjs/express


text:
Add ELF Spring site for branded items

https://express-language-foundation-2.creator-spring.com

Done in 0185776


text:
Feature: add-keeper-security-provider

#476
Please take into consideration that golang is not my language, so any feedback is more than welcome.
PushSecret feature: Work in progress, need to figure out how to handle secret names, etc.

pushSecret fueature done.
Docs updated

hey @ppodevlab ! One thing that I think we're missing here is some unit tests for the keeper provider.. You can check gcp implementation for some reference there :)

hey @ppodevlab ! One thing that I think we're missing here is some unit tests for the keeper provider.. You can check gcp implementation for some reference there :)

yup, i have those half way, i've been afk for a few days

hey @ppodevlab ! One thing that I think we're missing here is some unit tests for the keeper provider.. You can check gcp implementation for some reference there :)

it should be ready for review, i will increase the coverage on future iterations, for now core functions are covered

hey @ppodevlab sorry for the delay :santa: :christmas_tree: ! I'll take a look at this this week

Hey @ppodevlab do you need any help with the linter issues? I think it's just that, everything looks good :sun_with_face:

Hey @ppodevlab do you need any help with the linter issues? I think it's just that, everything looks good 🌞

How can i see the exact lines the linter is complaining about?

You should be able to see the logs here.

Lint failures

pkg/provider/keepersecurity/client_test.go:6: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        "fmt"
pkg/provider/keepersecurity/client_test.go:10: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        ksm "github.com/keeper-security/secrets-manager-go/core"
        "reflect"
        "testing"
pkg/provider/keepersecurity/client.go:8: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
        ksm "github.com/keeper-security/secrets-manager-go/core"
        "golang.org/x/exp/maps"
pkg/provider/keepersecurity/client.go:12: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        "strings"
pkg/provider/keepersecurity/provider.go:6: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        esv1beta1 "github.com/external-secrets/external-secrets/apis/externalsecrets/v1beta1"
        smmeta "github.com/external-secrets/external-secrets/apis/meta/v1"
        "github.com/external-secrets/external-secrets/pkg/utils"
pkg/provider/keepersecurity/provider.go:13: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        "net/url"
pkg/provider/keepersecurity/provider.go:14: File is not `gci`-ed with --skip-generated -s standard,default (gci)
        kclient "sigs.k8s.io/controller-runtime/pkg/client"
pkg/provider/keepersecurity/client.go:202:1: paramTypeCombine: func(name string, key string, value []byte) (string, error) could be replaced with func(name, key string, value []byte) (string, error) (gocritic)
func (c *Client) createSecret(name string, key string, value []byte) (string, error) {
^
pkg/provider/keepersecurity/fake/fake.go:1: Missed header for check (goheader)
package fake
pkg/provider/keepersecurity/client.go:1: Missed header for check (goheader)
package keepersecurity
pkg/provider/keepersecurity/provider.go:1: Missed header for check (goheader)
package keepersecurity
pkg/provider/keepersecurity/client_test.go:1: Missed header for check (goheader)
package keepersecurity
pkg/provider/keepersecurity/client.go:230: unnecessary trailing newline (whitespace)

File is not gci-ed with --skip-generated -s standard,default (gci)
it should be fixed now.

You should be able to see the logs here.
Lint failures

clicked the wrong button, lint issues should be fixed by now

@ppodevlab Would it be possible to change the way configuration is handles and instead of adding individual parts from the JSON file, it would be great to just use one base64 string instead, as that's what our SDKs understand as well. At it is stated on their documentation page:

Most Secrets Manager integrations use a base64 string ...

In Go SDK this is how it is set:
options := &ksm.ClientOptions{
	Config: ksm.NewMemoryKeyValueStorage("LONG BASE64 STRING")
}

It looks like all you need to do is to simplify KeeperSecurityProvider to just contain base64 string and then change what getKeeperSecurityConfig returns.

Definitely, it is something i've been thinking about, together with some other improvements

authors: gusfcarvalho moolen ppodevlab

repo: external-secrets/external-secrets


text:
🛑 Extratone is down

In 79fe3d3, Extratone (https://www.extratone.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Extratone is back up in fe3aeca.

repo: extratone/up


text:
Add Image size option to WiggleButton

If you use a custom image for WiggleButton or even other ones, they may be not the desired size for a TabBar, so you need to resize it.
This PR adds this optional option to WiggleButton with a default value of 20 for frame's width and height.

Please squash commits on merge.

@f3dm76 no merge for this pr?

@amirsaam, please squash your commits

@f3dm76 done.

@amirsaam, Please check out version 1.0.4, thank you so much for your contribution, have a great day!

repo: exyte/AnimatedTabBar


text:
feat: update to eye v10.17.0

feat: update to eye v10.17.0

:tada: This PR is included in version 16.16.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release
v16.16.0

Your semantic-release bot :package::rocket:

repo: eyereasoner/eye-js


text:
fix: update to lingua v1.3.1

fix: update to lingua v1.3.1

:tada: This issue has been resolved in version 16.20.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release
v16.20.1

Your semantic-release bot :package::rocket:


text:
ANR on attempt to pop PortalEntry that is still animating in

We've found an edge case where tapping too quickly to close a screen can trigger an ANR. It may also be related to additionally trying to present that screen during that short time window.
The steps in our specific case were:

Have 2 portals with buttons located around the same coordinates in the screen
The 1st portal's button pushes the 2nd portal, but the 2nd portal's button closes that portal
If the user spams the button on the 1st portal, their taps will eventually carry over to the 2nd portal that's just starting to be presented.

The taps from Step 3 may also request to present this 2nd portal additional times, so it's possible that we're enqueuing requests both to push and to pop that portal key. But I believe to have isolated the requests to push and I can still repro.
Also note I don't know that this can be reproduced in debug; release is either required, or much easier.
Relevant stack trace (reverse chronology):
com.eygraber.portal.internal.PortalEntryBuilderKt.findInsertionIndex (PortalEntryBuilder.kt:262)
com.eygraber.portal.PortalBackstackImpl.pop (PortalBackstackImpl.java:283)
MyRouter.closeSecondPortal$1.invoke
MyRouter.closeSecondPortal$1.invoke
com.eygraber.portal.internal.PortalState.transact (PortalState.java:62)
com.eygraber.portal.PortalManager.withTransaction$default (PortalManager.kt:71)
MyRouter.closeSecondPortal

portal version: 0.9.30

I have an idea of what the issue is. I'll take a closer look later today.

Thank you!
My apologies that after reporting #724, I've found it may be the same scenario. In fact, I've been unable to reproduce the issue here as originally described; my apologies on the bad attempt to summarize it. I'll add more details now that do reproduce it 100%.
Scenario: my flow has screens A, B and C in this order

starting from A,
when I push B, I also detachFromComposition A, from the same transaction
B has a footer button to open C. From the same transaction, we pop(inclusive = true) until A, and push C
C has a footer button to close it (same coordinates as B's footer button)

If I click the button in B too quickly, that will eventually click C's button as it animates in, and trigger an ANR.

I have to investigate why an ANR is happening. My guess from your description and the related code in the library is that there's a loop that isn't terminating when it should.
I believe the reason is because I'm not making a defensive copy of a mutable list. The reason for that was because everything ran in a transaction so there wasn't anything happening concurrently, but the handling of a disappearing entry became more complex and might have caused the list to mutate while other code was operating on it.

authors: eygraber gobetti

repo: eygraber/portal


text:
Generate Open API 3 definition

Generate to a single OpenAPI Specification file

All models to schemes
All routes
Authentication
Sample data
JSON / YML format

d58bdb42f4bc5539220a66bbafda41d4b7286800

repo: ez-connect/go-rest


text:
Upgrade xml dependency

I got Because flutter_app_name 0.1.1 depends on xml ^5.1.2 and application depends on xml 6.0.1, flutter_app_name 0.1.1 is forbidden.
can you update xml dependency?

Any update on this ?

authors: Ravensof gruvw


text:
Scalars colouring defaults to Normal, makes STEP files look weird

Describe the bug

On macOS, Scalars coloring is set to [Normal] by default and that makes STEP files look weird
On Linux (add: with broken config) Scalars coloring is set to [OFF]

To Reproduce
Steps to reproduce the behaviour:

Get a fresh install of F3D 2.0.0 on macOS
Download this file (or download STEP from [here](https://www.mcmaster.com/95165A619/) )
Start f3d "95165A619_Strong-Hold Quick-Release Pin.STEP"
Observe weird colouring
Press H
Notice: Scalars coloring: [Normal]

Expected behaviour
Scalars coloring: [OFF] and file renders as an uniform grey body
Observed behaviour
Scalars coloring: [Normal] and file renders in yellow-red spotty palette

Mac
Expected behaviour (Linux)

System Information:

OS: macOS 13.3.1 (22E261)
Cross checked on EndeavourOS latest / Gnome 43 / Wayland

F3D Information
Paste the content of f3d --version:
F3D 2.0.0

F3D - A fast and minimalist 3D viewer
Version: 2.0.0.
Build date: 2023-04-20 17:06:45.
Build system: Darwin 64-bits.
Compiler: AppleClang 14.0.0.14000029.
External rendering module: ON.
Raytracing module: OFF.
VTK version: 9.2.6 (build 20230224).

Additional context
Cross-checked it on Linux (EndeavourOS latest, Gnome 43 DE, Wayland), and it behaves as expected.
I'm sure I didn't make any changes to config files.

This is caused by the naming of the file. We expect STEP files to have the .step extension in the configuration file logic.
TBF I'd have expected this file to not even be openable at all when F3D checks that the reader can open it.
Wdyt @Meakk ? Should we force the config file regexp to be case insensitive ?

Cross checked on EndeavourOS latest / Gnome 43 / Wayland

Your linux installation does not have config files for some reasons, but lets debug this in the other issue.

This is caused by the naming of the file. We expect STEP files to have the .step extension in the configuration file logic. If you rename your file, this issue will go away.

That's why I pointed at McMaster-Carr website, they are a major player and they distribute those files.

TBF I'd have expected this file to not even be openable at all when F3D checks that the reader can open it.

Do I feel like it's a bad idea? I like my picture viewer to try opening any picture with any, wrong and broken, extension, and I  like my video player doing the same. Why not handle files by their magic signature, not by extension?

Your linux installation does not have config files for some reasons, but lets debug this in the other issue.

Please dismiss it. I've used Arch AUR package because I was lazy, the official package is still at 1.3.1 or so.

Do I feel like it's a bad idea?

YOu are right, we definitely should be able to open this file, I'm just trying to understand how it works. We will definitely fix this. Thanks for raising the issue.

I've used Arch AUR package because I was lazy, the official package is still at 1.3.1 or so.

We need to update the AUR package, a bit too busy with the release right now.

Can confirm that after fixing F3D config (#752 ) it shows the same way on Linux

Wdyt @Meakk ? Should we force the config file regexp to be case insensitive ?

Yes I think so

Hi @epsimatic
This is now fixed in master, you can wait for the next release OR you can just download the nightly: https://github.com/f3d-app/f3d/releases/tag/nightly

authors: Meakk epsimatic mwestphal


text:
能否支持文件请求

默认http请求为application/json
希望能支持application/octet-stream

建议的最佳实践是将文件直接上传到云端的对象存储服务中，这样可以避免服务器和容器重启或者网络故障导致的文件无法上传或者上传后丢失。

@Zhengshuda 如果是独立部署的模式，可以参考这个 Demo： https://github.com/faasjs/starter/blob/main/examples/download.func.ts

authors: Zhengshuda zfben

repo: faasjs/faasjs


text:
might want to reconsider the package and module name (Base64)

Currently, the module name is Base64. Unfortunately, as of today in Swift, module names need to be globally unique in a whole program. If you'd like many people to use this package, I'd recommend renaming the module to a name that won't clash. Either something cutesy or something longer. I found using github's advanced search to search all files named Package.swift quite handy to find something that is unique today and will likely stay unique in the future.

github search in Package.swifts: https://github.com/search?l=&q=base64++filename%3APackage.swift+language%3ASwift&type=Code

The same unfortunately applies to the package name (both in Package.swift as well as the basename of the URL). Currently both of them are swift-base64 which also isn't unique.
I'd reconsider the naming and make it unique.

Just checked for ‘Base64Kit’ and ‘swift-base64-kit’. What do you think @weissi?

@fabianfett generally *Kit isn’t great because Apple often uses *Kit but I guess base 64 is in Foundation and such a narrow use-case that it seems safe in this case

authors: fabianfett weissi


text:
Use sub-tests for related tests within iteration_repo_tests.

Move multiple test functions to sub-tests.

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-1

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-2

Codecov Report

Merging #1719 into master will increase coverage by 0.12%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1719      +/-   ##
==========================================
+ Coverage   57.03%   57.16%   +0.12%
==========================================
  Files         128      128
  Lines       14777    14776       -1
==========================================
+ Hits         8428     8446      +18
+ Misses       5696     5678      -18
+ Partials      653      652       -1

Impacted Files
Coverage Δ

controller/iteration.go
86.1% <0%> (-0.05%)
:arrow_down:

remoteworkitem/scheduler.go
63.26% <0%> (+16.32%)
:arrow_up:

remoteworkitem/github.go
100% <0%> (+21.62%)
:arrow_up:

models/transaction.go
63.63% <0%> (+27.27%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8f8956...d5bdb1e. Read the comment docs.

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-3

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-4

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-5

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-6

thanks, @xcoulon for review I will work on it in a bit.

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-7

[test]

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-8

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-9

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-10

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-11

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-12

[test]

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-13

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-14

@pranavgore09 snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1719-15


text:
fix(v2): handle case when  children is not a string

Motivation
Fix #1581
We should only pass our codeblock component if it's content is a string.
Note that this bug is because MDX turns
 or react component to real react element.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
import BrowserWindow from '../components/BrowserWindow';

  <BrowserWindow url="http://localhost:3000" >
    Lol bro
  </BrowserWindow>

Before

After

Hmm.. I feel this is the long term solution though.
Syntax highlighting doesnt work if the children is not a string.
Even mdxjs.com had error for this

Official mdxjs.com also use children.trim !
https://github.com/mdx-js/mdx/blob/deff36bebfedb3a9de0a0575ee9a1b55b9b8aa18/packages/gatsby-theme-mdx/src/components/code-block.js#L8-L32

Even if trim is removed. It will error out because Highlight expect a string, not react element

see https://github.com/FormidableLabs/prism-react-renderer#code

I suppose it's not recommended to use  directly then. They should be using ``` instead.

Yeah actually it was true. Why would someone use  and put  or something else after that ~.~
But well, let's be the nice guy who handles even this kind of abuse

Document this in #1578

authors: endiliey wgao19 yangshun

repo: facebook/Docusaurus


text:
minerva-ag: Fix sensor addr replacing error

Summary:

A misplacement of the number in the sensor configuration in the PDR table caused find_vr_addr_by_sensor_id() to insert an unexpected sensor address into the table.
Added the correct number to each sensor configuration to resolve the issue.

Test Plan:

Build code: PASS
Get sensor reading: PASS

Hi @jagpalgill, I've rebased this PR to the latest main branch, thanks.

repo: facebook/OpenBIC


text:
'mapwithai'

Description
When uploading a changeset to OSM, should the mapwithai source be a hashtag instead?

Version
2.0.3
What browser are you seeing the problem on? What version are you running?
Edge v115.0
The OS you're using
win
Steps to reproduce
No response
The browser URL at the time you encountered the bug
https://rapideditor.org/edit#background=EsriWorldImagery&datasets=fbRoads,msBuildings&disable_features=boundaries&map=19.31/-27.28025/152.94342&overlays=osm-gps
The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36 Edg/115.0.1901.188

Let me take this one internal. We're retiring the 'map with AI' brand so this should probably become a thing of the past. We do use it for internal analytics though, so we'll likely replace it with something else. Will also consider using the hashtag!

authors: Bonkles gyCfjSnO

repo: facebook/Rapid

license: ISC


text:
Mapillary sequence lines missing

There should be lines connecting all these sequences.

fixed


text:
Unit tests won't run

I can run the integration tests but when I run:
buck test javatests/com/facebook/crypto:crypto
I get the following error:
No build file at javatests/com/facebook/crypto/BUCK when resolving target //javatests/com/facebook/crypto:crypto.

I'm not super familiar with buck but it seems like buck test works, should I update the readme to reflect that?

@siyengar I can add that to the Readme if it makes sense and just include it in my other PR if you want?

Ya that should be updated as well, great catch. Would appreciate it

Ok. Will take care of that today / tomorrow

authors: corymsmith siyengar

repo: facebook/conceal


text:
Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

I am trying to Yarn Workspaces with CRAv2 and I have made a common-package and a dashboard-package. The latter is a CRAv2 application. The common-package contains some helper methods and I am planning to add React components to.
Now I added the code below and this is causing a message Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation. while compiling the dashboard application.
export class ServerValidationError extends Error {

    constructor(message = 'Validation error', statusCode = 412, errors) {
        super(message)
        this.name = 'ServerValidationError';
        this.errors = [];
        this.statusCode = statusCode;

        if (errors) {
            this.errors = errors;
        }

        if (Error.captureStackTrace) Error.captureStackTrace(this, ServerValidationError);
    }

    isError = (err) => {
         return err && err.name === 'ServerValidationError';
    }
}

What am I doing wrong? Would the code get transpiled by the CRA application?

We don’t have a good support for this use case (compiling source for workspaces) right now. There are several issues discussing potential ways it could work but I don’t have anything for you right now, sorry.

You can use something like nwb to compile those folders independently though.

Hmm, that's a shame. Are you suggesting to switch to nwb?

I’m saying you can run nwb in the “shared” packages, and then keep using CRA for app package.

Hmm, I will look into it. At first sight it looked similar to CRA :)
Maybe for now I should just copy over the files from the other project to this project

@gaearon nwb doesn't appear to be using Babel 7 yet. Also doesn't appear to use jest for testing.
I know that in our projects we commonly use this proposal for handling simple things like,
state
class A extends Component {
  state = {
    myFlag: false
  }
}

displayName
class WithUser extends Component {
  displayName = `WithUser(${ComposedComponent})`
}

avoiding binding this through use of arrow functions
class A extends Component {
  handleClick = e => { /* do something */ }
}

It would be nice to be able to use this proposal

I understand why you want to use it. There are existing discussions for monorepo support — that’s what your issue is about. Not about the proposal itself.

This is attempting to consume 3rd party components that use class properties in a CRA.

same issue for me, I don't need monorepo support, I publish my packages uncompiled to npm, and when I import them to my CRA app I expect them to work
@gaearon I thought CRA v2 transpiles the node_modules

That is exactly what the monorepo discussion is about. 😄 I believe you saw this per your other issue.

Thanks for clarifying, my bad.
do you have any recommendations of tools or forks of CRA that support monorepos ?
I see that next.js supports this https://github.com/zeit/next.js/blob/canary/examples/with-yarn-workspaces/packages/web-app/next.config.js

authors: Timer bogdansoare gaearon stramel weyert

repo: facebook/create-react-app


text:
Use jsdom environment for tests by default

I didn't like --env=jsdom being present in test command, so I'm happy to remove it as a part of https://github.com/facebook/create-react-app/issues/3887
Resolves https://github.com/facebook/create-react-app/issues/3887

Let's hold off merging until 2.0 or people will be confused by contradictory docs.
Thanks!

Cool, changes are rather minimal. Ping me when you need a rebase or something. And have a great weekend! :)

You too. Thanks!

Oops, I didn't see this PR and just made the same change! Our patches our slightly different though, see #5074.

Haha, no worries! I thought it was merged already XD

Awesome! 🎉  Sorry again. 😅

authors: Timer gaearon thymikee


text:
Add support for measure mode

Implements #160

@lucasr updates with requested changes

These changes break current usages. Any suggestions of how to best handle this?

repo: facebook/css-layout


text:
Use more than one type of key

I have an user object, I want to load users from dataloader with username or email.
How could I do that

@ChiShouWu You can use this method https://github.com/facebook/dataloader#loading-by-alternative-keys

@alexisgahon That is !! Thanks

authors: ChiShouWu alexisgahon

repo: facebook/dataloader


text:
docs: improve wording of using Markdown file paths

Author meant to recommend the use of full paths rather than relative paths: Technical edit
Revised intro to naturally introduce the benefits of this recommendation: Style edit

Motivation

Have you read the Contributing Guidelines on pull requests?

Test Plan

Related PRs

@BigDataWriter Thanks!

authors: BigDataWriter Josh-Cena

repo: facebook/docusaurus


text:
fixed a typo in docs/Overview.md

Summary
This PR fixed a typo in file docs/Overview.md, where better options for word use in the changed place are  we and users, and we sounds better to me and thus the PR.
Test Plan
No test needed.

Already addressed with #2089, but thanks for proposing a fix @Haobo-Zhao!

authors: Haobo-Zhao claudiopro

repo: facebook/draft-js


text:
Column resizer line not disappearing on column resize

My FixedDataTable's column resizer line is not hiding when I drag and release it, I've been trying to solve this for several hours and am not sure what is going wrong.
I've noticed that in online examples, whenever I release the resizer, an initially present class called "fixedDataTableColumnResizerLineLayout_hiddenElem" is re-added to the resizer via JavaScript, which hides the resizer.
That class isn't being re-added to my resizer. I've noticed that everything else about the resizer seems to match the online examples.
I've checked my own JavaScript, and don't think there is anything that might be interfering with FixedDataTable's own JavaScript for re-adding the class. For reference, I'm using an older React 0.14.6 (and the latest FixedDataTable 0.6.0). But looking at FixedDataTable's package.json, this seems like it shouldn't make a difference?
Thanks!

I can confirm. Having same issue.

Any solutions?

Found :) https://github.com/facebook/fixed-data-table/issues/167#issuecomment-118022854

Hey @burakcan - just read the issue you linked and it seems like the fix for one of the users was to "implement isColumnResizing"? Did anything in that issue fix it for you, and if so how did you do it? I was under the impression that isColumnResizing was implemented by FixedDataTable itself, not something that users of the library implement.

I figured it out. As it turns out, this isn't a bug - the answer is simply that if you are implementing a Table component with resizable columns, you must pass isColumnResizing={false} as props to that Table.
I realized this after reading the issue @burakcan linked above, as well as inspecting the source code for the FixedDataTable example that demonstrates resizable columns: https://github.com/facebook/fixed-data-table/blob/master/examples/ResizeExample.js#L61.
The documentation on isColumnResizing is really unclear: https://facebook.github.io/fixed-data-table/api-table.html. Both the name of the prop and the fact that it needs to be set to false don't make sense. Also, there is no in-depth documentation on it.

authors: AndreyStrib burakcan rzhou186

repo: facebook/fixed-data-table


text:
flow-upgrade not working under Windows

I've tried to run flow-upgrade under Windows 10 and it fails

Then I tried to do it with Windows Ubuntu Bash and everything works. So it seems like it's only Windows specific problem.

As a quick workaround for anyone who doesn't want to install Windows Ubuntu Bash, you can open the runCodemods.js file shown on the first line of the call stack and edit fs.mkdtempSync('/tmp/flow-upgrade-') to something like fs.mkdtempSync('C:/tmp/flow-upgrade-').
Then make sure the C:\tmp dir exists and run flow-upgrade again. Worked for me on Windows 7.

for anyone who doesn't want to install Windows Ubuntu Bash

If you install git for Windows you get a bash plus the usual Unix command line tools for free.

@lll000111 my screenshot is from git bash ;) It's not working. As well as PowerShell

Okay... so this problem can be reproduced with this simple command (taken from the actual code) in a node.js console:
fs.mkdtempSync('/tmp/flow-upgrade-')

yep.

See the node.js issue I created referenced above - the absolute path on Windows gets translated to C:\tmp\...

Can confirm, same issue occurring - @lll000111's workaround above resolved it.

I had all my line endings converted as well.

@lll000111 if anyone wants to make a PR of this and ping me, the fix seems simple. It seems to be just changing the line here: https://github.com/facebook/flow/blob/5aaf9b9177514c7ed0c2b65af7efff4fea5c5775/packages/flow-upgrade/src/codemods/runCodemods.js#L27
From fs.mkdtempSync('/tmp/flow-upgrade-'), to fs.mkdtempSync(path.join(os.tmpdir(), 'flow-upgrade-'),.
Busy with lots of other stuff so it's in the backlog for some time. Easy GitHub square though (:

@mrkev I'm new here, ran into the same problem.  I wanted it working, and it was indeed an easy fix, so I put up a PR.

Perfect, thanks! Will attempt to merge soon (:

authors: JMontagu jeffersoneagley lll000111 mjomble mrkev tirli

repo: facebook/flow


text:
When I run itorch or when I start a new itorch web in itorch notebook, the following happens

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/paths.py:62: UserWarning: IPython dir '/Users/Shikai/.ipython' is not a writable location, using a temp directory.
" using a temp directory.".format(ipdir))
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/jupyter-console", line 11, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/traitlets/config/application.py", line 588, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_console/app.py", line 136, in initialize
self.init_shell()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_console/app.py", line 103, in init_shell
JupyterConsoleApp.initialize(self)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 329, in initialize
self.init_kernel_manager()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 283, in init_kernel_manager
self.kernel_manager.start_kernel(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_client/manager.py", line 244, in start_kernel
**kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_client/manager.py", line 190, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I am running on MacOSX 10.11, have all newest version jupter ipython itorch installed...
Please help me out:-)
Thanks!

Hi, I'm facing with the same issue on Ubuntu 14.04. Could somebody help us?
Traceback (most recent call last):
  File "/usr/local/bin/jupyter-console", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 595, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/usr/local/lib/python2.7/dist-packages/traitlets/config/application.py", line 74, in catch_config_error
    return method(app, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jupyter_console/app.py", line 138, in initialize
    self.init_shell()
  File "/usr/local/lib/python2.7/dist-packages/jupyter_console/app.py", line 105, in init_shell
    JupyterConsoleApp.initialize(self)
  File "/usr/local/lib/python2.7/dist-packages/jupyter_client/consoleapp.py", line 334, in initialize
    self.init_kernel_manager()
  File "/usr/local/lib/python2.7/dist-packages/jupyter_client/consoleapp.py", line 288, in init_kernel_manager
    self.kernel_manager.start_kernel(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jupyter_client/manager.py", line 243, in start_kernel
    **kw)
  File "/usr/local/lib/python2.7/dist-packages/jupyter_client/manager.py", line 189, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/usr/local/lib/python2.7/dist-packages/jupyter_client/launcher.py", line 123, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Having the same problem on OSX
Traceback (most recent call last):   File "/Users/lc/anaconda/bin/jupyter-console", line 5, in <module>     app.main()   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance     return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)   File "/Users/lc/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 588, in launch_instance     app.initialize(argv)   File "<decorator-gen-114>", line 2, in initialize   File "/Users/lc/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 74, in catch_config_error     return method(app, *args, **kwargs)   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_console/app.py", line 136, in initialize     self.init_shell()   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_console/app.py", line 103, in init_shell     JupyterConsoleApp.initialize(self)   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 329, in initialize     self.init_kernel_manager()   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_client/consoleapp.py", line 283, in init_kernel_manager     self.kernel_manager.start_kernel(**kwargs)   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_client/manager.py", line 244, in start_kernel     **kw)   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_client/manager.py", line 190, in _launch_kernel     return launch_kernel(kernel_cmd, **kw)   File "/Users/lc/anaconda/lib/python2.7/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel     proc = Popen(cmd, **kwargs)   File "/Users/lc/anaconda/lib/python2.7/subprocess.py", line 710, in __init__     errread, errwrite)   File "/Users/lc/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child     raise child_exception OSError: [Errno 2] No such file or directory
Any help?

had the same error
clearing all old jupyter kernels in ~/.local/share/jupyter/kernels/  and reinstalling iTorch solved it

repo: facebook/iTorch


text:
Modernification: using Mocha for tests

Related issue: https://github.com/facebook/immutable-js/issues/742
Introduction
I started implementing the tests using Mocha instead of Jest. I figured it'd be a good idea to send a preliminary PR and do things in the open. This way, I'd like to get as much feedback on it as possible before we convert too many tests.
Changes so far

Added npm script (npm run testmocha) to run Mocha tests. The Mocha tests are also written in TS like the current tests. The code is compiled using ts-node.
Added watcher to re-run tests on file changes (npm run testmocha:watch). This is to make my life a little easier when converting the tests, and we can remove this when the tests are fully converted (although having a watcher is always nice, so we could leave it in).
Tests are all in the test/ directory, adhering to Mocha's convention. This also makes it easy to run the Mocha and Jest tests side-by-side, and to port them over incrementally.
mocha-testcheck is used for the generative testing, replacing jasmine-check.
Some code styling was applied: making use of whitespace where applicable and using const and let where appropriate (not sure if you're okay with this @leebyron, if you'd rather convert the tests verbatim, let me know).

Current issues

The Map test has two failing test cases (accepts flattened pairs via of() and does not accept mismatched flattened pairs via of()) where Map.of() seems to be undefined, while it is defined in the Jest test. Any idea why that might be? I'm importing the exact same immutable as the Jest tests are, yet it still seems to be different for some reason.

I'll update this PR with more converted tests and any questions I might have regarding failing tests.

This is looking awesome, thanks for your help! I agree with this approach: set up a test infra and then let's do one test migration per PR to keep things easy to follow.
I'm not sure what's up with the failing tests. I can help investigate tomorrow

Huh, that's strange. Running the tests that use Map.of() on another machine works just fine, the Map.of() isn't undefined there. I'll investigate when I get home, but it looks like we're good to go for now. All tests for Map have been ported, and pass!

Closing in favor of #1018

authors: leebyron thomastuts

repo: facebook/immutable-js


text:
Jest spyOn React.createRef() not working as expected

I've been using React.createRef on one of my components, and using ref.current.validate() & current.state which works fine on implementation but not while testing it using Jest. jest.spyOn works on validate() function but loses all other props of ref such as 'state' here. Also using Enzyme Mount for the component render.
jest.spyOn(React,'createRef').mockReturnValue({             current: {                 validate: jest.fn(),                 state: 'abc'             }         })

I also am having issues with this.
Not only is the spyOn method not seeming to be applied, but it is never called either.
Similar behavior using Object.defineProperty as well.
let ref = jest.spyOn(React, "createRef").mockImplementation(() => {
        return { current: { clientWidth: 1400 } };
});

// OR

Object.defineProperty(React, "createRef", {
    get: jest.fn(() => {
        return { current: { clientWidth: 1400 } };
     }),
    configurable: true,
});

Still testing, haven't figured out the problem yet :(

I also am having issues with this.
Not only is the spyOn method not seeming to be applied, but it is never called either.
Similar behavior using Object.defineProperty as well.
let ref = jest.spyOn(React, "createRef").mockImplementation(() => {
        return { current: { clientWidth: 1400 } };
});

// OR

Object.defineProperty(React, "createRef", {
    get: jest.fn(() => {
        return { current: { clientWidth: 1400 } };
     }),
    configurable: true,
});

Still testing, haven't figured out the problem yet :(

authors: WillGITCode swathisainadh

repo: facebook/jest


text:
List the files that will run against using the --onlyChanged

💬 Questions and Help
Please note that this issue tracker is not a help forum and this issue will be closed.
Jest has to options --onlyChanged to run only the relevant tests based on the latest changes and --listTests to list all the test files. Is there an option to list the test files that will be executed when the --onlyChanged is enabled?
The reason I am asking is that in our workflow we split the test files into chunks and we spin up workers to run these chunks in parallel, but still we run all the tests no matter if they are relevant with the latest changes, it would be cool if we still can split the tests into chunks but do it based only on ``--onlyChanged`

I think it makes sense for --list-tests to respect any other filters passed. 👍 Could you refile this as a feature request using the template? Or even better, send a PR implementing it 🙂

@SimenB sure, I can have a look

authors: AvraamMavridis SimenB


text:
Home page typo (french)

🐛 Bug Report
I think there is a typo in the French home page of Jest website, instead of "Rapide et sûre" it should be "Rapide et sûr".
Could be great if other french speaking people could confirm whether this is really a typo, because depending on the context, that might not be a typo.

@slorber? 😀

Fixed
@nyc4m if you notice translation typos you can suggest a fix directly on the Crowdin UI here: https://crowdin.com/project/jest-v2/fr

Thanks!

@slorber ok, thanks for the feedback, I will do that next time 😁

authors: SimenB nyc4m slorber


text:
SyntaxError: Unexpected reserved word when using nativeBase

Do you want to request a feature or report a bug?
Bug report
What is the current behavior?
jest fails to run test on react component when using nativeBase with
 FAIL  __tests__/app/containers/login.js
  ● Test suite failed to run
    /Users/alvarojosepl/workspace/jest_syntax_error/node_modules/native-base/index.js:4
    import Drawer from './Components/vendor/react-native-drawer';
    ^^^^^^
    SyntaxError: Unexpected token import

      at transformAndBuildScript (node_modules/jest-runtime/build/transform.js:320:12)
      at Object.<anonymous> (index.ios.js:14:17)

this is on the import line :
import { Container, Button, Icon } from 'native-base'

i am not sure what is being taken there as a reserved word (remove the line will actually solve remove the specific error).
If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
https://github.com/kanekotic/jest_syntax_error
What is the expected behavior?
the test to pass :P
Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
"dependencies": {
    "native-base": "^0.5.12",
    "react": "^15.3.2",
    "react-native": "^0.39.2",
  },
  "jest": {
    "preset": "react-native",
    "setupFiles": [
      "./__mocks__/setup.js"
    ]
  },
  "devDependencies": {
    "babel-eslint": "^7.1.0",
    "babel-jest": "18.0.0",
    "babel-preset-react-native": "1.9.1",
    "jest": "18.1.0",
    "jest-react-native": "18.0.0",
    "react-test-renderer": "15.4.1",
    "whatwg-fetch": "2.0.1"
  }

You're probably using Node 4. On Node 6 & 7 Babel supports better errors for this kind of issues:
import Drawer from './Components/vendor/react-native-drawer';
^^^^^^
SyntaxError: Unexpected token import

Not sure how we can fix this.
cc: @cpojer

yes I was in 4.0 i have updated and got your same issue, i will update the first post, thanks :)

It seems that Jest is not transforming native-base. The React Native tutorial in the Jest website has a section about transformIgnorePatterns customization, which might be helpful

By default the jest-react-native preset only processes the project's own source files and react-native.

Thank you @rogeliog!

to leave it as reference If anyone else gets here the correct setting would be
"jest": {
		"preset": "react-native",
		"transformIgnorePatterns": [
			"node_modules/?!(react-native|native-base)"
		]
	}

I was having the same issue, shouldn't Jest ignore those transforms on react-native since they are all using ES6+?

Ask the question on react native repo ;)

@thymikee: can you please elaborate how and why this question belongs to react native repo instead of here?

Sure, react native maintains its preset, which you're probably using.

\node_modules@yellowspot\ng-truncate\dist\index.js:1
({"Object.":function(module,exports,require,__dirname,__filename,global,jest){export { TruncateModule, TRUNCATE_PIPES } from './truncate.module';
^^^^^^
SyntaxError: Unexpected token export

  16 | import { TruncateModule } from '@yellowspot/ng-truncate';
  17 | import { Angulartics2Module } from 'angulartics2';
> 18 | import { LoggerModule, NgxLoggerLevel } from 'ngx-logger';
  19 | import { ArchwizardModule } from 'angular-archwizard';
  20 |
  21 | library.add(fas, far); // Add all regular and solid Font Awesome icons -> TODO: Include only currently used icons in the library

at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17)
at Object. (src/main/webapp/app/shared/shared-libs.module.ts:18:21)
at Object. (src/main/webapp/app/shared/index.ts:16:22)
I have tried
transformIgnorePatterns: ['/node_modules/(?!@angular/common/locales)',
'/node_modules/(?!@yellowspot/ng-truncate)', '/node_modules/(?!ngx-logger/NgxLoggerLevel)'],
but didn't worked..  Any thoughts , thanks in advance

authors: kanekotic lucasbento rogeliog sngs1 thymikee


text:
Jest-babel createTransformer Error: customJSTransformer.includes is not a function

🐛 Bug Report
When using the transform configuration, for transpiling my JS using Babel, I get an error from jest stating:
TypeError: customJSTransformer.includes is not a function

This error occurs, since the setupBabelJest assumes, that the JS transform property is an array:
https://github.com/facebook/jest/blob/master/packages/jest-config/src/normalize.js#L138
But the value returned by babelJest.createTransformer() is an Object with implements the Jest Transformer.
I'm not shure how a fix might be possible, otherwhise I would include a PR.
Maybe the if chain could first check, if it an Object and then else if () check if it's an array afterwards.
To Reproduce
jest.config.js:
const babelJest = require("babel-jest");

module.exports = {
  transform: {
    "^.+\\.jsx?$": babelJest.createTransformer({
      presets: [
        [
          require.resolve("babel-preset-env"),
          {
            targets: {
              node: "10"
            }
          }
        ]
      ]
    })
  }
};

command:
jest
Expected behavior
The transformer should be appended correctly and without error to the jest Config
Link to repl or repo (highly encouraged)
https://github.com/NicolaiSchmid/jest-error

clone
yarn
yarn test

Run npx envinfo --preset jest
Paste the results here:
  System:
    OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
    CPU: x64 Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz
  Binaries:
    Node: 9.4.0 - ~/.nvm/versions/node/v9.4.0/bin/node
    Yarn: 1.9.4 - /usr/bin/yarn
    npm: 6.3.0 - ~/.nvm/versions/node/v9.4.0/bin/npm

We do not have support for creating a transformer that way. It needs to be a separate file, then you can do require.resolve on it.
I do think supporting it would be good though, so keeping this open as a feature request

Should I do a PR for it? I could free up some time in the coming week.

I have a similar error but with Array.reverse is not a function I tried with a custom transform, and with the babel.config.js on the root of the package (sub-package on monorepo) and didn't work, look like the problem is with a babel function config.
module.exports = babelJest.createTransformer({
  rootMode: 'upward',
});

I have no idea what Array.reverse is. Array.prototype.reverse has existed forever (sine IE 5.5), but I doubt this is a problem with Jest

With webpack or storybook this error didn't happen only with jest

it was a mistake  modules: 'commonjs' on @babel/env solved me issue

Following example works for me:
jest.config.js:
transform: {
  '^.+\\.(js|jsx)$': '<rootDir>/test/babelTransformForJest.js',
},

babelTransformForJest.js
const babelJest = require('babel-jest')
const { getFinalBabelConfig } = require('../utils')

module.exports = babelJest.createTransformer(getFinalBabelConfig())

getFinalBabelConfig is just a utility function here that returns the babel configurations.

I do think supporting it would be good though, so keeping this open as a feature request

We cannot support this as we cannot pass instances to workers

authors: NicolaiSchmid SimenB shahzaibkhalid vxcamiloxv