primordic/IssueDupesLite huggingface dataset:
Repository: jordanbaird/Ice

Issue #283: [Bug]: Ice's view of the menu bar is missing the icon for AltTab
Created: 2024-08-01T00:01:15Z
Update: A new version of Ice dropped 🎉 as I was writing this with some promising changes in the changelog. Feel free to close this if you know it's fixed; I'll reopen it if I see the problem with the new version. Thanks for the continued improvements :) 👍
Check Existing Issues

 I have searched existing issues, and this issue is not a duplicate

Description
There is an icon in my menu bar that is not in Ice's view of the menu bar or the hidden bar. My goal was to move the icon to the menu bar, but I can't do it.
I'm assuming restarting Ice will solve this.
Steps to Reproduce
I am not sure how to reliably reproduce this, but here is a screenshot:

I read somewhere that the Ice view is supposed to refresh every 3 seconds, but this discrepancy seems permanent.
Update: Moreover, the Steam icon in the hidden bar does not work, and I don't think Steam is running (it was running previously, but I quit it). That's another discrepancy that's probably related.
Ice Version
0.10.3
macOS Version
14.5
Screenshots
No response

Duplicate issue #325: [Bug]: Ice hates my Figma menu bar icon
Created: 2024-08-17T22:55:43Z
Check Existing Issues

 I have checked existing issues, and this issue is not a duplicate

Description
Out of all the apps that appear in my menu bar, my most used one doesn’t play well with Ice. I set my Figma icon to be always shown. Upon restarting Figma the first time, the icon didn’t show at all. I opened Ice and saw that it had moved the icon under Always hidden. Then upon the second restart of Figma the icon is nowhere to be found anymore, not listed under any of the three sections, like it doesn’t exist at all.
Also, just out of curiosity, how’s Ice’s performance/resource usage compared to Bartender? I’m a long time Bartender user and I decided to give Ice a chance. But for the last two days my laptop’s been running a bit hotter with the same workload and the only thing that changed was Bartender to Ice. And I don’t recall ever seeing Bartender as high as Ice on the CPU usage scale, and it’s on an M3 Max.
Steps to Reproduce

Set Figma’s icon to always show;
Upon second restart of Figma the icon moved to always hidden on its own;
Third time opening Figma the icon is nowhere to be found anymore.

Ice Version
0.10.5
macOS Version
14.6.1
Screenshots
No response

Closing comment (2024-08-18T00:29:29Z): I think the missing item is related to #283, so I'm going to close this issue to keep things streamlined.
Repository: jordanbaird/Ice

Issue #75: [Feature Request]: Make the Screen Recording permission optional
Created: 2024-06-05T10:58:13Z
Description
Many people don't feel comfortable enabling this option so please make it optional and if it is needed for Menu bar styling then disable that option until permission is enabled. Most of us want to hide the icons and nothing else.
Currently, you cannot even open the app if you do not allow Screen recording permission.
Screenshots
No response

Duplicate issue #270: [Feature Request]: Allow limit features in the app without screen sharing permission
Created: 2024-07-26T02:18:33Z
Check Existing Issues

 I have searched existing issues, and this issue is not a duplicate

Description
I want to use this app on my work computer, but can't because it requires screen recording permission. I think it'd be great if we could run some features of the app without screen recording permission, like most things except for changing menu bar appearance.
Screenshots
No response

Closing comment (2024-07-26T11:05:53Z): Duplicate of #75
Repository: jordanbaird/Ice

Issue #58: [Bug]: Menu Bar Flashes
Created: 2024-05-09T21:09:05Z
Check existing issues

 I have checked existing issues and believe that my issue is not a duplicate

Description
Upon switching workspaces, the menu bar flashes as it appears to refresh. This is consistent w/ different methods to switch the workspace (i.e. swipe gestures/keybinds). It is present for both split and standard menu bars.
I am using Yabai, but the bug persists with it disabled.
Steps to Reproduce
Switch workspaces and there's a flash.
Ice Version
0.8.0
macOS Version
14.4.1
Screenshots

  
    
    

    Screen.Recording.2024-05-09.at.4.43.26.PM.mp4

Duplicate issue #136: [Bug]: Custom menu bar shape is redrawn when switching between Spaces
Created: 2024-06-11T08:37:17Z
Check existing issues

 I have checked existing issues and believe that my issue is not a duplicate

Description
When switching from one Space to another (e.g. by swiping left or right with three fingers on the Trackpad), the menu bar appearance will lag. The menu bar is first drawn in the default macOS style/shape, a second later the Ice setting will be applied. This is especially apparent when using the "Split" menu bar shape in Ice (which is my favorite)
The same issue existed in Bartender for a while but they were somehow able to fix it.
Thanks a lot for making Ice, this app is a lifesaver now!
Steps to Reproduce

In Ice, change Menu Bar Shape to "Full" or "Split"
Open a new Space if you don't have one yet
Switch back and forth between Spaces and look at the menu bar

Ice Version
0.9.0
macOS Version
14.4.1
Screenshots
No response

Closing comment (2024-06-28T09:03:14Z): Duplicate of #58
Repository: jordansissel/fpm

Issue #470: Automatically added dependencies should follow same naming scheme as package
Created: 2013-06-20T00:44:26Z
If you run something like:
fpm -s cpan -t deb -n libdevel-declare-perl Devel::Declare 

The package dependency names are still in the default scheme that FPM providses:
perl-b-compiling

This should be something more like:
libb-compiling-perl

Duplicate issue #596: Support CPAN naming patterns and dependencies 
Created: 2013-12-10T20:01:22Z
When creating a Debian Package using the CPAN source, dependencies will be adding to the package metadata in a specific format such as perl-mydependency. If the -n flag is used to support an alternative name such as libmypackage-perl, the dependencies in that package do not respect the new naming convention.
Requesting a feature flag to support naming patterns such as --name-pattern lib-***-perl or some variant thereof.
I hope this made sense and didn't confuse you :)

Closing comment (2015-02-26T06:49:42Z): Dup of #470 I think.
Repository: jordansissel/fpm

Issue #1847: Reject invalid version strings for debian packages.
Created: 2021-11-06T03:21:59Z
While writing docs tonight, I found that fpm can create a debian package with an invalid version string.
% fpm -s empty -t deb -v "v1.2.3" -n example
Created package {:path=>"example_v1.2.3_amd64.deb"}

% dpkg --field example_v1.2.3_amd64.deb Version
dpkg-deb: error: parsing file '/tmp/dpkg-deb.AlPRzj/control' near line 2 package 'example':
 'Version' field value 'v1.2.3': version number does not start with digit

Duplicate issue #1968: fpm should reject debian packages with invalid values for the Version field
Created: 2022-12-02T00:53:33Z
Found this note in an Influxdb PR: influxdata/influxdb#23475

Unfortunately, fpm is fairly permissive with what version tags it accepts

@bnpfeife, do you recall any specifics in the problem you were working around? I'd like to help ensure fpm only generates correct packages, and knowing more will help make sure any new tests for this issue can cover the problem you were having.

Closing comment (2022-12-02T17:48:07Z): No apology needed :)
I ran into this exact issue while writing some fpm examples for packaging up kubectl - https://fpm.readthedocs.io/en/v1.15.0/packages/dir.html -- ended up doing ${version#v*} to have the shell strip the leading 'v' because fpm was producing invalid packages.
I'll close this as a duplicate of #1847. For improvements, I'll see about adding some smarts in fpm that tries to detect this particular case and automatically turn 'vX.Y.Z' to 'X.Y.Z'. For other cases, fpm can still reject with an actionable error message.
Repository: jordansissel/fpm

Issue #178: Problem trying to install files owned as a particular user/group
Created: 2012-03-21T03:23:12Z
Hi There,
I've been working with fpm for a few weeks now and overall it's a fantastic tool - I'm looking at moving one of our packages across to using fpm and have run into a issue trying to build packages that have files in them owned by a user other than root.
The packages I'm trying to build are debian packages.
I've had a poke around the source tree and from what I can tell most of the tarballs are created using a command like:
tar --owner=root --group=root -cf data.tar --no-recursion dir1 dir2 dir1/file1 dir1/file2
This seems to be overriding the ownership I've setup locally when getting the package structure ready.
I tried setting the ownership of the files in a --post-install script however this doesn't really seem like the right place to do it (it's quite over complicated to do this on a populated filesystem as well).
Is there a provision for this issue that I'm missing or are you able to give me any direction as to how I could fix it?
Some ideas I had:

Make the --owner= and --group= options configurable


This would solve my particular problem but wouldn't help someone who was trying to have files with 2+ different owners in one package.


Add a option to disable the --owner and --group enforcements

Thanks a lot for your time! :)

Duplicate issue #142: Support setting an RPM's %defattr to something other than root
Created: 2012-01-11T11:11:09Z
I am building packages with fpm for things like JBoss and other services that should not run as root. fpm sets the %defattr directive in the RPM file to -, root, root, -, effectively setting all files to be owned by root.
I suggest adding a command line option where you could specify "--rpm-defattr '-, jboss, jboss, -' to set the file ownership to something safer.
I'm working on a patch but I have very little experience with ruby so it has a good chance of being ugly ;)

Closing comment (2013-03-07T14:09:19Z): Duplicate of #178.
Repository: jordansissel/fpm

Issue #1282: deb-conf file written incorrectly in conffiles
Created: 2017-01-17T07:34:03Z
In deb packages, a conffile is created containing a list of all configuration files installed by the package. If a upstart script is added to the package, by default, fpm adds it to the conffile list. However, it adds the incorrect file namely in 2 ways:

it incorrectly removes a leading character from the path
it incorrectly adds .conf to the end of the file name, regardless of if the filename already ended with .conf. This is as a result of changes in #1115 (issue #861).

I believe the problem is in fpm/lib/fpm/package/deb.rb, lines 813-818:
      upstarts.each do |upstart|
        name = File.basename(upstart, ".upstart")
        upstartscript = "etc/init/#{name}.conf"
        logger.debug("Add conf file declaration for upstart script", :script => upstartscript)
        allconfigs << upstartscript[1..-1]
      end
This should be changed to mimic #1115's changes and to add the leading / prefix to the path (as is in the previous sections).
      upstarts.each do |upstart|
        name = File.basename(upstart, ".upstart")
        name = "#{name}.conf" if !(name =~ /\.conf$/)
        upstartscript = "/etc/init/#{name}.conf"
        logger.debug("Add conf file declaration for upstart script", :script => upstartscript)
        allconfigs << upstartscript[1..-1]
      end
Sample conffile

Duplicate issue #1305: --deb-upstart adds garbage entries to conffiles
Created: 2017-03-22T16:34:00Z
To reproduce:
$ touch upstart.conf

$ fpm -n test -v 1.0 -s empty -t deb --deb-upstart upstart.conf
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
Debian packaging tools generally labels all files in /etc as config files, as mandated by policy, so fpm defaults to this behavior for deb packages. You can disable this default behavior with --deb-no-default-config-files flag {:level=>:warn}
Created package {:path=>"test_1.0_amd64.deb"}

$ ar -vx test_1.0_amd64.deb 
x - debian-binary
x - control.tar.gz
x - data.tar.gz

$ tar -xvzf control.tar.gz 
./
./md5sums
./conffiles
./control

$ cat conffiles
/etc/init/upstart.conf
/tc/init/upstart.conf.conf  # WTF???

As you can see, conffiles has a garbage entry.

Closing comment (2017-09-11T16:26:05Z): It looks like this is a duplicate of #1282.
Repository: jordansissel/fpm

Issue #1043: python package rpm
Created: 2015-12-10T20:59:50Z
When trying to install an RPM in centos, dependencies are looked up in the yum repos vs pypi.  How can we force pip/pypi?

