Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Podspec not published to npm if the package name contains hyphens #39

Closed
shirakaba opened this issue Apr 10, 2020 · 0 comments
Closed

Comments

@shirakaba
Copy link

shirakaba commented Apr 10, 2020

Bug

The files array generated by package.json removes any hyphens from the name of the generated podspec, and thus won't publish the podspec when publishing a package whose name includes hyphens to npm.

For a project named react-native-safe-popover, the package.json's files array comes out as:

  "files": [
    "src",
    "lib",
    "android",
    "ios",
    "reactnativesafepopover.podspec"
  ],

The podspec, meanwhile, is named react-native-safe-popover.podspec.

Environment info

react-native info output:

System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 785.12 MB / 16.00 GB
    Shell: 4.4.23 - /usr/local/bin/bash
  Binaries:
    Node: 13.4.0 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.0
      System Images: android-28 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: ~16.9.0 => 16.9.0 
    react-native: ~0.61.5 => 0.61.5

Library version: 0.10.0

Steps To Reproduce

npx @react-native-community/bob create react-native-safe-popover
cd react-native-safe-popover
yarn bootstrap

Describe what you expected to happen:

Either of these two:

  1. The podspec should be called react-native-safe-popover.podspec AND the files array in package.json should include react-native-safe-popover.podspec.
  2. The podspec should be called reactnativesafepopover.podspec AND the files array in package.json should include reactnativesafepopover.podspec.

Option 1 would be preferable, as it preserves the package name.

Reproducible sample code

See "Steps To Reproduce".

satya164 added a commit that referenced this issue Dec 16, 2020
When using `<%= code %>` in `ejs`, it escapes characters by default. This is useful when writing HTML, but in our case, it may sometimes lead to undesirable behavior.

For example, if you generate a project with the description "Satya's cool library", it would escape `'` and output: "Satya&#39 cool library".

This commit swaps the templates to use `<%- code %>` so that nothing is escaped.
satya164 added a commit that referenced this issue Dec 16, 2020
d53d8f6
When using `<%= code %>` in `ejs`, it escapes characters by default. This is useful when writing HTML, but in our case, it may sometimes lead to undesirable behavior.

For example, if you generate a project with the description "Satya's cool library", it would escape `'` and output: "Satya&#39 cool library".

This commit swaps the templates to use `<%- code %>` so that nothing is escaped.
satya164 added a commit that referenced this issue Dec 16, 2020
When using `<%= code %>` in `ejs`, it escapes characters by default. This is useful when writing HTML, but in our case, it may sometimes lead to undesirable behavior.

For example, if you generate a project with the description "Satya's cool library", it would escape `'` and output: "Satya&#39 cool library".

This commit swaps the templates to use `<%- code %>` so that nothing is escaped.
satya164 added a commit that referenced this issue Dec 16, 2020
When using `<%= code %>` in `ejs`, it escapes characters by default. This is useful when writing HTML, but in our case, it may sometimes lead to undesirable behavior.

For example, if you generate a project with the description "Satya's cool library", it would escape `'` and output: "Satya&#39 cool library".

This commit swaps the templates to use `<%- code %>` so that nothing is escaped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant