Skip to content

Commit

Permalink
chore: update deps (#1)
Browse files Browse the repository at this point in the history
* feat: setup CI

* feat: update packages

* chore: fix tests

* chore: changeset setup

* chore: add changesets

* chore: add package lock

* chore: update eslint config

* chore: add optional deps

* chore: change job os

* chore: fix jest tests
  • Loading branch information
2wce authored May 22, 2024
1 parent f3964bc commit 43333b4
Show file tree
Hide file tree
Showing 20 changed files with 9,620 additions and 146 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/fair-plums-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rollup-plugin-sourcemaps2': minor
---

chore: upgrade dependencies to latest
5 changes: 2 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"extends": ["eslint:recommended", "plugin:prettier/recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 2017,
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
Expand All @@ -16,8 +16,7 @@
"files": ["**/*.ts"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint"
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parserOptions": {
"project": "./tsconfig.json"
Expand Down
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: [2wce]
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. [First step to reproduce the issue]
2. [Second step to reproduce the issue]
3. [And so on...]

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

## Environment

- **Package Version**: [Version of the package where the issue occurred]
- **Node.js Version**: [Version of Node.js you're using]
- **Operating System**: [Your operating system (e.g., Windows 10, macOS Catalina, Ubuntu 20.04)]
- **Additional Environment Details**: [Any other relevant details about your environment]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
29 changes: 29 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## 🚀 Pull Request

### Description

Describe the purpose of this pull request here.

### Changes Made

- Summarize the key changes made in this PR.

### Related Issues

- Link any related issues or tasks here.

### Screenshots (if applicable)

Include any relevant screenshots or GIFs to visually demonstrate the changes.

### Checklist

- [ ] I have tested the changes locally.
- [ ] I have updated the documentation accordingly.
- [ ] I have added appropriate comments where necessary.
- [ ] All tests pass successfully.
- [ ] I have squashed and rebased my commits.

### Additional Notes

Add any additional notes or context here.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: 'weekly'
81 changes: 81 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Test and release

# Run the workflow when a Pull Request is opened or when changes are pushed to master
on:
pull_request:
push:
branches: [main]

jobs:
test:
runs-on: macos-latest

strategy:
matrix:
# Run the steps below with the following versions of Node.js
node-version: [20.x, 22.x]

steps:
# Fetch the latest commit
- name: Checkout
uses: actions/checkout@v4

# Setup Node.js using the appropriate version
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

# Install package dependencies
- name: Install
run: npm ci

# Run build
- name: Build
run: yarn build

# Run tests
- name: Test
run: yarn test

# - name: Coveralls
# uses: coverallsapp/github-action@v2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

release:
strategy:
matrix:
# Run the steps below with the following versions of Node.js
node-version: [22.x]

# Only release on push to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: macos-latest

# Waits for test jobs for each Node.js version to complete
needs: [test]

steps:
- name: Checkout
uses: actions/checkout@v4

# Setup Node.js using the appropriate version
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22.x

# Install package dependencies
- name: Install
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ coverage
.vscode
.code
.DS_Store
yarn.lock
package-lock.json
tsconfig.tsbuildinfo
.rollup.cache
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

84 changes: 0 additions & 84 deletions CHANGELOG.md

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 @@
The MIT License (MIT)

Copyright (c) 2020 Max Davidson
Copyright (c) 2024 Kudakwashe Mupeni

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
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# rollup-plugin-sourcemaps

[![npm](https://img.shields.io/npm/v/rollup-plugin-sourcemaps.svg)](https://www.npmjs.com/package/rollup-plugin-sourcemaps)
[![Build Status](https://img.shields.io/travis/maxdavidson/rollup-plugin-sourcemaps/master.svg)](https://travis-ci.org/maxdavidson/rollup-plugin-sourcemaps)
[![Coverage Status](https://img.shields.io/coveralls/maxdavidson/rollup-plugin-sourcemaps/master.svg)](https://coveralls.io/github/maxdavidson/rollup-plugin-sourcemaps?branch=master)
# rollup-plugin-sourcemaps2

[![npm](https://img.shields.io/npm/v/rollup-plugin-sourcemaps2.svg)](https://www.npmjs.com/package/rollup-plugin-sourcemaps2)
[![Build Status](https://img.shields.io/travis/maxdavidson/rollup-plugin-sourcemaps2/master.svg)](https://travis-ci.org/maxdavidson/rollup-plugin-sourcemaps2)
[![Coverage Status](https://img.shields.io/coveralls/maxdavidson/rollup-plugin-sourcemaps2/master.svg)](https://coveralls.io/github/maxdavidson/rollup-plugin-sourcemaps2?branch=master)

[Rollup](https://rollupjs.org) plugin for loading files with existing source maps.
Inspired by [webpack/source-map-loader](https://github.com/webpack/source-map-loader).

Works with rollup 0.31.2 or later.
Works with rollup 4 or later.

If you use [rollup-plugin-babel](https://github.com/rollup/rollup-plugin-babel),
you might be able to use the [`inputSourceMap`](https://babeljs.io/docs/en/options#inputsourcemap) option instead of this plugin.
Expand All @@ -21,7 +20,7 @@ you might be able to use the [`inputSourceMap`](https://babeljs.io/docs/en/optio
## Usage

```javascript
import sourcemaps from 'rollup-plugin-sourcemaps';
import sourcemaps from 'rollup-plugin-sourcemaps2';

export default {
input: 'src/index.js',
Expand Down
2 changes: 1 addition & 1 deletion jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
modulePathIgnorePatterns: ['<rootDir>/dist'],
modulePathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/.rollup.cache'],
};
Loading

0 comments on commit 43333b4

Please sign in to comment.