Skip to content

Commit

Permalink
Switch to nari from yarn (#186)
Browse files Browse the repository at this point in the history
* Switch to nari from yarn

* Disable GH caching to speed up tests

* Upgrade to Node 18.x

* Add install step
  • Loading branch information
larixer authored Oct 2, 2024
1 parent 8a41609 commit 930df62
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5,807 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,22 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
./.yarn/releases
./.yarn/cache
key: ${{ runner.os }}-install-${{ hashFiles('yarn.lock') }}-v4

- name: "Use Node.js 16.x"
- name: "Use Node.js 18.x"
uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 18.x

- name: "Install nari"
run: |
npm i -g nari
- name: "Install"
run: |
nari
- name: Install Webpack ${{ matrix.webpack-version }}
run: |
corepack enable
yarn config set enableMirror false
yarn config set enableGlobalCache false
yarn add webpack@${{ matrix.webpack-version }}
nari add webpack@${{ matrix.webpack-version }}
- name: Run tests
run: yarn test
run: nari test
4 changes: 0 additions & 4 deletions .yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 SysGears
Copyright (c) 2017 SysGears (Cyprus) Limited

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,20 @@ virtualModules.writeModule(

This project is inspired by [virtual-module-webpack-plugin].

## Contributing

This project uses `nari` package manager to have reproducible builds without resorting to lockfiles, it uses `lockTime` field in `package.json` instead.

To install `nari` execute:
`npm i -g nari`

And then `nari` to install the project.

To run project scripts use `nari script_name`, for example `nari test` to run unit tests.

## License

Copyright © 2017 [SysGears INC]. This source code is licensed under the [MIT] license.
Copyright © 2017 [SysGears (Cyprus) Limited]. This source code is licensed under the [MIT] license.

[webpack virtual modules with webpack 3]: https://github.com/sysgears/webpack-virtual-modules/tree/master/docs/webpack3.md
[webpack compiler hook documentation]: https://webpack.js.org/api/compiler-hooks/
Expand All @@ -120,7 +131,7 @@ Copyright © 2017 [SysGears INC]. This source code is licensed under the [MIT] l
[api reference]: https://github.com/sysgears/webpack-virtual-modules/tree/master/docs/API%20Reference.md
[virtual-module-webpack-plugin]: https://github.com/rmarscher/virtual-module-webpack-plugin
[MIT]: LICENSE
[SysGears INC]: http://sysgears.com
[SysGears (Cyprus) Limited]: http://sysgears.com

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/webpack-virtual-modules?style=flat
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
"name": "webpack-virtual-modules",
"version": "0.6.2",
"description": "Webpack Virtual Modules",
"packageManager": "[email protected]",
"main": "src/index.ts",
"scripts": {
"clean": "rm -rf ./lib",
"build": "tsc -p tsconfig.build.json",
"watch": "tsc -p tsconfig.build.json -w",
"tests": "jest",
"tests:watch": "jest --watch",
"test": "yarn lint && yarn tests",
"test": "nari lint && nari tests",
"lint": "eslint --fix src/**/*.ts",
"prepack": "yarn clean && yarn build"
"prepack": "nari clean && nari build"
},
"repository": {
"type": "git",
Expand All @@ -37,9 +36,9 @@
"@babel/preset-typescript": "^7.3.3",
"@babel/register": "^7.5.5",
"@types/jest": "^24.0.6",
"@types/node": "^11.11.3",
"@types/node": "^22.7.4",
"@types/tmp": "^0.1.0",
"@types/webpack": "^4.32.1",
"@types/webpack": "^5.28.5",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"babel-jest": "^29.0.3",
Expand Down Expand Up @@ -79,5 +78,6 @@
},
"husky": {
"pre-commit": "lint-staged"
}
}
},
"lockTime": "2024-10-02T08:19:16.905Z"
}
Loading

0 comments on commit 930df62

Please sign in to comment.