#1 Latest upstream 4.0.2
Merged 3 years ago by jsmith. Opened 3 years ago by carlwgeorge.
rpms/ carlwgeorge/nodejs-typescript v4  into  master

file modified
+1 -8
@@ -1,8 +1,1 @@ 

- /typescript-1.4.1.tgz

- /typescript-2.8.3.tgz

- /docs-2.8.3.tar.bz2

- /scripts-2.8.3.tar.bz2

- /src-2.8.3.tar.bz2

- /tests-2.8.3.tar.bz2

- /dl-tests.sh

- /Jakefile.js

+ typescript-*.tgz

file modified
+11 -45
@@ -1,37 +1,16 @@ 

  %global shortname typescript

  

- # The tests depend on npm packages not yet packaged for Fedora

- %global enable_tests 0

- 

  Name:           nodejs-typescript

- Version:        2.8.3

- Release:        7%{?dist}

+ Version:        4.0.2

+ Release:        1%{?dist}

  Summary:        A language for application scale JavaScript development

- 

  License:        ASL 2.0

- URL:            https://github.com/Microsoft/TypeScript/

+ URL:            https://www.typescriptlang.org

  Source0:        http://registry.npmjs.org/%{shortname}/-/%{shortname}-%{version}.tgz

- # The test files are not included in the npm tarball.

- # Source{1-9} are generated by running Source10, which pulls from the upstream

- # version control repository.

- Source1:	tests-%{version}.tar.bz2

- Source2:	src-%{version}.tar.bz2

- Source3:	docs-%{version}.tar.bz2

- Source4:	scripts-%{version}.tar.bz2

- Source10:	dl-tests.sh

- # Jakefile for tests

- Source11:	https://raw.githubusercontent.com/Microsoft/TypeScript/v%{version}/Jakefile.js

- 

  BuildArch:      noarch

  ExclusiveArch:  %{nodejs_arches} noarch

+ BuildRequires:  nodejs

  

- BuildRequires:  nodejs-packaging

- 

- %if 0%{enable_tests}

- BuildRequires:	jake

- BuildRequires:	npm(del)

- BuildRequires:	npm(travis-fold)	# not yet packaged for Fedora

- %endif

  

  %description

  TypeScript is a language for application-scale JavaScript. TypeScript
@@ -40,40 +19,23 @@ 

  for any host, on any OS. TypeScript compiles to readable, standards-based

  JavaScript.

  

+ 

  %prep

  %setup -qn package

- # setup the tests, src, docs, scripts

- %autosetup -T -D -a 1 -n package

- %autosetup -T -D -a 2 -n package

- %autosetup -T -D -a 3 -n package

- %autosetup -T -D -a 4 -n package

- # Jakefile

- cp -p %{SOURCE11} .

  

- %build

- # Nothing to do

  

  %install

  mkdir -p %{buildroot}%{nodejs_sitelib}/%{shortname}/

  cp -pr package.json bin/ lib/ %{buildroot}%{nodejs_sitelib}/%{shortname}

  

- # Make tsc executable

- chmod +x %{buildroot}%{nodejs_sitelib}/%{shortname}/bin/tsc

- 

  # Symlink tsc executable file to _bindir

  mkdir -p %{buildroot}%{_bindir}

- pushd %{buildroot}%{_bindir}

-     ln -s %{nodejs_sitelib}/%{shortname}/bin/tsc

- popd

+ ln -s %{nodejs_sitelib}/%{shortname}/bin/tsc %{buildroot}%{_bindir}

+ 

  

  %check

  %nodejs_symlink_deps --check

  %{__nodejs} -e 'require("./")'

- %if 0%{?enable_tests}

- %{_bindir}/jake

- %else

- %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"

- %endif

  

  

  %files
@@ -82,7 +44,11 @@ 

  %doc ThirdPartyNoticeText.txt README.md CopyrightNotice.txt

  %license LICENSE.txt

  

+ 

  %changelog

+ * Tue Aug 25 2020 Carl George <carl@george.computer> - 4.0.2-1

+ - Latest upstream rhbz#1825686

+ 

  * Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.3-7

  - Second attempt - Rebuilt for

    https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

file modified
+1 -7
@@ -1,7 +1,1 @@ 

- SHA512 (typescript-2.8.3.tgz) = 2bb835e416fa45ae2529fec8ab697f239fc49fe84b2079b15991aadc3e03211345c4c355ea3d921d2bc33aab36b4677852f0ff7c9bebc28a734178cbad3ec8b7

- SHA512 (docs-2.8.3.tar.bz2) = fcdcbad8ba7b35a20e2fcef6cf0600727dac5b0109196e4b140aa7aafdafa91c08bd74f87faed728c7ffde53b90aeed2d74347babafb7571886c406a07d8a742

- SHA512 (scripts-2.8.3.tar.bz2) = d43e2b2a7544deb3086c5034ba64968c6c9c56ed167da43288add444f0c052be82603ec775287d8f0363de66f0980caff10759e4e648b4489707c9fb59e85829