Duplicate issue #1059: Python dependancies from pip
Created: 2016-01-11T11:57:36Z
Is there a way for FPM to resolve Python dependancies using pip instead of the OS specific package manager?
I am building a number of packages using fpm -s python -t deb --python-pipwhich pipsetup.py the dependancies I specify within setup.py are being resolved via Apt, and a couple of them don't have apt packages.
I could package the dependancies separately and host them in our apt repo too, but it's another moving wheel to support which I would rather avoid if possible.

Closing comment (2016-01-11T13:04:26Z): Looks like this is similar to #1043
Repository: jordansissel/fpm

Issue #37: DEBEMAIL and DEBFULLNAME not being honoured when making .debs
Created: 2011-05-17T14:23:56Z
It seems these relatively important configuration options aren't being picked up when making a new .deb.
reference:
http://wiki.debian.org/DeveloperConfiguration
Best,
Paul

Duplicate issue #36: DEBEMAIL and DEBFULLNAME not being honoured when making .debs
Created: 2011-05-17T14:23:55Z
It seems these relatively important configuration options aren't being picked up when making a new .deb.
reference:
http://wiki.debian.org/DeveloperConfiguration
Best,
Paul

Closing comment (2011-05-18T08:14:32Z): dup of #37
Repository: jordansissel/fpm

Issue #430: gem dependency conflicts
Created: 2013-05-08T11:33:14Z
I get an error trying to install fpm:
Unable to resolve dependencies: ftw requires backports (= 2.3.0); fpm requires backports (= 2.6.2)

Duplicate issue #431: 0.4.34: Unable to resolve dependencies: ftw requires backports (= 2.3.0); fpm requires backports 
Created: 2013-05-08T11:55:01Z
Since the recent release the fpm gem can't be installed:
$ ruby -v
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [i686-darwin12.3.0], MBARI 0x6770, Ruby Enterprise Edition 2012.02
$ gem -v
1.8.25
$ gem install fpm
ERROR:  While executing gem ... (Gem::DependencyError)
    Unable to resolve dependencies: ftw requires backports (= 2.3.0); fpm requires backports (= 2.6.2)

With 0.4.33
$ gem install fpm -v=0.4.33
Fetching: cabin-0.6.0.gem (100%)
Fetching: backports-2.6.2.gem (100%)
Fetching: arr-pm-0.0.8.gem (100%)
Fetching: clamp-0.3.1.gem (100%)
Fetching: fpm-0.4.33.gem (100%)
Successfully installed cabin-0.6.0
Successfully installed backports-2.6.2
Successfully installed arr-pm-0.0.8
Successfully installed clamp-0.3.1
Successfully installed fpm-0.4.33
5 gems installed

Closing comment (2013-05-08T12:00:21Z): Ooops, looked in the wrong tab for duplicates:
#430
Repository: jordwest/news-feed-eradicator

Issue #203: Instagram News Feed no longer blocked
Created: 2022-07-18T23:56:01Z
While news feed eradicator is working as expected, it seems to have stopped working for Instagram as of today (at least for me?)

Duplicate issue #207: Instagram feed not being blocked anymore.
Created: 2022-07-29T08:22:27Z
With Instagram enabled in settings, it appears the IG feed is still appearing.

Closing comment (2022-07-29T11:38:16Z): Will close this as duplicate of #203 for now
Repository: jordwest/news-feed-eradicator

Issue #217: Eradicator shows quote over unblocked twitter feed
Created: 2022-09-24T10:54:37Z
Since the last one or two days, this is how it looks like on Twitter.

Duplicate issue #221: Extension breaks sometimes on twitter
Created: 2022-09-27T11:17:12Z
Great job with this.
Today, I opened Twitter about 3 times and was able to read new tweets. The quote was displayed on top of the topmost tweet and I was also able to click on the tweet on which the quote was positioned. I don't have screenshots because it has fixed itself but I assume this is something y'all can investigate.
Great job again on this amazing tool.

Closing comment (2022-09-27T13:43:06Z): Please check that you're on v2.2.3, which was published earlier today.
Closing as duplicate of #217 for now.
Repository: jordwest/news-feed-eradicator

