All Issues
24,993 verified issues
Crash after starting using version 4.21.0
I just updated express to fix the latest reported CVEs, but the last version (4.21.0) is now causing crashes when loading express. Crash happens when I call this: `const express = require("express")` Error is: [code block] I realize this is not the express library, but express is the only user of `path-to-regexp` in my application, so it can't be any other culprit. The exact same code on my side runs fine using for example express 4.19.2.
TypeScript Support
This is an amazing tool, any chance at supporting TypeScript as well?
The right way for a client to reconnect after the server does a socket.disconnect( true )
Server: node + socket.io [code block] Client: html/js + socket.io 1.4.5 [code block] The above is simplified but that is the basis. Reconnection works fine if I fire up the client when the server is down. The client tries to connects to the server and when I finally fire up the server the connection is estabilished. At some point it may happen that the server decides to disconnect the client, mainly because he logged out invalidating the token and a query on the db tells to do so, or the auth token expired or whatever. IN this circumstance I'd like the restore the server polling by the client because the user may want to login again and he has the rights to connect again to the server. If I refresh the page (client) in the browser it works okay but it's an ugly solution. I think the cause is the "Manager.skipReconnect" property set to true after doing disconnect(), so I'm asking what is the proper way to reinitiate a reconnection polling by the client after the server disconnects a client. Found some answers on stackoverflow about this but all were unsuccessfull, all stuff to be executed in the client: - socket.io.reconnect(); - socket.socket.reconnect(); // ?? - socket = io.connect( 'http://127.0.0.1:3000', ... // reinvoking the connect snippet seems bad idea Could you help me about this matter? Thank you
Release v3
next branch - [x] Support ESM plugins (#13201) - [x] Support ESM config files (#13130) - [x] Change `trailingComma` option default value to `all` (#11479) - [x] Don't insert spaces in Markdown ( #11597 ) - [x] Remove `prettier.doc.builders.concat` (#13203) - [ ] ~Update `print` function signature to not accept `path` (need investigate)~(Removed since this will break `path.map(print)`) - [x] Print HTML5 doctype in lowercase? (need discussion #7391) - [x] Change `--loglevel` flag to `--log-level` (#13204) - [ ] ~Support MDX 2? (#12209)~ Postponed - [x] `exports` field (#13530) - [ ] Plugins & tools support for v3 (#13616) ** - prepare - [x] Complete milestone items - [x] Run on other projects to check for regressions ( https://github.com/prettier/prettier-regression-testing/issues/348 ) - [x] Write release notes (#13436) - use `node scripts/draft-blog-post.mjs` to generate a blog post draft (a file named <code>YYYY-MM-DD-version*.md</code> in `website/blog`) from `changelog_unreleased` - prs-merged-since (readme) may be useful - publish - [x] Run release script - postpublish - [x] Merge release notes - [x] Wait for release notes to deploy - [x] Clean `changelog_unreleased` - use `node scripts/clean-changelog-unreleased.mjs` - [ ] Tweet from `@PrettierCode` account via TweetDeck - [ ] Close milestone - [ ] Send schema PR generated by `node scripts/generate-schema.mjs` to SchemaStore if we added a new option. - [x] Update the release checklist
FR: please add function Auth.getCurrentUser() as a promise that will return current user or null
Firebase SDK version: 4.9.0 Firebase Product: auth `Auth.currentUser` object is unreliable to get user from persistence storage. If the authentication system could be pending and don't really have ensure finishing endpoint then you should have a promise for it So I want to have promise function `Auth.getCurrentUser()` in addition to `onAuthStateChange` that would eventually return user but would return null if no user exist in persistence storage or user require sign in from expired token
Express webhook not authenticating
Issue Summary The validation methods in webhooks won't validate messages initiated by a user on Whatsapp. Steps to Reproduce Pretty much an interactive replica of How to secure Twilio webhook URLs in Node.js 1. Go to the sample project on https://replit.com/@OlegAzava/ExpressWithTwilioWebhook#index.js and wake up the Replit 2. Replace the TWILIO_AUTH_TOKEN with a working one <img width="672" alt="image" src="https://user-images.githubusercontent.com/3731173/223853291-1c332d87-71db-4ca4-adbc-188b07e3e12c.png"> 3. Configure a Whatsapp sender in Twilio to send messages to https://ExpressWithTwilioWebhook.olegazava.repl.co/api/message 4. Send a message from within Whatsapp to the target phone number Code Snippet [code block] Exception/Log Signatures comparison fails Technical details: twilio-node version: 4.8.0 node version: v18.12.1
Restricted in strict mode, js engine: hermes (React Native + Axios 1.0.0)
Describe the bug Getting an error with React Native when importing a function from a file, which uses Axios. Error: Requiring module "src/api/Api.js", which threw an exception: TypeError: Restricted in strict mode, js engine: hermes To Reproduce Import a function. [code block] Expected behavior No errors Environment - Axios Version: 1.0.0 - Node.js Version: 16 - OS: MacOS - Additional Library Versions: React Native 0.70.2 Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.
Using Prisma with a PlanetScale database
UPDATE As of 27.10.2022, the details in this issue are outdated. Refer to https://www.prisma.io/docs/guides/database/using-prisma-with-planetscale for the latest instructions on using Prisma with PlanetScale. Outdated Issue content PlanetScale is a new and interesting cloud database based on MySQL. It's exciting! PlanetScale is a bit different than other MySQL database providers though: 1. No support for foreign keys. This is challenging for Prisma users, as Prisma by default uses foreign keys to express relations. 1. No creation of additional databases using `CREATE DATABASE` but need to use their tooling (web UI or CLI). This can be challenging, as some development commands of Prisma like `prisma migrate dev` create temporary databases in the background. 1. No schema changes on your production database (but make them on branches, then merge the schema changes back). This is challenging for Prisma users, as usually they run Migrations against their database directly via `prisma migrate deploy` or `prisma db push`. --- Here is how you can use Prisma and PlanetScale together anyway: 1. No foreign keys / No Prisma Migrate (`migrate dev` and `db push`) - Problem: PlanetScale does not allow foreign keys in the database schema (`ERROR 70100 (1317): foreign key constraints are not allowed, see https://code.openark.org/blog/mysql/the-problem-with-mysql-foreign-key-constraints-in-online-schema-changes`), which Prisma relies on for relations. - Starting with 2.27.0 Prism
Setting strategy.matrix.value to expression throws invalid type error
Getting "Invalid type found: array was expected but string was found" at matrix: value: ${{fromJson(needs.setup.outputs.matrix)}} Any ${{}} expression fails. Only [] is allowed now, with at least one value. But the value cannot be an expression. `name: Test Matrix on: workflow_dispatch: jobs: setup: runs-on: ubuntu-latest outputs: matrix: ${{ steps.matrix.outputs.value }} steps: - id: matrix run: | echo '::set-output name=value::[\"a\", \"b\", \"c\"]' build: needs: [ setup ] runs-on: ubuntu-latest strategy: matrix: value: ${{fromJson(needs.setup.outputs.matrix)}} steps: - run: | echo "${{ matrix.value }}"`
Middle mouse button scrolling
- VSCode Version: 1.10 I searched the issues but did not find any such post, so apologies if there is an existing thread that I missed. I'd like to know if there is any middle mouse click scrolling, planned? That is, clicking the scroll wheel to toggle drag scrolling. It's a useful feature to have when navigating very long files. And if it isn't, is there any API that would allow this to be enabled via an extension? Thanks
.save() is throwing duplicate key value violates unique constraint
Issue type: [x] question [ ] bug report [ ] feature request [ ] documentation issue Database system/driver: [ ] `cordova` [ ] `mongodb` [ ] `mssql` [ ] `mysql` / `mariadb` [ ] `oracle` [x] `postgres` [ ] `cockroachdb` [ ] `sqlite` [ ] `sqljs` [ ] `react-native` [ ] `expo` TypeORM version: [x] `latest` [ ] `@next` [ ] `0.x.x` (or put your version here) This was working for me earlier but now it is not. I am using a composite key of three different properties. Every time I try to update and existing row, I get the error `QueryFailedError: duplicate key value violates unique constraint "PK_8b1375852f33d30b328388e5a5c"`. This is my entity: [code block]
aws ec2 describe-instances --filters tag: seems to be not working (or docs is missing/misleading)
Trying to use aws ec2 describe-instance (version 1.1.0) with tag: filter which is mentioned in docs at http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html but it doesn't seem to be working. Quote from documentation: "tag: --filters the response based on a specific tag/value combination." Tried several formats (just guessing, trying format used by http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ApiReference-cmd-DescribeInstances.html) but no luck. This does not complain but returns no instances: aws ec2 describe-instances --filters Name=tag:,Values=Name=ADS-prod-ads This one fails: aws ec2 describe-instances --filters tag:Name=ADS-prod-ads Unknown key 'tag:Name' for parameter --filters, valid choices are: Values, Name Just for reference, using tag-value works (just to show that tag Name=ADS-prod-ads exists): aws ec2 describe-instances --filters Name=tag-value,Values=ADS-prod-ads | jq '.Reservations[].Instances[].Tags[]' { "Key": "Name", "Value": "ADS-prod-ads" }
[NEXT-1190] TypeError: fetch failed in server componant since next 13.0.6
Verify canary release - [X] I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: linux Arch: x64 Version: #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 Binaries: Node: 18.12.0 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.0.6 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0 Which area(s) of Next.js are affected? (leave empty if unsure) Data fetching (gS(S)P, getInitialProps) Link to the code that reproduces this issue https://github.com/sylvain-guehria/StockShop To Reproduce I log here : https://inventory-market.vercel.app/ and that it's Describe the Bug when I log, a server componant fetch data. This was working this morning but after installing next 13.0.6 I got this error only in prod : error validating user TypeError: fetch failed at Object.fetch (/var/task/node_modules/next/dist/compiled/undici/index.js:1:26684) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async validateUser (/var/task/.next/server/app/page.js:740:21) at async HomePage (/var/task/.next/server/app/page.js:674:17) { cause: TypeError: Cannot read properties of undefined (reading 'reason') at makeAppropriateNetworkError (/var/task/node_modules/next/dist/compiled/undici/index.js:2:54604) at schemeFetch (/var/task/node_modules/next/dist/compiled/undici/index.js:2:3000
Location: "Location provider is unavailable. Make sure that location services are enabled."
🐛 Bug Report Environment Expo CLI 2.19.5 environment info: System: OS: macOS High Sierra 10.13.6 Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.1 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.1 AI-173.4670197 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: expo: ^34.0.1 => 34.0.3 react: 16.8.3 => 16.8.3 react-native: https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz => 0.59.8 react-navigation: ^3.11.1 => 3.11.1 APP TARGET : ANDROID DEVICE (USING EXPO CLIENT APP). Using a VIVO Device running Android 6.0, the device has a SIM and is network enabled. Steps to Reproduce let { status } = await Permissions.askAsync(Permissions.LOCATION); if (status !== 'granted') { this.setState({ errorMessage: 'Permission to access location was denied', }); console.log("no permission"); } else{ console.log("working on location"); let location = await Location.getCurrentPositionAsync({enableHighAccuracy:false}); console.log('latitude is ' + location.coords.latitude.toString()) console.log('longitude is ' + location.coords.longitude.toString()) } Expected Behavior The location services should provide me with GPS coordinates. Actual Behav
[QUESTION] <403 forbidden>
npm ERR! code E403 npm ERR! 403 403 Forbidden - GET https://registry.npmjs.intuit.com/neo4j-driver npm ERR! 403 In most cases, you or one of your dependencies are requesting npm ERR! 403 a package version that is forbidden by your security policy. npm ERR! A complete log of this run can be found in: npm ERR! /Users/agarg5/.npm/_logs/2020-02-13T12_29_42_032Z-debug.log
for_each attribute for creating multiple resources based on a map
Hi, We are missing a better support for loops which would be based on keys, not on indexes. Below is an example of the problem we currently have and would like Terraform to address: We have a list of Azure NSG (Network Security Group) rules defined in a hash. E.g. [code block] This allows us to keep the Terraform resource definition DRY and use a loop to create all the rules: [code block] So far, so good. However since the resources and their state are uniquely identified by the index and not by their name, we can't simply change the rules later. We can add new rules only at the end of the hash. We can remove rules only at the end of the hash. We can modify the rules, as long as their position in the hash doesn't change. * But we can never remove any other rule or change their position in the hash. This seems to be very restrictive and basically means we had to stop using this approach and define all individual rules as individual _azurerm_network_security_rule_ resources. As you can guess, if we e.g. remove the first item from the hash, Terraform would not see that as a removal of the first resource (index 0), but rather removal of the last resource (index 2) and a related unexpected change of all the other resources (old index 1 becomes new index 0, old index 2 becomes new index 1). Unfortunately this can also cause Azure provider to fail, because it may get into a conflict where an actual resource (old index 1) still exists in Azure, but Terraform now
Support integrating with C/C++ in plugin framework
It would be nice to have an example of calling C/C++ code, or at least how to build native code along with a Flutter app. This may purely a Gradle question, but its not clear to someone that's not an expert on Gradle (for example, me), how to pull this off. --- Admin comment: Please see https://github.com/dart-lang/sdk/issues/34452 for current status and additional information
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?
I know that there is another issue of the same type but the other issue is closed and I tried all the solutions proposed but with no effect. still not working: [code block] I'm part of the docker group I'm using also sudo The process is up The DOCKER_HOST variable is unset or 127.0.0.1 Reconnected the user Restarted the server I think that I've tried all the possible configurations am I right? ------- Specs: OS: Ubuntu 14.04.04 on Virtualbox on Windows 10 Home. Docker version 1.12.3, build 6b644ec ------ Thank You!
Proposal: Get the type of any expression with typeof
Working Implementation for this Proposal Try it out: `npm install yortus-typescript-typeof` View the diff: here. Problem Scenario TypeScript's type inference covers most cases very well. However there remain some situations where there is no obvious way to reference an anonymous type, even though the compiler is able to infer it. Some examples: I have a strongly-typed collection but the element type is anonymous/unknown, how can I reference the element type? (#3749) [code block] A function returns a local/anonymous/inaccessible type, how can I reference this return type? (#4233, #6179, #6239) [code block] I have an interface with a complex anonymous shape, how can I refer to the types of its properties and sub-properties? (#4555, #4640) [code block] Why do we need to Reference Anonymous/Inferred Types? One example is declaring a function that takes an anonymous type as a parameter. We need to reference the type somehow in the parameter's type annotation, otherwise the parameter will have to be typed as `any`. Current Workarounds Declare a dummy variable with an initializer that infers the desired type without evaluating the expression (this is important because we don't want runtime side-effects, just type inference). For example: [code block] This workaround has a few drawbacks: - very clearly a kludge, unclear for readers - identifier pollution (must introduce a variable like `dummyReturnValue`) - does't work in ambient contexts, because it requires an imperative
feature: first class Jest integration
(previously...) Making an issue to track work on the `Jest` experience with `vite`. `Jest` is a very popular JavaScript testing framework. Some standout features: - Support for mocking functions and modules - Parallelisation and prioritisation of tests - Snapshot tests - Running only changed tests between 2 revisions (or based on a set of files) It would be worthy to provide some form of blessed integration to use with `vite`. (If you don't need these features, you may be better off using a testing framework like uvu, which should be much simpler to setup.) - Files could be transformed with `esbuild` to make jest tests startup and run faster (prior art: `esbuild-jest`, `esbuild-jest-transform`). - Files could share the same transforms that `vite` already uses for newer syntax (for example, support for `import.meta` via `babel-plugin-transform-import-meta`) until `jest` ships full support for ES modules. - Files could have `jest.mock()` calls hoisted above imports with `babel-plugin-jest-hoist` (explanation) until top-level `await` lands fully in `esbuild`, at which point you could codemod all tests to use tla imports, and remove the `babel` plugin. (This still requires support from `jest` for ES modules, or else it won't detect tests defined after a couple of ticks have passed.) - This exists as an `swc` package too, which is very appealing (via vite#788). - I think `jest` uses `babel-plugin-istanbul` for coverage. This may never land in `esbuild`. @yyx990803