- SHA512 (src-2.8.3.tar.bz2) = 146d421b53051eb73dace4a31f9aa98006f0a13e3d0a4ab78cfb8ef8ed6bab0c4385b88852c6cdaa2f7cf417300dd130be531fb939a3da3df3ebff535d443d3e

- SHA512 (tests-2.8.3.tar.bz2) = 30904c27cf094ae31a67d07a5258dd36b1e80d7c3bd859384cf68c6eca4950bcd1f5325d709473aabd63b64ba297a12e59872d7d792ae62e900a590d87e374e2

- SHA512 (dl-tests.sh) = cea2348b51213375d7607ff1d666cabc4d89434170a7ea9d270bea405f4a894604f646a2a3c1fc0b1b4f33b83c4fa1192c0cc9e135194b17d1a4edc6f935d225

- SHA512 (Jakefile.js) = 76a4814418be8894ba04f77b50c5c5c20c5d2fd19ce26dc5193529d5ff787061accc4ce4435b2aacbc5b4b71297ef0bacbbd8f81b9ce83db04db60df091570c8

+ SHA512 (typescript-4.0.2.tgz) = 7b8111bd1576c1bfab459fc841e6f78e6d95c41b22ad02e9421771a65676304cc6bc39243263e095e7273437d25018af3233fddef45b9e06180d0a90ffbf1b71

Does this just blindly update typescript to the latest version, or does it ensure that no other NodeJS packages that depend on typescript are broken by updating this package?

I'm not well versed in the NodeJS ecosystem, so I haven't tested compatibility with other packages. My motivation is I am trying to package the pop shell GNOME extension, which requires at least TypeScript 3.8 to build.

https://github.com/pop-os/shell/blob/master_focal/README.md#installation

I understand the concern about compatibility, but I think this is appropriate for Rawhide, hence the pull request being against the master branch. We're currently shipping version 2.8.3, which was released upstream on 2018-04-19. Shipping a 2+ year old version directly contradicts with Fedora's First Foundation. Considering that TypeScript 3 was released on 2018-07-06, and TypeScript 4 claims to have "no larger breaking changes than usual", I imagine most of the NodeJS ecosystem is already compatible. I think we should push this for Rawhide to move our NodeJS package ecosystem forward.

OK, then we can use this as a teaching/learning experience. :-)

To check to see what other packages depend on nodejs-typescript, run the following command:

$ dnf repoquery --repo=rawhide-source --whatrequires 'npm(typescript)' --alldeps --quiet

For each package that depends on 'npm(typescript)', check and see if they depend on a particular version by running the following command. (I'm doing the first -- I'll let you check any others).

$ dnf repoquery --repo=rawhide-source --requires nodejs-locate-character --quiet

Now check the output of that command and see if the version of typescript is set to any particular version. In this case, it's not.

Please check any other packages that have dependencies on 'npm(typescript)' and let me know.

Also, your patch removes any tests from the package, and throws several errors and warnings in rpmlint, so you'll want to check those as well. (If you need help with any of them or don't understand what to do, please don't hesitate to ask for help on this ticket.)

Please check any other packages that have dependencies on 'npm(typescript)' and let me know.

The only other one is nodejs-rollup-plugin-typescript, which also doesn't specify any restrictions on the typescript version.

I took this a step further and attempted to do local rebuilds of those two packages with this typescript build. They both worked in an F32 mock. I wasn't able to test F33 or F34 because both have build requirements on mocha, which is currently uninstallable on F33/F34 due to nodejs-supports-color being retired. Additionally, nodejs-rollup-plugin-typescript has a build requirement on nodejs-rollup, which is also retired on F33/F34.

Also, your patch removes any tests from the package

The tests weren't being run before. Upstream doesn't use a Jakefile anymore, so running the tests in the future will require %check to be overhauled, in addition to packaging all the missing test requirements. Better to clean it up now and start fresh in the future if/when all the test requirements are packaged.

and throws several errors and warnings in rpmlint, so you'll want to check those as well.

rpmlint warnings before the pull request:

nodejs-typescript.spec:17: W: mixed-use-of-spaces-and-tabs (spaces: line 6, tab: line 17)
nodejs-typescript.spec: W: invalid-url Source4: scripts-2.8.3.tar.bz2
nodejs-typescript.spec: W: invalid-url Source3: docs-2.8.3.tar.bz2
nodejs-typescript.spec: W: invalid-url Source2: src-2.8.3.tar.bz2
nodejs-typescript.spec: W: invalid-url Source1: tests-2.8.3.tar.bz2
0 packages and 1 specfiles checked; 0 errors, 5 warnings.

rpmlint warnings after the pull request:

nodejs-typescript.spec: W: no-%build-section
0 packages and 1 specfiles checked; 0 errors, 1 warnings.

It is standard practice to remove empty %build sections, so I think this is fine.

Pull-Request has been merged by jsmith

3 years ago