Issue #323: LinkedIn feed eradication not working on Firefox 
Created: 2024-12-09T22:47:49Z
There are some related existing issues (e.g. #183) but they're either old or slightly different scenarios. Currently, I'm not seeing eradication occur at all on LinkedIn. If I can carve out some time later I will dig into this deeper as I hate the LinkedIn feed with a passion 🙏
NFE 2.2.7
Firefox 130.0.1
Ubuntu 24.04.1 LTS

Duplicate issue #322: Linkedin feed flashes on Chrome when site loads
Created: 2024-12-09T07:41:01Z
When opening Linkedin the feed flashes for a second and then is eradicated.
Anyone else also experiencing this?

Closing comment (2024-12-11T02:41:50Z): Which browser do you use? If it's Firefox it might be related to #323.
Repository: jordwest/news-feed-eradicator

Issue #323: LinkedIn feed eradication not working on Firefox 
Created: 2024-12-09T22:47:49Z
There are some related existing issues (e.g. #183) but they're either old or slightly different scenarios. Currently, I'm not seeing eradication occur at all on LinkedIn. If I can carve out some time later I will dig into this deeper as I hate the LinkedIn feed with a passion 🙏
NFE 2.2.7
Firefox 130.0.1
Ubuntu 24.04.1 LTS

Duplicate issue #324: LinkedIn Feed blocker not working (in Firefox)
Created: 2024-12-09T23:19:46Z
The others are working fine (YouTube & Facebook). But LinkedIn is not working. Have reinstalled Firefox, but still not working. I'm using Mac. Software is the latest version.

Closing comment (2024-12-11T02:28:44Z): Duplicate of #323
Repository: jordwest/news-feed-eradicator

Issue #232: Facebook is not being eradicated anymore
Created: 2022-10-27T00:05:39Z
The new facebook site removed the following selectors for home and groups feed
document.querySelector('#ssrb_feed_start + div') || // For home and groups feed

Currently, the feed has a role="feed". Might need to update to determine where to replace the contents of the feed

Duplicate issue #243: Newsfeed Eradicator Stopped Working on Facebook
Created: 2022-11-12T01:32:48Z
Newsfeed eradicator stopped working on facebook. Seems to be working fine on other sites. Tried uninstalling and reinstalling but it didn't work.

Closing comment (2022-11-12T19:58:25Z): This issue is a duplicate of #232  The changes are being rolled out for different people at different times and it seems like a new wave just started. I just got the update as well and it stopped working for me too. After quick research i see that their DOM is an absolute mess, it's might be tricky to figure out how to fix this for this update.
Repository: jordwest/news-feed-eradicator

Issue #12: Get Firefox add-on signed
Created: 2015-12-29T04:30:09Z
The Firefox add-on no longer worked for me because Firefox blocks unsigned add-ons.  Can you get this add-on signed so that we can all continue to enjoy it?  Thanks!

Duplicate issue #28: Port to Web Extension
Created: 2016-10-31T06:56:26Z
Since Firefox 48, WebExtensions are supported and you can simply use your chrome extension for Firefox from the looks of it.

Closing comment (2016-12-10T04:49:18Z): Looks like there shouldn't need to be any major changes to support WebExtensions, awesome!
Since the remaining hurdle is getting it accepted in the Firefox add-on store (tracked in #12) closing this for now.
Repository: jordwest/news-feed-eradicator

Issue #203: Instagram News Feed no longer blocked
Created: 2022-07-18T23:56:01Z
While news feed eradicator is working as expected, it seems to have stopped working for Instagram as of today (at least for me?)

Duplicate issue #208: Instagram malfunction
Created: 2022-08-01T00:04:24Z
For the last 7-10 days, the app has not been effective in eradicating instagram feed.

Closing comment (2022-08-01T00:07:07Z): Please check that you're updated to v2.2.2 as this should be fixed.
Closing as duplicate of #203
Repository: jordwest/news-feed-eradicator

Issue #6: More quotes!
Created: 2014-11-04T02:06:30Z
Hello. Can there be more quotes? I haven't looked into where you guys add quotes, but I've been using this for a long enough period to know that there are only about 10-15 of them and I know all of them by heart at this point so I think there could easily be support for a new one every day. I could make this enhancement if someone could direct me to where. Thanks!

Duplicate issue #15: Not enough qoutes
Created: 2016-02-25T18:51:44Z
:) I think you could add some more or make a script that would get them from quotes.reddit.com or heysaidso.com/

Closing comment (2016-05-07T03:38:15Z): Duplicate of #6
Repository: jordwest/news-feed-eradicator

Issue #218: Not working on facebook
Created: 2022-09-26T21:29:45Z
The extension stopped working on facebook for some reason

Duplicate issue #222: News Feed Eradicator is not working on my Facebook 
Created: 2022-09-27T12:19:55Z
It suddenly doesn't work, but in the main page of the add-on, it says Facebook is 'eradicating'
Let me know if there is any more info that i need to provide and how to solve this problem. Thank you

Closing comment (2022-09-27T21:50:29Z): Please check that you're on v2.2.3, which was published earlier today.
Closing as duplicate of #218 for now.

I'm on v2.2.3 on Chrome 106.0.5249.62 on Windows 10, but my Facebook news feed is still showing up. For a second, it's eradicated, but then the quote goes away and shows the feed.
EDIT: Looks like the other extension I use, F.B. Purity, wasn't playing nicely with the new update. I disabled that, and now it is eradicating again. F.B. Purity probably has to push out a new fix like you did for this.
Repository: jordwest/news-feed-eradicator

Issue #167: imgur support
Created: 2021-10-26T13:23:25Z
Should be self explanatory. It's extremely distractful to see the posts when trying to upload an image.

Duplicate issue #197: Feature Request: plz add imgur
Created: 2022-06-16T00:46:46Z
I love your plugin, I have been using it for a year. I wish there would be something for imgur too.

Closing comment (2023-02-03T05:02:01Z): Duplicate: #167
Repository: jquense/yup

Issue #798: string.matches throws error when we pass a string as second parameter
Created: 2020-03-05T22:48:54Z
Describe the bug
In 0.28.1, these 2 signatures work:

string.matches(regex: Regex, message?: string | function): Schema
string.matches(regex: Regex, options: { message: string, excludeEmptyString: bool }): Schema

In 0.28.2:
The first one throws an error.
Cannot use 'in' operator to search for 'excludeEmptyString' in <message>
The bug has been introduced here: 27e5d68#diff-57c5960218f1091895b3610a7d779378R79
If options is a string, we cannot make this operation 'excludeEmptyString' in options.
To Reproduce
const schema = yup.string().matches(/test/, 'My message')
await schema.isValid('hi')
Expected behavior
Should not throw an error

Duplicate issue #799: 0.28.2 causes runtime error: Cannot use in operator to search for excludeEmptyString
Created: 2020-03-06T07:27:38Z
I have a lib uses tsdx to build a module to consume at the backend (AWS Lambda running on Node 12.x), then build with tsc by Typescript 3.8.
Today, I updated to 0.28.2 and get the following error message
{
    "errorType": "TypeError",
    "errorMessage": "Cannot use 'in' operator to search for 'excludeEmptyString' in At least 8 characters longs, with Lower case letters (a-z), Upper case letters (A-Z), Numbers (0-9) and Special characters (!@#$%^&*()-+_=,.?/;:'\").",
    "stack": [
        "TypeError: Cannot use 'in' operator to search for 'excludeEmptyString' in At least 8 characters longs, with Lower case letters (a-z), Upper case letters (A-Z), Numbers (0-9) and Special characters (!@#$%^&*()-+_=,.?/;:'\").",
        "    at StringSchema.matches (/var/task/node_modules/yup/lib/string.js:107:51)",
        "    at Object.<anonymous> (/var/task/node_modules/@albert-gao/teaming-cloud-shared/dist/teaming-cloud-shared.cjs.development.js:46:14)",
        "    at Module._compile (internal/modules/cjs/loader.js:955:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)",
        "    at Module.load (internal/modules/cjs/loader.js:811:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:723:14)",
        "    at Module.require (internal/modules/cjs/loader.js:848:19)",
        "    at Module._require.o.require (/var/task/serverless_sdk/index.js:9:91865)",
        "    at require (internal/modules/cjs/helpers.js:74:18)",
        "    at Object.<anonymous> (/var/task/node_modules/@albert-gao/teaming-cloud-shared/dist/index.js:7:20)"
    ]
}
The line it refers:
const ERR_MSG = `At least 8 characters longs, with Lower case letters (a-z), Upper case letters (A-Z), Numbers (0-9) and Special characters (!@#$%^&*()-+_=,.?/;:'").`

const password = string()
  .matches(REGEX.PASSWORD, ERR_MSG)
  .required()
The source code is here:
27e5d68#diff-57c5960218f1091895b3610a7d779378
by changing from
options.hasOwnProperty('excludeEmptyString')
to
'excludeEmptyString' in options
It causes the error, seems pretty strange.

Closing comment (2020-03-06T09:34:22Z): Duplicate of #798
Repository: jquense/yup

Issue #1183: Incorrect types using SchemaOf with DateSchema
Created: 2020-12-15T13:26:35Z
Describe the bug
Incorrect types using SchemaOf with DateSchema
To Reproduce
See example https://codesandbox.io/s/kaldy-dgj5g?file=/src/index.ts
Expected behavior
Types will match
Platform (please complete the following information):

Version 0.32.8
Version of @types/yup 0.29.10

Duplicate issue #1243: Something is wrong with dates and TypeScript support.
Created: 2021-01-30T09:35:15Z
Describe the bug
The following typescript errors appear:
import * as Yup from 'yup';
import {SchemaOf, Asserts} from 'yup';

// TEST 1

const schema1 = Yup.object({
  date: Yup.date().defined()
}).defined();

type Type1 = Asserts<typeof schema1>;

function test1(schema: SchemaOf<Type1>) {

}

test1(schema1); // TS error
// Argument of type 'DefinedObjectSchema<{ date: DefinedDateSchema<Date | undefined, Record<string, any>>; }, Record<string, any>, TypeOfShape<{ date: DefinedDateSchema<Date | undefined, Record<...>>; }>>' is not assignable to parameter of type 'ObjectSchemaOf<AssertsShape<{ date: DefinedDateSchema<Date | undefined, Record<string, any>>; }>>'.
//  The types of 'fields.date' are incompatible between these types.
//    Type 'DefinedDateSchema<Date | undefined, Record<string, any>>' is missing the following properties from type 'ObjectSchema<{ toString: ObjectSchemaOf<() => string>; toDateString: ObjectSchemaOf<() => string>; toTimeString: ObjectSchemaOf<() => string>; toLocaleString: ObjectSchemaOf<...>; ... 38 more ...; toJSON: ObjectSchemaOf<...>; }, Record<...>, TypeOfShape<...>, AssertsShape<...>>': fields, _sortErrors, _nodes, _excludedEdges, and 11 more.ts(2345)

// TEST 2

interface Type2 {
  date: Date;
}

const schema2: SchemaOf<Type2> = Yup.object({ // TS ERROR
  date: Yup.date().defined()
}).defined();
// Type 'DefinedObjectSchema<{ date: DefinedDateSchema<Date | undefined, Record<string, any>>; }, Record<string, any>, TypeOfShape<{ date: DefinedDateSchema<Date | undefined, Record<...>>; }>>' is not assignable to type 'ObjectSchemaOf<Test2>'.
//   The types of 'fields.date' are incompatible between these types.
//     Type 'DefinedDateSchema<Date | undefined, Record<string, any>>' is not assignable to type 'ObjectSchemaOf<Date>'.ts(2322)


function test2(schema: SchemaOf<Type2>) {

}

test2(schema2);
To Reproduce
https://codesandbox.io/s/yup-dates-typescript-l4kon?file=/src/index.ts
Expected behavior
There should be no typescript errors for this example.
Platform (please complete the following information):

Firefox
85.0

Closing comment (2021-02-25T19:23:48Z): Would this be related to #1183 (Incorrect types using SchemaOf with DateSchema)?
Repository: jquense/yup

Issue #798: string.matches throws error when we pass a string as second parameter
Created: 2020-03-05T22:48:54Z
Describe the bug
In 0.28.1, these 2 signatures work:

string.matches(regex: Regex, message?: string | function): Schema
string.matches(regex: Regex, options: { message: string, excludeEmptyString: bool }): Schema

In 0.28.2:
The first one throws an error.
Cannot use 'in' operator to search for 'excludeEmptyString' in <message>
The bug has been introduced here: 27e5d68#diff-57c5960218f1091895b3610a7d779378R79
If options is a string, we cannot make this operation 'excludeEmptyString' in options.
To Reproduce
const schema = yup.string().matches(/test/, 'My message')
await schema.isValid('hi')
Expected behavior
Should not throw an error

Duplicate issue #802: excludeEmptyString
Created: 2020-03-06T14:04:10Z
I have following error when i want to build my NextJs App

When i replace 
  
    
      yup/src/string.js
    
    
         Line 79
      in
      b5b627b
    
  
  
    

        
          
           if (options.message || 'excludeEmptyString' in options || options.name) { 
        
    
  


by

  
    
      yup/src/string.js
    
    
        Lines 79 to 83
      in
      053e95f
    
  
  
    

        
          
           if ( 
        

        
          
             options.message || 
        

        
          
             options.hasOwnProperty('excludeEmptyString') || 
        

        
          
             options.name 
        

        
          
           ) { 
        
    
  


I do not have any problems..

Closing comment (2020-03-06T14:59:38Z): Duplicate of #798. Rolling back to v0.28.1 is a solution for now.
Repository: jquense/yup

Issue #562: string.url() doesn't handle all URL schemes
Created: 2019-06-28T21:32:26Z
I've noticed that string().url() only handles a few protocols/schemes. http, https and ftp to name a few but URLs could have any scheme. Here is the BFN grammar for URLs.
And for the tests:
let yup = require('yup');
let { URL } = require('url');

let urls = [
    'mailto:example@foo.com',
    'ftp://u:p@ftp.domain.ext',
    'http://www.example.com',
    'https://user:pass@sub.example.com:8080',
    'file://host/path',
    'chrome://bookmarks',
    'about:mozilla',
    'http://localhost:3000/',
];

let schema = yup.string().url();

// All are handled
urls.map(u => new URL(u).protocol);
// => ["mailto:", "ftp:", "http:", "https:", "file:", "chrome:", "about:", "http:"]

// Only few are handled
await Promise.all(
    urls.map(
        u => schema.validate(u)
            .then(() => u)
            .catch(e => false)
    ));
// => [false, "ftp://u:p@ftp.domain.ext", "http://www.example.com", "https://user:pass@sub.example.com:8080", false, false, false, false]
URL parsing and validation is hard and tricky but we can leverage the URL module which I think most browsers support and there is a polyfill for IE10 as well. Is there any appetite for this change? If not can we clarify this on the docs?

Duplicate issue #672: String URL validation regex false positive with double slashes
Created: 2019-10-24T11:40:03Z
Describe the bug
Regex used when validating URL has 1st capturing group ^((https?|ftp):)? which is optional, but after that there is match for \/\/ which is mandatory. This is causing any URL without http:// | https:// | ftp:// at the beginning to not be valid, but URL like //example.com to pass validation.
To Reproduce
https://repl.it/repls/IntrepidScentedMonitors
Expected behavior
URLs like //example.com should not be valid
URLs like example.com should be valid
Platform (please complete the following information):

Browser Chrome, Version 72.0.3626.121
Version of yup 0.27.0

Possible solution
Current regex: ^((https?|ftp):)?\/\/(...
Fixed regex: ^((https?|ftp):\/\/)?(...
Additional
Regexes inserted in regex101 (v1 is current one, v2 is fixed one) https://regex101.com/r/jlZoAO/2

Closing comment (2021-12-25T20:30:09Z): Looks like a dup of #562. Maybe new URL is better for URL validation than regexp

@jquense Please update on this?
Repository: jquense/yup

Issue #1423: Cyclic dependency error when using concat
Created: 2021-07-18T20:53:04Z
When using concat on an object schema with the exclude list set it seems to be ignored unless it is concatenated as the last schema
const a = Yup.object().shape({
    a1: Yup.string().when("a2", {
      is: undefined,
      then: Yup.string().required()
    }),
    a2: Yup.string().when("a1", {
      is: undefined,
      then: Yup.string().required()
    }),
  }, [["a1", "a2"]]);
  
const b = Yup.object().shape({
    b1: Yup.string().required(),
    b2: Yup.string().required(),
})

// works
const cba = Yup.object().shape({
    c1: Yup.string().required(),
    c2: Yup.string().required(),
    }).concat(b).concat(a)

// doesn't work
const cab = Yup.object().shape({
  c1: Yup.string().required(),
  c2: Yup.string().required(),
  }).concat(a).concat(b)

Sandbox link: https://codesandbox.io/s/yup-concat-order-pemfy?file=/src/index.js
Platform

Chrome
Version 0.32.9 (bug exists since 0.32.0)

Duplicate issue #1301: Custom method based on yup clone changed behavior after yup version up
Created: 2021-03-18T11:32:43Z
Describe the bug
Hi! I use yup about 1 year in working project.
I wrote custom method 'set' to yup object using addMethod API.
After updating yup version from 0.29 to 0.32 it changed behavior.
Before I can use combination yup concat and my method set in any possible order.
Now it throws error if I use concat before set, and works normally if I use concat after set in case when object schema contains excluded edges.
set internally returns this.concat schema.
To Reproduce
Link to CodeSandbox example
https://codesandbox.io/s/yup-set-demo-mog0g?file=/src/index.js

Please note, how child schema and latest example with combination of set and concat methods looks like.

Expected behavior
Using set after concat method don't throw Error "Cyclic dependency, node was:"maxPeriod""
Platform (please complete the following information):

Browser Chrome
Version 77

Closing comment (2021-07-19T21:41:34Z): Underlying issue might be related to #1423
Repository: jquense/yup

Issue #954: UUID is not a function
Created: 2020-06-29T01:26:45Z
Describe the bug
A clear and concise description of what the bug is.
Cannot use the .uuid() helper with a string().
To Reproduce
Write a runnable test case using the code sandbox template: https://codesandbox.io/s/yup-test-case-gg1g1
In the index.test.js file change the passing test to a failing one demostrating your issue
Example of error: https://codesandbox.io/s/ecstatic-almeida-rjquy?file=/src/index.test.js

NOTE: if you do not provide a runnable reproduction the chances of getting feedback are significantly lower

Expected behavior
A clear and concise description of what you expected to happen.
Expect it to validate the default uuid I am generating and pass
Platform (please complete the following information):

Browser [e.g. chrome, safari] Chrome
Version [e.g. 22] Version 83.0.4103.116 (Official Build) (64-bit)

Additional context
Add any other context about the problem here.

Duplicate issue #986: Please publish new version [string.uuid]
Created: 2020-07-24T20:13:25Z
Can we get a new version published? I was frustrated that the documentation wasn't working with my typescript file, so I created a PR to update the types. Unfortunately, once I started using my types I discovered the documentation is just incorrect since the new string.uuid hasn't been published yet. Can you please help?

Closing comment (2020-07-25T01:13:32Z): Looks like this is a duplicate of #954, as well.
Repository: jquense/yup

Issue #666: Required by default
Created: 2019-10-19T10:02:05Z
joy has a option presence: 'required' adding required() to all schemas. Is there an analog in yup?

Duplicate issue #1279: support `{ presence: "required" }`
Created: 2021-02-23T20:21:43Z
Ala Joi, Yup should support .presence() or options.presence so we can make all nested schemas required by default (unless overriden via .optional() on per-schema basis).
Without this, all schemas aver super unsafe as it depends on the developer not forgetting to mark each schema as required.

Closing comment (2021-02-23T20:24:29Z): Mhm, seems as duplicate of #666, with no traction :(.
Repository: jquense/yup

Issue #786: yup.date() not generating expected result for leap date 
Created: 2020-02-24T20:23:04Z
Describe the bug
Hi. We recently notice that the yup.date() is not showing expected result for leap year. For example, when we have 02/30/2000 or 02/31/2000, it shows valid for both of them. I added a console log after the date() function, and it looks like after calling date(), 02/30/2000 was casted to 03/01/2000 and 02/31/2000 was casted to 03/02/2000 respectively when running the check. Feel like that's why yup considers them valid. Please let us know if we missed anything in our setup or if there is anything we need to add to avoid this issue.
const dateOfBirthSchema = yup
  .date()
  .typeError('Please enter a valid Date of Birth')
  .required('Please enter your Date of Birth')
  .test('validateFutureDate', 'Please enter a valid Date of Birth', validateFutureDate);

To Reproduce
02/30/2000 or 02/31/2000 is considered valid.
Expected behavior
show 02/30/2000 or 02/31/2000 as invalid

Duplicate issue #301: Yup.date() showing invalid leap dates as valid
Created: 2018-08-24T18:43:37Z
It recently came to my team's attention that Yup.date().typeError isn't showing leap dates (like 2/29/1971 for example) as invalid dates. How would you advise getting around this issue?

Closing comment (2022-01-27T23:09:15Z): Related to #786
Repository: jquense/yup

Issue #221: Publish ES release
Created: 2018-05-19T20:01:53Z
it should be fine to make a ES release alongs CJS via Rollup (i see you started to write a Rollup configuration).
Then you can add a "module" field in "package.json" to point on ES module.
With that, WebPack user will start to tree-shake "yup" with zero-configuration => less kb in bundle :) .
Actually, with CJS module, we can't take advantage of tree-shaking, unless :

We use full path import instead of the main barrel entrypoint (ex: import object from 'yup/lib/object' instead of import { object } from 'yup').
We use WebPack aliasing or Babel plugin to rewrite import path, like with "babel-plugin-import" :

[
      "babel-plugin-import",
      {
         "libraryName": "yup",
         "libraryDirectory": "lib",
         "camel2DashComponentName": false
      }
]

Duplicate issue #311: Publish ESM modules
Created: 2018-09-14T16:59:46Z
I'd love to consume this package as an ESM module, so that I can only import the validator functions that I need.
I see that a Rollup configuration is present, but it doesn't seem to actually be used -- the dist folder with the CJS and ESM builds is not published. The only thing published is a lib directory that the Babel CLI produces.
Is there a reason for this? If not, I would be happy to update the build scripts, etc. to publish the dist directory that Rollup produces instead.

Closing comment (2018-12-27T17:47:20Z): Related to #221
Repository: jquery-archive/PEP

Issue #68: Implement support for touch-action=auto
Created: 2013-06-04T19:53:02Z
At the moment, pointer events are only sent when touch-action=none is set on an element.  We don't think there's any good reason why we couldn't also implement the auto model when the user has explicitly opted into it.  Enabling pointer events support on scrollable divs has a performance impact (forces scrolling to be blocked on the main thread), so we can't do it by default.  But a touch-action='auto' attribute is a good signal that pointer events support should be enabled.
See this thread for more details: http://lists.w3.org/Archives/Public/public-pointer-events/2013AprJun/0162.html

Duplicate issue #73: Non-standard touch-action 'scroll' should be merged into 'auto'
Created: 2013-06-07T15:53:06Z
We support an explicit 'scroll' value for touch-action, but I think it should ideally be unnecessary.  Ideally this is the same behavior you'd get from touch-action=auto (which should be the default on any region where pointer event support has been enabled).  Once  auto exists (issue 68), perhaps 'scroll' should be deprecated?

Closing comment (2013-06-24T18:22:11Z): Duplicate of #68
Repository: jquery-archive/PEP

Issue #242: pointerdown only fires once in Firefox v0.4.0
Created: 2015-11-09T23:47:05Z
Problem: v 0.4.0 Firefox only fires "pointerdown" once, not allowing subsequent pointer downs.
v0.3.0 does not have the same problem.
Steps:

Went here: http://jsbin.com/bojumofowa/1/edit?html,css,js,output
Change to /pep/0.4.0/pep.js
Change event to on("pointerdown")
Click in canvas area, only one pixel shows. All subsequent clicks are ignored.

I'm using Firefox 42.0 on Ubuntu.

Duplicate issue #252: pointerdown fire only once on Firefox linux x64
Created: 2015-12-30T13:41:43Z
Pointer down is only fire once on firefox with jquery/pep 0.4.0.
Same test is working well with jquery/pep 0.3.0
I only test firefox on linux x64. Chrome and Safari are working well.
I use the here to reproduce the problem https://gist.github.com/padewitte/691df62a2d2b4fccd445
Just change the version bac to 0.3.0, click pointerdown and border color change each time you click our touch the screen in the svg elements.

Closing comment (2015-12-30T16:15:40Z): Duplicate of #242.
Repository: jquery-archive/PEP

Issue #170: Create functional tests that run the W3C test suite
Created: 2015-03-12T16:26:38Z
https://github.com/w3c/web-platform-tests/tree/master/pointerevents

Duplicate issue #49: Use Spec TestAssertions
Created: 2013-04-02T20:34:43Z
Spec lists what tests to assert: http://www.w3.org/wiki/PointerEvents/TestAssertions

Closing comment (2015-03-17T17:59:56Z): This is now being tracked in #170.
Repository: jquery-archive/PEP

Issue #197: pointerenter and pointerleave work different with their mouse equivalents
Created: 2015-06-16T17:44:33Z
In some edge cases polyfilled pointerenter and pointerleave events work in a different way comparing to native mouseenter and mouseleave events.
In the example http://narqo.github.io/test-pointerevents/test.html *enter and *leave handlers are bound to the top "root" element with .test-pointer css class. Even if such events should not bubble, mouseenter event fires if user moves the cursor to the coloured area. At the same time pointerenter event fires only if cursor is moved directly from body to the "root" element (see messages from console.log).
I haven't tested it with native pointerevents in IE 10+, but this behaviour is the same in desktop versions of Chrome and Firefox.

Duplicate issue #270: pointerenter & pointerleave will not emit event on nested container
Created: 2016-02-17T12:39:11Z
This is fairly trivial case.
Having 2 elements, a container and a child. given the container inherit it's child dimensions it will no longer emit either pointerleave or pointerenter. adding margin to the child will emit what i've expected.
Here's a bin with the issue.
http://esnextb.in/?gist=dd6d0207f6fc726e7275

Closing comment (2016-02-17T21:24:47Z): This sounds like a duplicate of #197, would you agree?
Repository: jquery-archive/PEP

Issue #311: Fully polyfill touch-action behaviour for scrolling
Created: 2016-09-11T16:05:53Z
While looking into (#309) using passive event listeners and the native touch-action property, we came across some inconsistencies in PEPs way of calculating the touch-action property.
The spec says:

When a user touches an element, the effect of that touch is determined by the value of the touch-action property and the default touch behaviors on the element and its ancestors. To determine the effect of a touch, find the nearest ancestor (starting from the element itself) that has a default touch behavior. Then examine the touch-action property of each element between the hit tested element and the element with the default touch behavior (including both the hit tested element and the element with the default touch behavior). If the touch-action property of any of those elements disallows the default touch behavior, do nothing. Otherwise allow the element to start considering the touch for the purposes of executing a default touch behavior.

Up to now, we have not properly calculated the intersection of the touch-action properties of all ancestors of an element up to the element with the default touch behaviour.
To us, the default scroll behaviour is the most relevant default touch behaviour and generally the one with the most impact.
For scrolling, the element "creating" a scrollable area is the one with the default scroll behaviour. E.g. an element with the CSS property overflow: scroll will be the the element with default scroll behaviour, its children will not be.
An element has a default scroll behaviour if (not guaranteed to be all cases):

It has the CSS property overflow: scroll, overflow-x: scroll or overflow-y: scroll
It has the CSS property overflow: auto, overflow-x: auto or overflow-y: auto and the content is larger than the element.

An example of the different behaviours. Try it in Chrome with the mobile emulator.
Chrome's implementation for computing the touch-action value.
This mostly just summarises this weeks PEP meeting. Thanks to @RByers for the insights!

Duplicate issue #336: Nested elements don't bubble correctly if the child has touch-action: auto
Created: 2017-03-07T23:34:00Z
Reduction
Consider this DOM:
<div touch-action = "none">
  <span>
    some content that isn't in the auto box
  </span>
  <div touch-action = "auto">
    the auto box
  </div>
</div>

with a pointermove listener attached to the outer element.
In Chrome (with native PointerEvents), it receives events that begin in itself or its touch-action: auto child.
In Safari with PEP, it only receives events that begin outside the touch-action: auto child.

Closing comment (2017-05-04T16:11:01Z): Closing as duplicate of #311.
Repository: jquery-archive/PEP

Issue #151: Try to support CSS touch-action rather than using attributes
Created: 2015-01-12T20:55:14Z
Browsers like Chrome that have native support for the CSS property make this easy, otherwise its necessary to load the original stylesheet via ajax and parse them manually, since unsupported CSS properties are just dropped when the browser parses them.

Duplicate issue #211: touch-action="none" does not prevent browser's double-tap-zoom 
Created: 2015-07-26T23:42:29Z
In at least Chrome 43 (Android) and Safari whatever-version-my-cousin's-iPad-had (iOS), touch-action="none" does not prevent the browser's default double-tap zooming behavior. Minimal working example: https://jsfiddle.net/rxjpbeg8/
Not sure of the best way to implement this, but it would be great to prevent it if possible for spec compliance.

Closing comment (2015-10-28T15:35:01Z): Closing as a duplicate of #151 - at least as far as commented on above.
Repository: jquery-archive/PEP

Issue #219: Remove vacuumTouches
Created: 2015-09-15T03:20:28Z
I can't find any documentation for the issue this code is supposed to fix (the change was introduced in #31 with no prior discussion linked), and it seems like a potentially hindering piece of code (it sounds like it's trying to remove any touch that's currently in progress).

Duplicate issue #279: PEP event just firing every second time
Created: 2016-04-22T12:21:51Z
Browser: Google Chrome
Version 49.0.2623.112 m (64-bit)
Example: [http://codepen.io/OrellBuehler/pen/aNjwrG]
PEP-Version: 0.4.1
jQuery: 1.9.1
Event-Type: pointerdown
Description: When you first click on an element with a pointerdown listener then the event gets fired. If you then click on the same element the event doesn't get fired(thats the problem). But if you click beside the element and then on the element the event gets fired again.

Closing comment (2016-04-22T13:08:50Z): We have to deal with this in jQuery UI too. We have a flag that indicates that the mouse button is being pressed and if we detect a mousedown while this flag is set, we act as if a mouseup just occurred and then continue processing the mousedown. In the jQuery UI case, we only care about the left button, so the code is simpler, but we can take a similar approach in PEP. https://github.com/jquery/jquery-ui/blob/010f5f9d13b7d6f1c13482825547ee95d3033e40/ui/widgets/mouse.js#L82-L83
Seems like this is also related to #219.